<!--

function validateForm() { 

  var okSoFar=true //-- Changes to false when bad field found.
  
  //-- Check the firstName field, reject if blank.
  if (document.ennisForm.firstName.value=="") {
    okSoFar=false
    alert("Please fill in the First Name field.")
    document.ennisForm.firstName.focus()
  }
  
  //-- Check the lastName field, reject if blank.
  if (document.ennisForm.lastName.value=="") {
    okSoFar=false
    alert("Please fill in the Last Name field.")
    document.ennisForm.lastName.focus()
  }
  
    //-- Check the address1 field, reject if blank.
  if (document.ennisForm.address1.value=="") {
    okSoFar=false
    alert("Please fill in the Address 1 field.")
    document.ennisForm.address1.focus()
  }
  
      //-- Check the city field, reject if blank.
  if (document.ennisForm.city.value=="") {
    okSoFar=false
    alert("Please fill in the City field.")
    document.ennisForm.city.focus()
  }
  
      //-- Check the state field, reject if still set to Select.
  if (document.ennisForm.state.value=="- Select -") {
    okSoFar=false
    alert("Please fill in the State/Province field.")
    document.ennisForm.state.focus()
  }
  
      //-- Check the zipcode field, reject if blank.
  if (document.ennisForm.zipcode.value=="") {
    okSoFar=false
    alert("Please fill in the Zip/Postal code field.")
    document.ennisForm.zipcode.focus()
  }
  
        //-- Check the phone field, reject if blank.
  if (document.ennisForm.day_phone.value=="") {
    okSoFar=false
    alert("Please fill in the Daytime Phone field.")
    document.ennisForm.day_phone.focus()
  }
  
          //-- Check the phone field, reject if blank.
  if (document.ennisForm.eve_phone.value=="") {
    okSoFar=false
    alert("Please fill in the Evening Phone field.")
    document.ennisForm.eve_phone.focus()
  }
  

  //-- Reject Email address if it doesn't contain an @ character.
  var foundAt = document.ennisForm.email.value.indexOf("@",0)
  if (foundAt < 1 && okSoFar) {
    okSoFar=false
    alert ("Email address does not appear to be valid. Please check again.")
    document.ennisForm.email.focus()
  }
  
  
  //-- Check the Contact Preference field, reject if still set to Select.
  if (document.ennisForm.contact_preference.value=="- Select -") {
    okSoFar=false
    alert("Please select a preference for us to contact you.")
    document.ennisForm.contact_preference.focus()
  }
  

 //-- Check the Arrival Month field, reject if still set to Month.  
  if (document.ennisForm.arrivalDate[0].value=="Month") {
    okSoFar=false
    alert("Please make sure your Arrival Month is selected.")
  }
  
   //-- Check the Arrival Day field, reject if still set to Day.  
  if (document.ennisForm.arrivalDate[1].value=="Day") {
    okSoFar=false
    alert("Please make sure your Arrival Day is selected.")
  }
  
   //-- Check the Arrival Year field, reject if still set to Year.  
  if (document.ennisForm.arrivalDate[2].value=="Year") {
    okSoFar=false
    alert("Please make sure your Arrival Year is selected.")
  }
  

 //-- Check the Departure Month field, reject if still set to Month.  
  if (document.ennisForm.departureDate[0].value=="Month") {
    okSoFar=false
    alert("Please make sure your Departure Month is selected.")
  }
  
   //-- Check the Departure Day field, reject if still set to Day.  
  if (document.ennisForm.departureDate[1].value=="Day") {
    okSoFar=false
    alert("Please make sure your Departure Day is selected.")
  }
  
   //-- Check the Departure Year field, reject if still set to Year.  
  if (document.ennisForm.departureDate[2].value=="Year") {
    okSoFar=false
    alert("Please make sure your Departure Year is selected.")
  }
  
/*    //-- Check the Lodging Cabins field, reject if set to blank.  
  if (document.ennisForm.lodging_cabins.value=="- Select -") {
    okSoFar=false
    alert("Please select the number of cabins to reserve.")
    document.ennisForm.lodging_cabins.focus()
  }
  
      //-- Check the Lodging Homestead field, reject if set to blank.  
  if (document.ennisForm.lodging_homestead.value=="- Select -") {
    okSoFar=false
    alert("Please select the number of homesteads to reserve.")
    document.ennisForm.lodging_homestead.focus()
  }
  
        //-- Check the Lodging Homestead field, reject if set to blank.  
  if ((document.ennisForm.lodging_homestead.value=="0 homestead") && (document.ennisForm.lodging_cabins.value=="0 cabins")) {
    okSoFar=false
    alert("Please select the number of cabins or homesteads to reserve.")
  }
  
  */
  
    //-- Check the phone field, reject if blank.
  if (document.ennisForm.num_of_people.value=="") {
    okSoFar=false
    alert("Please fill in the # of people field.")
    document.ennisForm.num_of_people.focus()
  }


  //-- If all fields OK, submit the form and put up a message.
  if (okSoFar==true) {
  
  // alert(arrival_date+'\n'+departure_date)
  document.ennisForm.submit();
  
}
}



// -->
