function showHide(theid){
   menu_status = new Array();
   a=document.forms.menuForm;   
   
   if (document.getElementById) {  
   	   oldid=a.menu_item_id.value; 	

	   if (document.getElementById(theid).className != 'leftMenuSubRowshow')
	   {
	      document.getElementById(theid).className = 'leftMenuSubRowshow';	
		  if (oldid && oldid!=''&oldid!=theid ) document.getElementById(oldid).className = 'leftMenuSubRowhide';
	   }
	   else
	   {	
	      document.getElementById(theid).className = 'leftMenuSubRowhide';
	   }
	   a.menu_item_id.value = theid;	
    }	
}

function emailCheck (emailStr) {

/* The following variable tells the rest of the function whether or not
to verify that the address ends in a two-letter country or well-known
TLD.  1 means check it, 0 means don't. */

var checkTLD=1;

var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);

if (matchArray==null) {
	alert("Email address is invalid");
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
return false;
   }
}



 
if (len<2) {
alert("Email address is invalid");
return false;
}

// If we've gotten this far, everything's valid!
return true;
}

//  End -->