<!--
function FrontPage_Form1_Validator(theForm)
{
// NAME
  if (theForm.fromName.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.fromName.focus();
    return (false);
  }
  if (theForm.fromName.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"name\" field.");
    theForm.fromName.focus();
    return (false);
  }
  if (theForm.fromName.value.length > 20)
  {
    alert("Please enter no more than 20 characters in the \"name\" field.");
    theForm.fromName.focus();
    return (false);
  }
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz \t\r\n\f";
  var checkStr = theForm.fromName.value;
  var allValid = true;
  var validGroups = true;
  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 (!allValid)
  {
    alert("Please enter only letters, digits and or whitespace in the \"name\" field.");
    theForm.fromName.focus();
    return (false);
  }

// EMAIL
  if (theForm.fromEmail.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.fromEmail.focus();
    return (false);
  }

  if (-1 == theForm.fromEmail.value.indexOf("@")) 
  { 
    theForm.fromEmail.focus(); 
    alert("Your email must have a '@'."); 
    return false; 
  }

  if (theForm.fromEmail.value.length ==
     (theForm.fromEmail.value.indexOf("@")+1) ) 
   {
       theForm.fromEmail.focus();
       alert("Your email must have a domain name after the '@'.");
       return false;
    }
       
  if (theForm.fromEmail.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"email\" field.");
    theForm.fromEmail.focus();
    return (false);
  }
  if (theForm.fromEmail.value.length > 40)
  {
    alert("Please enter no more than 40 characters in the \"email\" field.");
    theForm.fromEmail.focus();
    return (false);
  }
  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@. \t\r\n\f";
  var checkStr = theForm.fromEmail.value;
  var allValid = true;
  var validGroups = true;
  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 (!allValid)
  {
    alert("Please enter only letters, digits in the \"email\" field.");
    theForm.fromEmail.focus();
    return (false);
  }
  
  // TELE
  if (theForm.fromTelephone.value == "")
  {
    alert("Please enter a value for the \"telephone\" field.");
    theForm.fromTelephone.focus();
    return (false);
  }
  if (theForm.fromTelephone.length < 10)
  {
    alert("Please enter at least 10 characters in the \"telephone\" field.");
    theForm.fromTelephone.focus();
    return (false);
  }
  if (theForm.fromTelephone.length > 20)
  {
    alert("Please enter no more than 15 characters in the \"telephone\" field.");
    theForm.fromTelephone.focus();
    return (false);
  }
  var checkOK = "0123456789-(). \t\r\n\f";
  var checkStr = theForm.fromTelephone.value;
  var allValid = true;
  var validGroups = true;
  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 (!allValid)
  {
    alert("Please enter only digits in the \"telephone\" field.");
    theForm.fromTelephone.focus();
    return (false);
  }

  return (true);
}
//-->
