function FrontPage_Form1_Validator(theForm)

{



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

  {

    alert("Please enter your name.");

    theForm.FullName.focus();

    return (false);

  }





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

  {

    alert("Please enter your Email address");

    theForm.Email.focus();

    return (false);

  }



  if (theForm.Email.value.length < 6)

  {

    alert("The Email address you entered is invalid");

    theForm.Email.focus();

    return (false);

  }



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

  var checkStr = theForm.Email.value;

  var allValid = true;

  var validGroups = true;

  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, digit and \"@_-.\" characters in the Email field.");

    theForm.Email.focus();

    return (false);

  }

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

  {

    alert("Please confirm your Email address");

    theForm.ConfirmEmail.focus();

    return (false);

  }



  if (theForm.ConfirmEmail.value.length < 6)

  {

    alert("The Email address you entered is invalid");

    theForm.ConfirmEmail.focus();

    return (false);

  }



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

  var checkStr = theForm.ConfirmEmail.value;

  var allValid = true;

  var validGroups = true;

  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, digit and \"@_-.\" characters in the Email field.");

    theForm.ConfirmEmail.focus();

    return (false);

  }

  if (theForm.ConfirmEmail.value != theForm.Email.value)

  {

    alert("Your Email addresses do not match");

    theForm.ConfirmEmail.focus();

    return (false);

  }

  

  if (theForm.RequestedDateDay)

{

  if (theForm.RequestedDateDay.selectedIndex == 0 || theForm.RequestedDateDay.selectedIndex == 1)

  {

    alert("The \"Requested Date Day\" is not a  valid selection");

    document.forms.form.RequestedDateDay.focus();

    return (false);

  }

    if (theForm.RequestedDateMonth.selectedIndex == 0 || theForm.RequestedDateMonth.selectedIndex == 1)

  {

    alert("The \"Requested Date Month\" is not a  valid selection");

    document.forms.form.RequestedDateMonth.focus();

    return (false);

  }

      if (theForm.RequestedDateYear.selectedIndex == 0 || theForm.RequestedDateYear.selectedIndex == 1)

  {

    alert("The \"Requested Date Year\" is not a  valid selection");

    document.forms.form.RequestedDateYear.focus();

    return (false);

  }

}



  if (theForm.AlternativeDateDay)

{

    if (theForm.AlternativeDateDay.selectedIndex == 0 || theForm.AlternativeDateDay.selectedIndex == 1)

  {

    alert("The \"Departure Day\" is not a  valid selection");

    document.forms.form.AlternativeDateDay.focus();

    return (false);

  }

    if (theForm.AlternativeDateMonth.selectedIndex == 0 || theForm.AlternativeDateMonth.selectedIndex == 1)

  {

    alert("The \"Alternative Date Month\" is not a  valid selection");

    document.forms.form.AlternativeDateMonth.focus();

    return (false);

  }

      if (theForm.AlternativeDateYear.selectedIndex == 0 || theForm.AlternativeDateYear.selectedIndex == 1)

  {

    alert("The \"Alternative Date Year\" is not a  valid selection");

    document.forms.form.AlternativeDateYear.focus();

    return (false);

  }

}

  

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

  {

    alert("Please enter the red number");

    theForm.SpamCheck.focus();

    return (false);

  }

  

  return (true);

}


