<!-- //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.theirname.value == "") {
 		 alert("Please enter a name.");
 		 theForm.theirname.focus();
 		 return(false);
 	}
 	if(theForm.telephone.value == "") {
		 alert("Please enter your telephone number");
		 theForm.telephone.focus();
		 return(false);
 	}
 	
 	if(theForm.fromemail.value == "") {
 		 alert("Please enter your email address");
 		 theForm.fromemail.focus();
 		 return(false);
 	}

	if(!checkEmail(theForm.fromemail.value)) {
		 alert("Please enter a valid email address");
		 theForm.fromemail.focus();
		 return false;

	}
	if(theForm.comments.value == "") {
		 alert("Please enter some enquiry.");
		 theForm.comments.focus();
		 return(false);
 	}
	
	return (true);
}
// end script hiding -->
