//******************************

// Validate Form (Language="Javascript" Type="text/javascript)

//******************************

function FrontPage_Form1_Validator(theForm)

{



  if (theForm.phone.value == "")

  {

    alert("Please enter a value for the \"PHONE\" field.");

    theForm.phone.focus();

    return (false);

  }



else



  if (theForm.email.value == "")

  {

    alert("Please enter a value for the \"EMAIL\" field.");

    theForm.email.focus();

    return (false);

  }



else



  if (theForm.position.selectedIndex < 0)

  {

    alert("Please select one of the \"position\" options.");

    theForm.position.focus();

    return (false);

  }



  var numSelected = 0;

  var i;

  for (i = 0;  i < theForm.position.length;  i++)

  {

    if (theForm.position.options[i].selected)

        numSelected++;

  }

  if (numSelected < 1)

  {

    alert("Please select at least 1 of the \"position\" options.");

    theForm.position.focus();

    return (false);

  }



  if (numSelected > 5)

  {

    alert("Please select at most 5 of the \"position\" options.");

    theForm.position.focus();

    return (false);

  }

 

return (true);



}
