function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Customer.value == "")
  {
    alert("Please enter a value for the \"Customer\" field.");
    theForm.Customer.focus();
    return (false);
  }

  if (theForm.Customer.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Customer\" field.");
    theForm.Customer.focus();
    return (false);
  }

  if (theForm.Customer.value.length > 6)
  {
    alert("Please enter at most 6 characters in the \"Customer\" field.");
    theForm.Customer.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-& \t\r\n\f";
  var checkStr = theForm.Customer.value;
  var allValid = 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 letter, digit, whitespace and \"&\" characters in the \"Customer\" field.");
    theForm.Customer.focus();
    return (false);
  }

  if (theForm.Password.value == "")
  {
    alert("Please enter a value for the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }

  if (theForm.Password.value.length < 6)
  {
    alert("Please enter at least 6 characters in the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }

  if (theForm.Password.value.length > 6)
  {
    alert("Please enter at most 6 characters in the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.Password.value;
  var allValid = 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 += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Password\" field.");
    theForm.Password.focus();
    return (false);
  }
  return (true);
}
