<!--
function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

 		 return true					
	}
	
function FrontPage_Form1_Validator(theForm)
{
	var selectedCategory;
	selectedCategory = -1;
	

	for(var i = 0; i < theForm.category.length; i++)
{
            if(theForm.category[i].checked)
            {
                        selectedCategory = i;
            }
}
 

	if(selectedCategory < 0)
	{
		alert("You must choose at least one Category.")
		top.location.href = "#categoryAnchor";
		return false;
	}

  if (theForm.first_name.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.first_name.focus();
    return (false);
  }

   if (theForm.last_name.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.last_name.focus();
    return (false);
  }
  


    if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }
  


      if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }

  
  if (theForm.work_phone.value == "") 
  { 
 		if (theForm.home_phone.value == "") 
 		{
		 	if (theForm.cell_phone.value == "")
		 	{
		    alert("Please enter at least one phone number.");
		    theForm.work_phone.focus();
		    return (false);
  		}
		}
	}

	if(selectedCategory == PHYSICIAN)
	{
		if(theForm.specialty.value == "")
			{
				if(theForm.combined_specialty.value == "")	
					{
						alert("Please enter at least one specialty or combined specialty.");
						theForm.specialty.focus();
						return (false);
					}
			}
		if (theForm.residency.value == "")
			  {
				alert("Please enter a value for the \"Residency\" field.");
				theForm.residency.focus();
				return (false);
			  }
			  
		if (theForm.residency_years.value == "")
			{
			 alert("Please enter a value for the \"Years\" field.");
			 theForm.residency_years.focus();
			 return (false);
			}
	}
 

	
 	if (theForm.visa_status.value == "")
	{
	 alert("Please enter a value for the \"Visa Status\" field.");
	 theForm.visa_status.focus();
	 return (false);
	}
  
 
  
  var email=document.form1.email
	
	if ((email.value==null)||(email.value=="")){
		alert("Please Enter your Email")
		email.focus()
		return false
	}
	if (echeck(email.value)==false){
		email.value=""
		email.focus()
		return false
	}
  
  return (true);
}
//-->

