function FormValidator(theForm) {
  if (theForm.receipt.value == "") {
    alert("Please enter your OZentries receipt number.");
    theForm.receipt.focus();
    return (false);
  }  
  var receipt=(theForm.receipt.value);
  if (receipt.substring(0,2)!="OZ"
    && receipt.substring(0,2)!="oz") {
	alert("Please enter a valid OZentries receipt number.");
    theForm.receipt.focus();
    return (false);
  }   
  if (receipt.substring(2,7)!=parseInt(receipt.substring(2,7))) {
	alert("Please enter a valid OZentries receipt number.");
    theForm.receipt.focus();
    return (false);
  }
  if (theForm.receipt.value.substring(2,7) < 10000) {
	alert("Please enter a valid OZentries receipt number.");
    theForm.receipt.focus();
    return (false);
  }    
  if (theForm.name.value == "") {
    alert("Please enter your name.");
    theForm.name.focus();
    return (false);
  }
  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.show.value == "0") {
    alert("Please select a show.");
    theForm.show.focus();
    return (false);
  }
  if (theForm.rego.value == "") {
    alert("Please enter your exhibit registration number.");
    theForm.rego.focus();
    return (false);
  }    
  if (theForm.exhibitname.value == "") {
    alert("Please enter your exhibit name/title.");
    theForm.exhibitname.focus();
    return (false);
  }   
  if (theForm.toclass.value == ""
   && theForm.fromclass.value == ""  
   && theForm.toexhibitname.value == ""
   && theForm.toowner.value == "") {
    alert("At least one change must be entered.");
    theForm.toclass.focus();
    return (false);
  }   
  if (theForm.toclass.value != ""
   && theForm.fromclass.value == "") {
    alert("Please advise from class value if entering to class.");
    theForm.toclass.focus();
    return (false);
  }     
  if (theForm.fromclass.value != ""
   && theForm.toclass.value == "") {
    alert("Please advise to class value if entering from class.");
    theForm.toclass.focus();
    return (false);
  }       
  return (true);
}
