function FrontPage_Form1_Validator(theForm)
{

  if (theForm.Carrier.value == "")
  {
    alert("Please enter a value for the \"Airline\" field.");
    theForm.Carrier.focus();
    return (false);
  }

  if (theForm.Carrier.value.length < 2)
  {
    alert("Please enter at least 2 characters in the \"Airline\" field.");
    theForm.Carrier.focus();
    return (false);
  }

  if (theForm.Carrier.value.length > 2)
  {
    alert("Please enter at most 2 characters in the \"Airline\" field.");
    theForm.Carrier.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-";
  var checkStr = theForm.Carrier.value;
  var allValid = true;
  var i;
  var ch;
  var j;

  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 and digit characters in the \"Airline\" field.");
    theForm.Carrier.focus();
    return (false);
  }

  if (theForm.Pfx.value == "")
  {
    alert("Please enter a value for the \"Prefix\" field.");
    theForm.Pfx.focus();
    return (false);
  }

  if (theForm.Pfx.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"Prefix\" field.");
    theForm.Pfx.focus();
    return (false);
  }

  if (theForm.Pfx.value.length > 3)
  {
    alert("Please enter at most 3 characters in the \"Prefix\" field.");
    theForm.Pfx.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.Pfx.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 if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"Prefix\" field.");
    theForm.Pfx.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Pfx\" field.");
    theForm.Pfx.focus();
    return (false);
  }

  if (theForm.Shipment.value == "")
  {
    alert("Please enter a value for the \"AWB number\" field.");
    theForm.Shipment.focus();
    return (false);
  }

  if (theForm.Shipment.value.length < 8)
  {
    alert("Please enter at least 8 characters in the \"AWB number\" field.");
    theForm.Shipment.focus();
    return (false);
  }

  if (theForm.Shipment.value.length > 8)
  {
    alert("Please enter at most 8 characters in the \"AWB number\" field.");
    theForm.Shipment.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.Shipment.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 if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"AWB number\" field.");
    theForm.Shipment.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"Shipment\" field.");
    theForm.Shipment.focus();
    return (false);
  }
  return (true);
}
