// JavaScript Document

function help_window(helpid)
{
  var mywin;
   W = 700
   H  = 550
   msdn = "help/newmember.asp?helpid=" + id
   var myW = W ? W : screen.availWidth;
   var myH = H ? H : screen.availHeight;
   mywin = window.open(msdn,"",'width='+myW+',height='+myH+', top=2,left=2,scrollbars=yes');
   mywin.resizeTo(myW,myH);
}

	function chklogin(thisform)
		{
	if (thisform.email.value == "" || thisform.email.value.indexOf('@',0) == -1 || thisform.email.value.indexOf('.',0) == -1) 
	 {
	   alert ("Please enter a valid E-mail Address") ;
	   thisform.email.focus() ;
	   return false ;
	 }
		else if (thisform.passwd.value == "")
			{
				alert("Please enter your password");
				thisform.passwd.focus();
				return false;
			}
			else{}
		}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function chk_form(thisform)
{
	 if (thisform.fname.value == "")
		{
			alert("Please enter your First Name");
			thisform.fname.focus();
			return false;
		}

	 if (thisform.lname.value == "")
		{
			alert("Please enter your  Last Name");
			thisform.lname.focus();
			return false;
		}

	 if (thisform.old_passwd.value == "")
		{
			alert("Please enter your Password");
			thisform.old_passwd.focus();
			return false;
		}

	 if (thisform.new_passwd.value == "")
		{
			alert("Please enter your Password");
			thisform.new_passwd.focus();
			return false;
		}
		
	if (thisform.new_passwd.value != thisform.old_passwd.value) 
		{
			alert ("Your Password is not matching.")
			thisform.old_passwd.focus();
			return false;
		}
		
	if (thisform.address1.value == "")
		{
			alert("Please enter your Address");
			thisform.address1.focus();
			return false;
		}
		
	if (thisform.city.value == "")
		{
			alert("Please enter your City");
			thisform.city.focus();
			return false;
		}

	if (thisform.state.value == "")
		{
			alert("Please enter your State");
			thisform.state.focus();
			return false;
		}

	if (thisform.zip.value == "")
		{
			alert("Please enter Zip Code");
			thisform.zip.focus();
			return false;
		}
		
	var zip=thisform.zip.value
		if (isNaN(zip) == true)
		{
			alert("Please enter numeric value in Zip Code");
			thisform.zip.focus();
			return false;
		}
		
		
	 var mm = 0
		 for (i=15;i<=23;i++)
		 {
			 var e = thisform.elements[i]
			 if (e.type == "checkbox" && e.checked == true)  
				{
					mm=1
					break;
				}
		 }
	 if (mm==0) 
		 {
			alert("Please choose atleast one interest We would like to know your interests to: \n\nTo customize your login page.\nTo provide updates as per your interests.\nTo provide articles for you to read on.")
			thisform.elements[15].focus()
			return false;
		 }


		
}

function chkpwd(thisform)
		{
		if (thisform.new_passwd.value != thisform.new_passwd1.value )
		 {
			alert ("Your Password is not matching.")
			thisform.new_passwd.focus();
			return false;			
		}
}


