function emailcheck()
{
  var string1=document.registration.email.value
    if (string1.indexOf("@")==-1)
    {
      alert("Please input a valid email address!");
      document.registration.email.select();
    }
}


function validate(a)
{
/*
if (document.registration.companyname.value=="")
    {
     alert ("Please enter your company name");
     document.registration.companyname.select();
     return false;
    }
*/


if(document.registration.jobtitles!=undefined )
{
	if (document.registration.jobtitles.selectedIndex == -1)
		{
			alert ("Please choose at least one job title");
			return false;
		}
}

if (document.registration.firstname.value=="")
    {
     alert ("Please enter your first name");
     document.registration.firstname.select();
     return false;
    }

if (document.registration.lastname.value=="")
    {
     alert ("Please enter your last name");
     document.registration.lastname.select();
     return false;
    }

if (document.registration.telephone.value=="")
    {
     alert ("Please enter your phone number");
     document.registration.telephone.select();
     return false;
    }

/*
if (document.registration.fax.value=="")
    {
     alert ("Please enter your fax number");
     document.registration.fax.select();
     return false;
    }

if (document.registration.lookingtohire.selectedIndex == 0)
    {
     alert ("Please select a professional");
     document.registration.lookingtohire.focus();
     return false;
    }


if (document.registration.resumeupdates.selectedIndex == 0)
    {
     alert ("Please select your resume preference");
     document.registration.resumeupdates.focus();
     return false;
    }
*/

if (document.registration.from.selectedIndex == 0)
    {
     alert ("Please select how you heard about us");
     document.registration.from.focus();
     return false;
    }
   

if (document.registration.email.value=="")
    {
     alert ("Please enter your email");
     document.registration.email.focus();
     return false;
    }

if (document.registration.email.value.search(/@yahoo.com/i) != -1)
	{
		alert("Plase enter non yahoo.com email");
		document.registration.email.focus();
		return false;
		
	}

if (document.registration.emailconfirm.value != document.registration.email.value)
    {
     alert ("Your emails do not match");
     document.registration.emailconfirm.focus();
     return false;
    }   
    
if (document.registration.password.value=="")
	{
	alert ("Please enter your password");
	document.registration.password.select();
	return false;
	}
if (document.registration.password2.value != document.registration.password.value)
	{
	alert ("Second Password Does Not Match First Password.  Please re-enter both passwords.");
	document.registration.password2.select();
	return false;
	}
   
}
