<!--
function Form1_Validator(theForm)
{

  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.name.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"name\" field.");
    theForm.name.focus();
    return (false);
  }


  if (theForm.email.value == "")
  {
    alert("Please enter an email address in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length < 7)
  {
    alert("Please enter a valid email address in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 70)
  {
    alert("Please enter at most 70 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-@_.";
  var checkStr = theForm.email.value;
  var allValid = true;
  var atfound = false;
  var ati = 0;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        {      
        if (ch == "@" && i < checkStr.length - 5)
           {
           ati = i
           break;
           }
           else {   
                if (ati > 0 && ch == "." && i > ati + 2 && i < checkStr.length - 2)
                   {
                   atfound=true
                   break;
                   }
		   else {    
                         break;
                         }

                }
        }                
    if (j == checkOK.length)
       {
       allValid = false;
       break;
       }
  }

  if (!allValid)
  {
    alert("Please enter only letter, digit and \"-@_.\" characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!atfound)
  {
    alert("Please enter a valid email address in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.body.value == "")
  {
    alert("Please enter a value for the \"body\" field.");
    theForm.body.focus();
    return (false);
  }

  if (theForm.body.value.length < 10)
  {
    alert("Please enter at least 10 characters in the \"body\" field.");
    theForm.body.focus();
    return (false);
  }
  return (true);
}
//-->

