function FrontPage_Form1_Validator(theForm)
{
document.getElementById("pagetitle").value = document.title

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length > 30)
  {
    alert("Please enter at most 30 characters in the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }


  var checkOK = "0123456789- ";
  var checkStr = theForm.phone.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != " ")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Telephone\" field.");
    theForm.phone.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.findsite.selectedIndex < 0)
  {
    alert("Please select one of the \"How did you find our site\" options.");
    theForm.findsite.focus();
    return (false);
  }

  if (theForm.findsite.selectedIndex == 0)
  {
    alert("The first \"How did you find our site\" option is not a valid selection.  Please choose one of the other options.");
    theForm.findsite.focus();
    return (false);
  }

  if (theForm.comments.value == "")
  {
    alert("Please enter a value for the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  if (theForm.comments.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  if (theForm.comments.value.length > 500)
  {
    alert("Please enter at most 500 characters in the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }

  if (theForm.sum.value != 3)
  {
    alert("Sum incorrect!.");
    theForm.sum.focus();
    return (false);
  }

  return (true);
}


