//**************************************************************
// Javascript:  application.js
//**************************************************************

function ValidateForm()
{
  if (document.application.AgeDivision.value == "")
  {
    alert("Please enter the Age Division");
    document.application.AgeDivision.focus();
  }
  else if (document.application.TeamName.value == "")
  {
    alert("Please enter the Team Name");
    document.application.TeamName.focus();
  }
  else if (document.application.ColorHome.value == "")
  {
    alert("Please enter the color of the home jerseys");
    document.application.ColorHome.focus();
  }
  else if (document.application.ColorAway.value == "")
  {
    alert("Please enter the color of the away jerseys");
    document.application.ColorAway.focus();
  }
  else if (document.application.MangerName.value == "")
  {
    alert("Please enter the Manger's Name");
    document.application.MangerName.focus();
  }
  else if (document.application.MailingAddress.value == "")
  {
    alert("Please enter the Mailing Address");
    document.application.MailingAddress.focus();
  }
  else if (document.application.City.value == "")
  {
    alert("Please enter the City");
    document.application.City.focus();
  }
  else if (document.application.ProvinceState.value == "")
  {
    alert("Please enter the Province or State");
    document.application.ProvinceState.focus();
  }
  else if (document.application.PostalCodeZip.value == "")
  {
    alert("Please enter the PostalCode or Zip");
    document.application.PostalCodeZip.focus();
  }
  else if (document.application.PhoneDay.value == "")
  {
    alert("Please enter the Day Phone Number");
    document.application.PhoneDay.focus();
  }
  else if (document.application.PhoneEvening.value == "")
  {
    alert("Please enter the Evening Phone Number");
    document.application.PhoneEvening.focus();
  }
  else if (document.application.Fax.value == "")
  {
    alert("Please enter the Fax Number");
    document.application.Fax.focus();
        }
  else if (document.application.Email.value == "")
  {
    alert("Please enter the Email address");
    document.application.Email.focus();
  }
  else if (document.application.CoachesName.value == "")
  {
    alert("Please enter the Coaches Name");
    document.application.CoachesName.focus();
  }
  else if (document.application.CoachesPhone.value == "")
  {
    alert("Please enter the Coaches Phone");
    document.application.CoachesPhone.focus();
  }
  else if (document.application.CoachesCell.value == "")
  {
    alert("Please enter the Coaches Cell");
    document.application.CoachesCell.focus();
  }
  else if (document.application.CoachesEmail.value == "")
  {
    alert("Please enter the Coaches Email");
    document.application.CoachesEmail.focus();
  }
  else if ((document.application.Logo[0].checked == false) && (document.application.Logo[1].checked == false))
  {
    alert("Please check Can you send a copy of your team logo?");
    document.application.Logo[1].focus();
  }
  else if (document.application.Hotel.checked == false)
  {
    alert("Please select a hotel");
    document.application.Hotel.focus();
  }
  else if (document.application.Arrival.value == "")
  {
    alert("Please enter your Arrival Date");
    document.application.Arrival.focus();
  }
  else if (document.application.Departure.value == "")
  {
    alert("Please enter your Departure Date");
    document.application.Departure.focus();
  }
  else if (document.application.Rooms.value == "")
  {
    alert("Please enter the number of rooms needed");
    document.application.Rooms.focus();
  }
  else if (document.application.TeamRep.value == "")
  {
    alert("Please enter the Team Represenative's Name");
    document.application.TeamRep.focus();
  }
  else if (document.application.RepTitle.value == "")
  {
    alert("Please enter the Represenative's Title");
    document.application.RepTitle.focus();
  }
  else
  {
    //change submit button to inform the user that the form is being sent
    document.application.submitbutton.value = " Sending... ";

    //while the form is being submitted, disable both the submit and reset buttons
    document.application.submitbutton.disabled = true;
    document.application.resetbutton.disabled = true;

    document.application.submit();
  }
}

