function validateForm() {

var x=document.forms["theForm"]["Name"].value;
var alpha=/^[A-Z -]{5,}$/i;
if (x==null || x=="") {
  alert("Please fill in your name");
  return false;
} else if (!(x.match(alpha))) {
  alert("Please fill in a valid name");
  return false;
}

var y=document.forms["theForm"]["Phone"].value;
var numer=/^[0-9 ]{10,13}$/i;
if (y==null || y=="") {
  alert("Please fill in your phone number");
  return false;
} else if (!(y.match(numer))) {
  alert("Please fill in a valid phone number");
  return false;
}

var z=document.forms["theForm"]["Email"].value
var vale=/^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
if (z==null || z=="") {
  alert("Please fill in your email address");
  return false;
} else if (!(z.match(vale))) {
  alert("Please fill in a valid e-mail address");
  return false;
}

}
