<!-- //hide the script
function checkEmail(strng) {
	var error = "";

	var emailFilter=/^.+@.+\..{2,6}$/;

	if (!(emailFilter.test(strng))) {
		return false;
	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/

	if (strng.match(illegalChars)) {
		return false;
	}

	return true;
}


function form_validator(theForm)
{

 	if(theForm.enquirytype.value == "") {
 		 alert("Please choose the type of your Enquiry .");
 		 theForm.enquirytype.focus();
 		 return(false);
 	}

 	if(theForm.sender.value == "") {
 		 alert("Please enter your Name.");
 		 theForm.sender.focus();
 		 return(false);
 	}
 	
 	if(theForm.address_1.value == "") {
 		 alert("Please enter the first line of your Address.");
 		 theForm.address_1.focus();
 		 return(false);
 	}
 	
  	if(theForm.town.value == "") {
  		 alert("Please enter your Town name.");
  		 theForm.town.focus();
  		 return(false);
 	}
 	
	if(theForm.postcode.value == "") {
		alert("Please enter your postcode.");
		theForm.postcode.focus();
		return(false);
 	}
 	
 	if(theForm.telephone.value == "") {
		alert("Please enter your telephone number.");
		theForm.telephone.focus();
		return(false);
 	}
 	
  	if(!checkEmail(theForm.email.value)) {
  		alert("Please enter a valid Email Address");
  		theForm.email.focus();
  		return false;  
	} 	
 	
  	if(theForm.comments.value == "") {
  		 alert("Please enter your Enquiry.");
  		 theForm.comments.focus();
  		 return(false);
 	}
 	
	return (true);
}
// end script hiding -->
