<!-- //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.firstname.value == "") {
		 alert("Please enter your First Name.");
		 theForm.firstname.focus();
		 return(false);
 	}
 	if(theForm.surname.value == "") {
		 alert("Please enter your Surname.");
		 theForm.surname.focus();
		 return(false);
 	}
 	if(theForm.house.value == "") {
		 alert("Please enter your House/Flat number.");
		 theForm.house.focus();
		 return(false);
 	}
 	if(theForm.street.value == "") {
		 alert("Please enter your Street.");
		 theForm.street.focus();
		 return(false);
 	}
 	if(theForm.towncity.value == "") {
 		 alert("Please enter your Towncity.");
 		 theForm.towncity.focus();
 		 return(false);
 	}
 	if(theForm.county.value == "") {
 		 alert("Please enter your County.");
 		 theForm.county.focus();
 		 return(false);
 	}
 	if(theForm.postcode.value == "") {
 		 alert("Please enter your Postcode.");
 		 theForm.postcode.focus();
 		 return(false);
 	}
 	if(theForm.theiremail.value == "") {
 		 alert("Please enter your Email");
 		 theForm.theiremail.focus();
 		 return(false);
 	}

	if(!checkEmail(theForm.theiremail.value)) {
		 alert("Please enter a valid Email Address");
		 theForm.theiremail.focus();
		 return false;

	}
	if(theForm.phone.value == "") {
		 alert("Please enter your Phone Number.");
		 theForm.phone.focus();
		 return(false);
 	}
	
	return (true);
}
// end script hiding -->