   function formValidator(theForm)  {
   
	  if (theForm.First_Name.value == "")  {
	    alert("Please enter a First Name.");
	    theForm.First_Name.focus();
	    return (false);
	  }

	  if (theForm.Last_Name.value == "")  {
	    alert("Please enter a Last Name.");
	    theForm.Last_Name.focus();
	    return (false);
	  }
	  
	  if (theForm.FormType.value == "contact")  {
		  if (theForm.Preferred_Contact_Method.value == "")  {
		    alert("Please enter a Preferred Method of Contact.");
		    theForm.Preferred_Contact_Method.focus();
		    return (false);
		  }

		  if (theForm.Preferred_Contact_Method.value == "Email" && theForm.Email.value == "")  {
		    alert("You have selected \"Email\" as your preferred method of contact. Please enter an email address we can use to contact you.");
		    theForm.Email.focus();
		    return (false);
		  }	  

		  if (theForm.Preferred_Contact_Method.value == "Phone" && theForm.Day_Phone.value == "" && theForm.Evening_Phone.value == "")  {
		    alert("You have selected \"Phone\" as your preferred method of contact. Please enter a Phone Number we can use to contact you.");
		    theForm.Day_Phone.focus();
		    return (false);
		  }	  

		  if (theForm.Preferred_Contact_Method.value == "USPS" && theForm.Address_1.value == "")  {
		    alert("You have selected \"US Postal Service\" as your preferred method of contact. Please enter an Address we can use to contact you.");
		    theForm.Address_1.focus();
		    return (false);
		  }

		  if (theForm.Preferred_Contact_Method.value == "USPS" && theForm.City.value == "")  {
		    alert("You have selected \"US Postal Service\" as your preferred method of contact. Please enter your City of Residence.");
		    theForm.City.focus();
		    return (false);
		  }

		  if (theForm.Preferred_Contact_Method.value == "USPS" && theForm.State.value == "")  {
		    alert("You have selected \"US Postal Service\" as your preferred method of contact. Please select your State of Residence.");
		    theForm.State.focus();
		    return (false);
		  }	  

		  if (theForm.Preferred_Contact_Method.value == "USPS" && theForm.ZipCode.value == "")  {
		    alert("You have selected \"US Postal Service\" as your preferred method of contact. Please enter a Zip Code we can use to contact you.");
		    theForm.ZipCode.focus();
		    return (false);
		  }

		  if (theForm.Comments.value == "")  {
		    alert("Please enter your Questions, Comments, or Requests.");
		    theForm.Comments.focus();
		    return (false);
		  }	
	  } // end if statement
	  	  
	  if (theForm.FormType.value == "mailingList" || (theForm.FormType.value == "contact" && theForm.Mailing_List.checked))  {
		  if (theForm.Email.value == "")  {
		    alert("Please enter an Email address.");
		    theForm.Email.focus();
		    return (false);
		  } // end if statement
	  
		  if (theForm.Address_1.value == "")  {
		    alert("To be added to our Mailing List, please enter your Postal Address.");
		    theForm.Address_1.focus();
		    return (false);
		  }

		  if (theForm.City.value == "")  {
		    alert("To be added to our Mailing List, please enter your City of Residence.");
		    theForm.City.focus();
		    return (false);
		  }

		  if (theForm.State.value == "")  {
		    alert("To be added to our Mailing List, please select your State of Residence.");
		    theForm.State.focus();
		    return (false);
		  }	  

		  if (theForm.ZipCode.value == "")  {
		    alert("To be added to our Mailing List, please enter your Zip Code.");
		    theForm.ZipCode.focus();
		    return (false);
		  }
	  } //end if statement
	  
	  if (theForm.ZipCode.value != "")  {
	     var zipCode = theForm.ZipCode.value;
	     
	     if (zipCode.length != 5 && zipCode.length != 10)  {
	     	alert("Please enter a valid Zip Code, entered in one of the following two formats: XXXXX or XXXXX-XXXX.");
		theForm.ZipCode.focus();
                return (false);
             } // end if statement

	     var checkOK = "0123456789";
	     var allValid = true;

	     for (i = 0;  i < zipCode.length;  i++)  {
	       ch = zipCode.charAt(i);
	       if (i != 5) {
	          for (j = 0;  j < checkOK.length;  j++)  {
	   	    if (ch == checkOK.charAt(j))
		      break;
	          }  //end for loop
	          if (j == checkOK.length)  {
		    allValid = false;
		    break;
	          }  //end if statement
	       } else {
	          if (ch != "-") {
		     allValid = false;
		     break;
	          }  // end if statement
	       }  //end if statement
	     }  //end for loop

	     if (!allValid) {
		alert("Please enter a valid Zip Code, entered in one of the following two formats: XXXXX or XXXXX-XXXX.");
		theForm.ZipCode.focus();
		return (false);
	     } //end if statement
	  }

	  return (true);
   }
   
function volunteerFormValidator(theForm)  {
   
	  if (theForm.Email.value == "")  {
		 alert("Please enter an Email address.");
		 theForm.Email.focus();
		 return (false);
	  } // end if statement

	  if (theForm.First_Name.value == "")  {
	    alert("Please enter a First Name.");
	    theForm.First_Name.focus();
	    return (false);
	  } // end if statement

	  if (theForm.Last_Name.value == "")  {
	    alert("Please enter a Last Name.");
	    theForm.Last_Name.focus();
	    return (false);
	  } // end if statement
	  
	  if (theForm.Birthdate_Month.value == "") {
	  	alert("Please select your birthdate");
	  	theForm.Birthdate_Month.focus();
	  	return (false);
	  } // end if statement
	  
	  if (theForm.Birthdate_Day.value == "") {
	  	alert("Please select your birthdate");
	  	theForm.Birthdate_Day.focus();
	  	return (false);
	  } // end if statement
	  
	  if (theForm.Birthdate_Year.value == "") {
		alert("Please enter the year of your birthdate");
		theForm.Birthdate_Year.focus();
		return (false);
	  } // end if statement
	  
	  if ((theForm.Birthdate_Year.value < "1900") || (theForm.Birthdate_Year.value > "2007")) {
		alert("Please enter a valid year for your birthdate");
		theForm.Birthdate_Year.focus();
		return (false);
	  } // end if statement
	  
	  if (theForm.Shirt_Size.value == "") {
	  	alert("Please select your t-shirt size");
	  	theForm.Shirt_Size.focus();
	  	return (false);
	  } // end if statement
	  
	  if (theForm.ZipCode.value != "")  {
	     var zipCode = theForm.ZipCode.value;
	     
	     if (zipCode.length != 5 && zipCode.length != 10)  {
	     	alert("Please enter a valid Zip Code, entered in one of the following two formats: XXXXX or XXXXX-XXXX.");
			theForm.ZipCode.focus();
         return (false);         
        } // end if statement

	     var checkOK = "0123456789";
	     var allValid = true;

	     for (i = 0;  i < zipCode.length;  i++)  {
	       ch = zipCode.charAt(i);
	       if (i != 5) {
	          for (j = 0;  j < checkOK.length;  j++)  {
	   	    if (ch == checkOK.charAt(j))
		      break;
	          }  //end for loop
	          if (j == checkOK.length)  {
		    allValid = false;
		    break;
	          }  //end if statement
	       } else {
	          if (ch != "-") {
		     allValid = false;
		     break;
	          }  // end if statement
	       }  //end if statement
	     }  //end for loop

	     if (!allValid) {
				alert("Please enter a valid Zip Code, entered in one of the following two formats: XXXXX or XXXXX-XXXX.");
				theForm.ZipCode.focus();
				return (false);
	     } //end if statement
	  } // end if statement

	  return (true);
} // end volunteerFormValidator()


function getDirections(theForm)  {

	if (theForm.startAddress.value == "")  {
	alert("Please enter a starting address or location.");
	theForm.startAddress.focus();
	return (false);
	}

	window.open("http://maps.google.com/maps?f=d&hl=en&saddr=" + theForm.startAddress.value + "&daddr=20464+E+Riggs+Rd,+Queen+Creek,+AZ+85242+(Horseshoe+Park+%26+Equestrian+Centre)&hl=en")

} // end getDirections()
   