function validate_email(field,alerttxt)
{
	with (field)
	{
	apos=value.indexOf("@");
	dotpos=value.lastIndexOf(".");
	if (apos<1||dotpos-apos<2) 
	  {alert(alerttxt);return false;}
	else {return true;}
	}
} 
 
function validate(theForm) {
	
		
	if ( theForm.FullName.value == "" ) {
		alert("You must fill in your Name");
		theForm.FullName.focus();
		 return (false);
	}

	if ( theForm.Phone.value == "" ) {
		if ( theForm.EmailAddr.value == "" ) {
			alert("You must fill a Telephone Number or an Email Address");
			theForm.Phone.focus();
		    return (false);
		}
	}
	if (validate_email(theForm.EmailAddr,"Please enter a valid email")==false) {
  		{theForm.EmailAddr.focus();
  		return false;}
	 }
	 
	if ( theForm.Comments.value == "" ) {
		alert("Please enter your Enquiry in the Comments box");
		theForm.Comments.focus();
		 return (false);
	}
	
	
return true;
}







