//requires mootools

function checkform(theForm) {

if(theForm.name.value=="") {
alert("Please enter your name.");
theForm.name.focus();
return false;
}
var x = theForm.email.value;
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(x) !=true){
alert("Please enter a valid email address.");
theForm.email.focus();
return false;
}
if(theForm.telephone.value=="") {
alert("Please enter your telephone number.");
theForm.telephone.focus();
return false;
}
if(theForm.message.value=="") {
alert("Please enter a message.");
theForm.message.focus();
return false;
}

return true;

}


