// JavaScript Document
<!--
function warrantyFormValidator(theForm)
{

  if (theForm.fname.value == "")
  {
    alert("Please enter a value for the \"fname\" field.");
    theForm.fname.focus();
    return (false);
  }

  if (theForm.fname.value.length < 1)
  {
    alert("Please enter at least 1 characters in the \"fname\" field.");
    theForm.fname.focus();
    return (false);
  }

  if (theForm.fname.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"fname\" field.");
    theForm.fname.focus();
    return (false);
  }


  if (theForm.lname.value == "")
  {
    alert("Please enter a value for the \"lname\" field.");
    theForm.lname.focus();
    return (false);
  }


  if (theForm.address1.value == "")
  {
    alert("Please enter a value for the \"address1\" field.");
    theForm.address1.focus();
    return (false);
  }


  if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }



  if (theForm.state_prov.selectedIndex < 0)
  {
    alert("Please select one of the \"state_prov\" options.");
    theForm.state_prov.focus();
    return (false);
  }

  if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.zip.value.length < 5)
  {
    alert("Please enter at least 5 characters in the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }

  if (theForm.zip.value.length > 10)
  {
    alert("Please enter at most 10 characters in the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }


  if (theForm.country.selectedIndex < 0)
  {
    alert("Please select one of the \"Country\" options.");
    theForm.country.focus();
    return (false);
  }

  if (theForm.date_of_purchase.value == "")
  {
    alert("Please enter a value for the \"Date of Purchase\" field.");
    theForm.date_of_purchase.focus();
    return (false);
  }

  if (theForm.model.selectedIndex < 0)
  {
    alert("Please select one of the \"model\" options.");
    theForm.model.focus();
    return (false);
  }

  if (theForm.model.selectedIndex == 0)
  {
    alert("The first \"model\" option is not a valid selection.  Please choose one of the other options.");
    theForm.model.focus();
    return (false);
  }
  return (true);
}
//-->