function FormValidator(theForm) {
  if (theForm.email.value == "") {
    alert("Please enter your email address.");
    theForm.email.focus();
    return (false);
  }
  if (!isEmailAddr(theForm.email.value)) {
    alert("Please enter a correctly formatted email address.");
    theForm.email.focus();
    return (false);
  }   
  if (theForm.email.value.length < 3) {
    alert("Please enter a correctly formatted email address.");
    theForm.email.focus();
	return (false);
  }
  if (theForm.memnumber.value == "") {
    alert("Please enter membership number.");
    theForm.memnumber.focus();
    return (false);
  }
  if (!/\d{10,10}/.test(theForm.memnumber.value)) {
    alert("Membership number should have 10 characters.");
    theForm.memnumber.focus();
    return false;
  }          
  return(true);
}
