function FormValidator(theForm)
{
  
  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }
  if (theForm.address1.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.address1.focus();
    return (false);
  }
  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.city.focus();
    return (false);
  }
  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }
  if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.zip.focus();
    return (false);
  }
  if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.state.focus();
    return (false);
  }
  
  var FmtStr="";
  var index = 0;
  var LimitCheck;
  var checkStr = theForm.phone.value;
  LimitCheck = checkStr.length;
  while (index != LimitCheck)
  {
   if (isNaN(parseInt(checkStr.charAt(index))))
    { }
   else
    { FmtStr = FmtStr + checkStr.charAt(index); }
   index = index + 1;
  }
  if (FmtStr.length != 10)
  {
    alert("Error - Phone ... U.S. phone numbers have exactly ten digits.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.fax.value != "")
  {
  var FmtStr="";
  var index = 0;
  var LimitCheck;
  var checkStr = theForm.fax.value;
  LimitCheck = checkStr.length;
  while (index != LimitCheck)
  {
   if (isNaN(parseInt(checkStr.charAt(index))))
    { }
   else
    { FmtStr = FmtStr + checkStr.charAt(index); }
   index = index + 1;
  }
  if (FmtStr.length != 10)
  {
    alert("Error - Fax ... U.S. phone numbers have exactly ten digits.");
    theForm.fax.focus();
    return (false);
  }
  
  }
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }
  
  return (true);
}
