//**************************************************************
// Javascript:  checklist.js
//**************************************************************

function ValidateForm()
{
  if (document.checklist.TeamContact.value == "")
  {
    alert("Please enter the Team Contact");
    document.checklist.TeamContact.focus();
  }
  else if (document.checklist.Phone.value == "")
  {
    alert("Please enter the Phone Number");
    document.checklist.Phone.focus();
  }
  else if (document.checklist.Fax.value == "")
  {
    alert("Please enter the Fax Number");
    document.checklist.Fax.focus();
  }
  else if (document.checklist.Address.value == "")
  {
    alert("Please enter the Address");
    document.checklist.Address.focus();
  }
  else if (document.checklist.Email.value == "")
  {
    alert("Please enter the Email");
    document.checklist.Email.focus();
  }
  else if (document.checklist.CalContact.value == "")
  {
    alert("Please enter the Calgary Contact");
    document.checklist.CalContact.focus();
  }
  else if (document.checklist.CellPhone.value == "")
  {
    alert("Please enter the Cell Phone Number");
    document.checklist.CellPhone.focus();
  }
  else if (document.checklist.HotelCampsite.value == "")
  {
    alert("Please enter the hotel will your team be staying at");
    document.checklist.HotelCampsite.focus();
  }
  else if (document.checklist.Booked.value == "")
  {
    alert("Please enter the Number of rooms booked");
    document.checklist.Booked.focus();
  }
  else if ((document.checklist.TeamRoster[0].checked == false) && (document.checklist.TeamRoster[1].checked == false))
  {
    alert("Please check Have you included the Team roster");
    document.checklist.TeamRoster[1].focus();
  }
  else if ((document.checklist.TeamLogo[0].checked == false) && (document.checklist.TeamLogo[1].checked == false))
  {
    alert("Please check Have you included the Team Logo");
    document.checklist.TeamLogo[1].focus();
  }
  else if ((document.checklist.TeamInsurance[0].checked == false) && (document.checklist.TeamInsurance[1].checked == false))
  {
    alert("Please check Have you included the Team Insurance");
    document.checklist.TeamInsurance[1].focus();
  }
  else if ((document.checklist.TournamentApplication[0].checked == false) && (document.checklist.TournamentApplication[1].checked == false))
  {
    alert("Please check Have you sent the Team Application");
    document.checklist.TournamentApplication[1].focus();
  }
  else if ((document.checklist.FirstAidKit[0].checked == false) && (document.checklist.FirstAidKit[1].checked == false))
  {
    alert("Please check Have you have a First Aid Kit");
    document.checklist.FirstAidKit[1].focus();
  }
  else if (document.checklist.FirstAider.value == "")
  {
    alert("Please enter the First Aider's Name");
    document.checklist.FirstAider.focus();
  }
  else if (document.checklist.Signed.value == "")
  {
    alert("Please enter the Name of the Signing person");
    document.checklist.Signed.focus();
  }
  else if (document.checklist.Title.value == "")
  {
    alert("Please enter the Title of the Signed person");
    document.checklist.Title.focus();
  }
  else
  {
    //change submit button to inform the user that the form is being sent
    document.checklist.submitbutton.value = " Sending... ";

    //while the form is being submitted, disable both the submit and reset buttons
    document.checklist.submitbutton.disabled = true;
    document.checklist.resetbutton.disabled = true;

    document.checklist.submit();
  }
}

