function FormValidator(theForm)
{
  if (theForm.sltLocations.selectedIndex < 0)
  {
    alert("Please select one of the \"Locations\" options.");
    theForm.sltLocations.focus();
    return (false);
  }

  if (theForm.sltLocations.selectedIndex == 0)
  {
    alert("The first \"Locations\" option is not a valid selection.  Please choose one of the other options.");
    theForm.sltLocations.focus();
    return (false);
  }

  if (theForm.sltTerminals.selectedIndex == 0)
  {
    alert("The first \"Terminals\" option is not a valid selection.  Please choose one of the other options.");
    theForm.sltTerminals.focus();
    return (false);
  }

  if (theForm.txtareaComments.value.length > 250)
  {
    alert("Please enter at most 250 characters in the \"Comments\" field.");
    theForm.txtareaComments.focus();
    return (false);
  }

  if (theForm.txtNameFirst.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.txtNameFirst.focus();
    return (false);
  }

  if (theForm.txtNameFirst.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"First Name\" field.");
    theForm.txtNameFirst.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'- \t\r\n\f";
  var checkStr = theForm.txtNameFirst.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, whitespace and \"'-\" characters in the \"First Name\" field.");
    theForm.txtNameFirst.focus();
    return (false);
  }

  if (theForm.txtNameLast.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.txtNameLast.focus();
    return (false);
  }

  if (theForm.txtNameLast.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Last Name\" field.");
    theForm.txtNameLast.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'- \t\r\n\f";
  var checkStr = theForm.txtNameLast.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, whitespace and \"'-\" characters in the \"Last Name\" field.");
    theForm.txtNameLast.focus();
    return (false);
  }

  if (theForm.txtStoreName.value == "")
  {
    alert("Please enter a value for the \"Store Name\" field.");
    theForm.txtStoreName.focus();
    return (false);
  }

  if (theForm.txtStoreName.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Store Name\" field.");
    theForm.txtStoreName.focus();
    return (false);
  }

  if (theForm.txtPostal.value == "")
  {
    alert("Please enter a value for the \"Postal Code\" field.");
    theForm.txtPostal.focus();
    return (false);
  }

  if (theForm.txtPostal.value.length > 20)
  {
    alert("Please enter at most 20 characters in the \"Postal Code\" field.");
    theForm.txtPostal.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-- \t\r\n\f";
  var checkStr = theForm.txtPostal.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 \"Postal Code\" field.");
    theForm.txtPostal.focus();
    return (false);
  }

  if (theForm.txtCountry.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Country\" field.");
    theForm.txtCountry.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ':, \t\r\n\f";
  var checkStr = theForm.txtCountry.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, whitespace and \"':,\" characters in the \"Country\" field.");
    theForm.txtCountry.focus();
    return (false);
  }

  if (theForm.txtPhone.value == "")
  {
    alert("Please enter a value for the \"Telephone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  if (theForm.txtPhone.value.length > 20)
  {
    alert("Please enter at most 20 characters in the \"Telephone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  var checkOK = "0123456789--()+ \t\r\n\f";
  var checkStr = theForm.txtPhone.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 digit, whitespace and \"-()+\" characters in the \"Telephone\" field.");
    theForm.txtPhone.focus();
    return (false);
  }

  if (theForm.txtFax.value.length > 20)
  {
    alert("Please enter at most 20 characters in the \"Fax\" field.");
    theForm.txtFax.focus();
    return (false);
  }

  var checkOK = "0123456789--()+ \t\r\n\f";
  var checkStr = theForm.txtFax.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 digit, whitespace and \"-()+\" characters in the \"Fax\" field.");
    theForm.txtFax.focus();
    return (false);
  }
  return (true);
}
