// JavaScript Document
function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }

function checkZipCode()
{
	if(document.getElementById("txtZipCode").value=="")
	{
		alert("Please Enter Zip Code.");
		document.getElementById("txtZipCode").focus();
		return false;
	}
	else if(IsNumeric(document.getElementById("txtZipCode").value) == false) 
      {
       alert("Please enter valid numeric zip code!");
	  document.getElementById("txtZipCode").focus();
	  return false;
      }
}
function showTranaut()
{
document.getElementById('Tranaut').style.display="block";
}


function hideTranaut()
{
document.getElementById('Tranaut').style.display="none";
}

var login_flg;
login_flg=0;
function showMenu()
{
	if (login_flg==0)	
	{
	document.getElementById('Menu').style.left = (tempX-205)+'px';
	document.getElementById('Menu').style.top = (tempY-16)+'px';
/*	alert(document.getElementById('Menu').style.top);
	alert(tempX);*/
	document.getElementById('Menu').style.display="block";
	document.getElementById('memberlogin').className = 'home_top_button_bg_mo';
	login_flg=1;
	}
	else
	{
		document.getElementById('Menu').style.display="none";
		document.getElementById('memberlogin').className = 'home_top_button_bg';
	login_flg=0;
	}
}


function hideMenu()
{
document.getElementById('Menu').style.display="none";
}

function validate_loginfields(frm){
	if ( frm.advisor_email.value==""){
		alert("Please Enter User ID");
		frm.advisor_email.focus()
		return false;
	 }
	if ( frm.advisor_password.value==""){
		alert("Please Enter Password");
		frm.advisor_password.focus()
		return false;
	 }
	 if (frm.advisor_password.value.length < 6){
		alert("Your password should be at least six characters long");
		frm.advisor_password.focus()
		return false;
	 }
	
	return true;
}

function showHideLogin(val)
{
	if(val="show"){
		document.getElementById('Menu').style.display = 'block';
		document.getElementById('blackOut').style.display = 'block';
	}else{
		document.getElementById('Menu').style.display = 'none';
		document.getElementById('blackOut').style.display = 'none';
	}
}

