// REMEMBER TO SAVE ANY CHANGES IN BOTH MAIN NWSI SITE AND EQUITY COMPENSATION EDUCATION SITE

function validateForm(theForm)
{

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

  if (theForm.txtFirstName.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"First Name\" field.");
    theForm.txtFirstName.focus();
    return (false);
  }

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

  if (theForm.txtLastName.value.length > 50)
  {
    alert("Please enter at most 50 characters in the \"Last Name\" field.");
    theForm.txtLastName.focus();
    return (false);
  }

  if (theForm.drpTypePerson.selectedIndex < 0)
  {
    alert("Please select one of the \"What best describes your role?\" options.");
    theForm.drpHearAboutUs.focus();
    return (false);
  }

  if (theForm.drpTypePerson.selectedIndex == 0)
  {
    alert("The first \"What best describes your role?\" option is not a valid selection.  Please choose one of the other options.");
    theForm.drpHearAboutUs.focus();
    return (false);
  }

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

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

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

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

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

  if (theForm.txtEmail.value.length > 100)
  {
    alert("Please enter at most 100 characters in the \"Email Address\" field.");
    theForm.txtEmail.focus();
    return (false);
  }

  if (theForm.drpHearAboutUs.selectedIndex < 0)
  {
    alert("Please select one of the \"How did you hear about us?\" options.");
    theForm.drpHearAboutUs.focus();
    return (false);
  }

  if (theForm.drpHearAboutUs.selectedIndex == 0)
  {
    alert("The first \"How did you hear about us?\" option is not a valid selection.  Please choose one of the other options.");
    theForm.drpHearAboutUs.focus();
    return (false);
  }
 if (theForm.txtPosition.value == "")
  {
    alert("Please enter a value for the \"Position\" field.");
    theForm.txtPosition.focus();
    return (false);
  }
    if (theForm.txtAddress.value == "")
  {
    alert("Please enter a value for the \"Address\" field.");
    theForm.txtAddress.focus();
    return (false);
  }
      if (theForm.txtCity.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.txtCity.focus();
    return (false);
  }
        if (theForm.txtState.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.txtState.focus();
    return (false);
  }
          if (theForm.txtZip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.txtZip.focus();
    return (false);
  }
  return (true);
}
