<!-- //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.realname.value == "") {
 		alert("Please type your full name.");
 		theForm.realname.focus();
 		return(false);
 	}
 	
	if(!checkEmail(theForm.email.value)) {
		alert("Please enter a valid Email Address");
		theForm.email.focus();
		return false;	
	}
	
	if(theForm.address.value == "") {
		alert("Please type your address.");
		theForm.address.focus();
		return(false);
 	}
 	
 	if(theForm.post_code.value == "") {
 		alert("Please type your postcode.");
 		theForm.post_code.focus();
 		return(false);
 	}
 	
  	if(theForm.tel.value == "") {
  		alert("Please type your telephone number.");
  		theForm.tel.focus();
  		return(false);
 	} 	
 	
 	numchecked = 0;
 	
	for (i = 0; i < theForm.info.length; i++) {
	
		if (theForm.info[i].checked) {
			numchecked++;
		}
		
	}
		
	if (numchecked == 0) {
		alert("You must tick at least one box");
		return(false);
	}
	
	return (true);
}
// end script hiding -->
