<!-- //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.custfore.value == "") {
		 alert("Please enter your forename.");
		 theForm.custfore.focus();
		 return(false);
	}

	if(theForm.custsur.value == "") {
		 alert("Please enter your surname.");
		 theForm.custsur.focus();
		 return(false);
	}

	if(theForm.telareacode.value == "") {
		 alert("Please enter an area code.");
		 theForm.telareacode.focus();
		 return(false);
	}

	if(theForm.telphone.value == "") {
		 alert("Please enter your phone number.");
		 theForm.telphone.focus();
		 return(false);
	}

	if(theForm.calltime.value == "") {
		 alert("Please select a time.");
		 theForm.calltime.focus();
		 return(false);
	}

  	if(!checkEmail(theForm.emailaddress.value)) {
  		alert("Please enter a valid Email Address");
  		theForm.emailaddress.focus();
  		return false;
	}


	return (true);
}
// end script hiding -->