
function FrontPage_Form1_Validator(theForm)
{


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

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

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

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

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

  if (theForm.zip.length > 12)
  {
    alert("Please enter at most 12 characters in the \"ZipCode\" field.");
    theForm.zip.focus();
    return (false);
  }

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

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

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

  if (theForm.payment.selectedIndex == 0)
  {
    alert("The first \"Payment\" option is not a valid selection.  Please choose one of the other options.");
    theForm.payment.focus();
    return (false);
  }

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

  if (theForm.dateneeded.value.length > 8)
  {
    alert("Please enter at most 8 characters in the \"Date_Needed\" field.");
    theForm.dateneeded.focus();
    return (false);
  }
  
    if (theForm.cc_number.value.length < 15)
  {
    alert("Please enter a valid credit card number.");
    theForm.cc_number.focus();
    return (false);
  }
  
    if (theForm.mealservice.selectedIndex == "")
  {
    alert("Please enter a value for the \"Meal_Service\" field.");
    theForm.mealservice.focus();
    return (false);
  }
  return (true);
}

