function validateForm() {
  var theForm = document.ContactForm;
  if (theForm.FullName.value == "") {
  	alert("Please enter a value for the \"Name\" field.");
  	return false;
  }

  if (theForm.Email.value == "") {
  	alert("Please enter a value for the \"E-mail\" field.");
  	return false;
  }
  if (validateEmail(theForm.Email.value) == false) {
  	alert("Please enter a valid E-mail address.");
  	return false;
  }
   
  return true;
}

function validateEmail(email) {
  return (email.indexOf(".") > 2) && (email.indexOf("@") > 0);
}

function validatePhoneNumber(phoneNumber) {
  var stripped = phoneNumber.replace(/[\(\)\.\-\ ]/g, '');
  stripped = parseInt(stripped);
  if (isNaN(stripped)) {
  	return false;
  }
  stripped = stripped + "";
  if (!(stripped.length == 10)) {
  	return false;
  }
  return true;
}
