
<!-- //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.sender_title.value == "") {
		 alert("Please enter your Title.");
		 theForm.sender_title.focus();
		 return(false);
	}

	if(theForm.sender_fname.value == "") {
		 alert("Please enter your First Name.");
		 theForm.sender_fname.focus();
		 return(false);
	}

	if(theForm.sender_sname.value == "") {
		 alert("Please enter your Surname.");
		 theForm.sender_sname.focus();
		 return(false);
	}
	
	if(theForm.address_1.value == "") {
		 alert("Please enter your Address.");
		 theForm.address_1.focus();
		 return(false);
	}
	
	if(theForm.town.value == "") {
		 alert("Please enter your Town.");
		 theForm.town.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 Post Code.");
		 theForm.postcode.focus();
		 return(false);
	}
	
	if(theForm.w_address_1.value == "") {
		 alert("Please enter an Address.");
		 theForm.w_address_1.focus();
		 return(false);
	}
	
	if(theForm.w_town.value == "") {
		 alert("Please enter a Town.");
		 theForm.w_town.focus();
		 return(false);
	}
	
	if(theForm.w_county.value == "") {
		 alert("Please enter a County.");
		 theForm.w_county.focus();
		 return(false);
	}
	
	if(theForm.w_postcode.value == "") {
		 alert("Please enter a Post Code.");
		 theForm.w_postcode.focus();
		 return(false);
	}
	
	if(theForm.telephone.value == "") {
		 alert("Please enter your Telephone Number.");
		 theForm.telephone.focus();
		 return(false);
	}

	if(!checkEmail(theForm.s_email.value)) {
		 alert("Please enter a valid Email Address");
		theForm.s_email.focus();
		 return false;

	}
	
	if(theForm.mobile_no.value == "") {
		 alert("Please enter your Mobile Phone Number.");
		 theForm.mobile_no.focus();
		 return(false);
	}
	
	if(theForm.sender_dob.value == "") {
		 alert("Please enter your Date of Birth.");
		 theForm.sender_dob.focus();
		 return(false);
	}
	
	
	return (true);
}
// end script hiding -->