function check()
{
	var name=document.form1.name.value;
	var contno=document.form1.contno.value;
	var email=document.form1.email.value;	
	var stripped = contno.replace(/[\(\)\.\-\ ]/g,'');	
	var apos=email.indexOf("@");
	var dotpos=email.lastIndexOf(".");	
	if (name.length<=0)
	{
			document.form1.name.focus();
			alert ("The required field has not been filled in.");
			return false;
	} 		
	else if (email.length<= 0)
	 {
			document.form1.email.focus();
			alert ("The required field has not been filled in.");
			return false;
	 } 	 	 
	 else if (apos<1||dotpos-apos<2) 
	 {            
	         document.form1.email.focus();
       		 alert("Please enter a valid email address.");
			 return false;
     }
	 else if (contno.length<= 0)
	{
			document.form1.contno.focus();
			alert ("The required field has not been filled in.");
			return false;
	} 		
	else if (isNaN(parseInt(stripped))) 
	{
        document.form1.contno.focus();
		alert("The phone number contains illegal characters.");
        return false;
    }
	 else if (!(stripped.length == 10)) 
	{
        document.form1.contno.focus();
		alert("The phone number is the wrong length. Make sure you included an area code.");
        return false;
    } 					
	
else 
	{	
	return true;	
	}	
}


