<!--Hide
function validEmail(email) {       				 //VALIDATION OF FORM
	invalidChars = " /:,;"

	if (email == "") {							// Must be filled in
		return false
	}
	for (i=0; i<invalidChars.length; i++) {		// Check to see if it contains illegal characters
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0)> -1) {
			return false
		}
	}
	atPos = email.indexOf("@",1)				// There must be one "@" symbol
	if (atPos == -1) {
		return false
	}
	if (email.indexOf("@",atPos+1) != -1) {		// And only one "@" symbol
		return false
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {						// And at least one "." after the "@"
		return false
	}
	if (periodPos+3> email.length)	{			// Must be at least 2 characters after the "."
		return false
	}
	return true;
	
}
function valrezform(form){

whatReason = form.Reason.selectedIndex;
whatState = form.State.selectedIndex;
whatADOW = form.Arrival_Day_Of_Week.selectedIndex;
whatAM = form.Arrival_Month.selectedIndex;
whatAD = form.Arrival_Day.selectedIndex;
whatAY = form.Arrival_Year.selectedIndex;
whatDDOW = form.Departure_Day_Of_Week.selectedIndex;
whatDM = form.Departure_Month.selectedIndex;
whatDD = form.Departure_Day.selectedIndex;
whatDY = form.Departure_Year.selectedIndex;
whatPrefix = form.Prefix.selectedIndex;
whatNA = form.Number_Of_Adults.selectedIndex;
whatNC = form.Number_Of_Children.selectedIndex;
whatACCOMM = form.Accommodation_Requested.selectedIndex;

     if (form.Prefix.options[whatPrefix].value == "") {
             alert("Please enter the closest appropriate name prefix.  Thank you.");
             form.Prefix.focus();       
             return false;
             }
             
    else if (form.Reason.options[whatReason].value == "") {
             alert("Please indicate the reason that you are contacting us.  Thank you.");
             form.Reason.focus();
             return false;
             }        
     
     else if (form.First_Name.value == "") {
            alert("Please enter your first name.  Thank you.");
            form.First_Name.focus();
            return false;
            }
     else if (form.Last_Name.value == "") {
              alert("Please enter your last name.  Thank you.");
              form.Last_Name.focus();
              return false;
              }
     else if (form.Address.value == "") {
              alert("Please enter your mailing address.  Thank you.");
              form.Address.focus();
              return false;
              }
     else if (form.City.value == "") {
              alert("Please enter your city.  Thank you.");
              form.City.focus();
              return false;
              }
             
     else if (form.State.options[whatState].value == "") {
             alert("Please enter your state. If you are not from the United States or Canada, then select 'Not US or Canada' from the option list.  Thank you.");
             form.State.focus();
             return false;
             }        
     else if (form.Country.value == "") {
              alert("Please enter your province and / or country.  Thank you.");
              form.Country.focus();
              return false;
              }
     else if (form.Zip_Or_Postal_Code.value == "") {
              alert("Please enter your zip code or postal code.  Thank you.");
              form.Zip_Or_Postal_Code.focus();
              return false;
              }
     else if (!validEmail(form.email.value)) {
		alert("Please enter your valid e-mail address for us to contact you about your reservation request. Thank you");
		form.email.focus();
		return false;
		}		
     else  if (form.Telephone_Number.value == "") {
              alert("Please provide a telephone number so that we may contact you about your reservation request.  Thank you.");
              form.Telephone_Number.focus();
              return false;
              }
   
     else if (form.Accommodation_Requested.options[whatACCOMM].value == "") {
              alert("Please enter the type of accommodations that you would like to reserve.  Thank you.");
              form.Accommodation_Requested.focus();
              return false;
             }
                  
     else if (form.Arrival_Day_Of_Week.options[whatADOW].value == "") {
             alert("Please enter the day of the week that you wish to arrive at Sleepytown Motel and Cottages.  Thank you.");
             form.Arrival_Day_Of_Week.focus();
             return false;
             }
             
      else if (form.Arrival_Month.options[whatAM].value == "") {
             alert("Please enter the month that you wish to arrive at Sleepytown Motel and Cottages.  Thank you.");
             form.Arrival_Month.focus();
             return false;
             }                 
             
     else if (form.Arrival_Day.options[whatAD].value == "") {
	     alert("Please enter the day of the month that you wish to arrive at Sleepytown Motel and Cottages.  Thank you.");
	     form.Arrival_Day.focus();
	     return false;
             }        
             
     else if (form.Arrival_Year.options[whatAY].value == "") {
    	     alert("Please enter the year that you wish to arrive at Sleepytown Motel and Cottages.  Thank you.");
    	     form.Arrival_Year.focus();
    	     return false;
             }        
             
     else if (form.Departure_Day_Of_Week.options[whatDDOW].value == "") {
             alert("Please enter the day of the week that you wish to depart from Sleepytown Motel and Cottages.  Thank you.");
             form.Departure_Day_Of_Week.focus();
             return false;
             }
                   
     else if (form.Departure_Month.options[whatDM].value == "") {
             alert("Please enter the month that you wish to depart from Sleepytown Motel and Cottages.  Thank you.");
             form.Departure_Month.focus();
             return false;
             }                 
                   
     else if (form.Departure_Day.options[whatDD].value == "") {
             alert("Please enter the day of the month that you wish to depart from Sleepytown Motel and Cottages.  Thank you.");
      	     form.Departure_Day.focus();
      	     return false;
                   }        
                   
     else if (form.Departure_Year.options[whatDY].value == "") {
             alert("Please enter the year that you wish to depart from Sleepytown Motel and Cottages.  Thank you.");
              form.Departure_Year.focus();
              return false;
             }
             
     else if (form.Number_Of_Adults.options[whatNA].value == "") {
             alert("Please enter the number of adults for your reservation.  Thank you.");
              form.Number_Of_Adults.focus();
              return false;
             }
             
     else if (form.Number_Of_Children.options[whatNC].value == "") {
             alert("Please enter the number of children for your reservation.  Select NONE for no children.  Thank you.");
              form.Number_Of_Children.focus();
              return false;
             }
      else if ((form.Ages_Of_Children.value == "") && (form.Number_Of_Children.options[whatNC].value == ""))   {
              alert("Please enter the ages of the children for your reservation.  Thank you.");
              form.Ages_Of_Children.focus();
              return false;
              }        
             
     customer = document.Form_Name.First_Name.value;
     message = customer + ", thank you for filling out our reservation request form. We will contact you as soon as possible about your request! Please do not click on the Send Your Request button again.  A confirmation message will appear shortly after you close this message box.  Thank you.";
     alert(message);
     return true;
    
   }
   
function confirmEmail()  {

var yesitis = "Is the e-mail address that you provided correct?\n\n" + document.Form_Name.email.value + "\n\nIf not, then click Cancel and please correct it. If it is correct, click OK and continue. Thank you.";


	if (document.Form_Name.email.value == "")
		{ 
		alert("You will need to first provide an e-mail address before you can confirm that it is your correct e-mail address.");
		 document.Form_Name.email.focus();
		 }
        else if (!validEmail(document.Form_Name.email.value))
        	{ 
        	alert("Please check your e-mail address again; it is not a valid e-mail address.");
        	document.Form_Name.email.focus();
        	}
        	
        else  {  
        
             if (!confirm(yesitis)) {
             	document.Form_Name.email.focus();
             	}
             	else {
             	alert("Great! An autoresponse with your data will be sent to that e-mail address once you send us your reservation request.");
             	}
             	
               
           
       }
    }
        	
        
		 
//End Hide-->