function Form_Entry_Validation(theForm) {
/*
	var formVars = "";
	for(var i = 0; i < theForm.length; i++) {
		formVars += theForm.elements[i].name + "=" +theForm.elements[i].value + "\n";
	}
	alert(formVars);
*/

// Make sure that a daily registration has at least one day selected
  if (theForm.FW10_reg_type[1].checked) {
    var checked_days = "";
    if( theForm.july_10.checked ) {
      checked_days++;
    }
    if( theForm.july_11.checked ) {
      checked_days++;
    }
    if( theForm.july_12.checked ) {
      checked_days++;
    }
    if( theForm.july_13.checked ) {
      checked_days++;
    }
    if( theForm.july_14.checked ) {
      checked_days++;
    }
    if( theForm.july_15.checked ) {
      checked_days++;
    }
    if( !checked_days ) {
      alert("If you are choosing daily the registration option, you must also select at least one day to register for");
      theForm.july_10.focus();
      return(false);
    }
  }
	
// Sanity check additional reg items
// Childcare for Monday Parents Night Out
  if (theForm.additional_reg_1.checked) {
    if ((theForm.reg_1_3andunder.value == "") && (theForm.reg_1_4andup.value == "")) {
      alert("Please enter the number of children you will need child care for");
      theForm.reg_1_3andunder.focus();
      return(false);
    }
    if (theForm.reg_1_3andunder.value) {
      if (isNaN(theForm.reg_1_3andunder.value)) {
	alert("The number of children 3 and under must be a number");
	theForm.reg_1_3andunder.focus();
	return(false);
      }
    }
    if (theForm.reg_1_4andup.value) {
      if (isNaN(theForm.reg_1_4andup.value)) {
	alert("The number of children 4 and up must be a number");
	theForm.reg_1_4andup.focus();
	return(false);
      }
    }
  }

// Tuesday Parents Night Out
  if (theForm.additional_reg_2.checked) {
    if(theForm.reg_2_participants.value == "") {
      alert("Please enter the number of people who will be attending the Parents Night Out event at Saugatuck Brewing Company");
      theForm.reg_2_participants.focus();
      return(false);
    } else if(isNaN(theForm.reg_2_participants.value)) {
      alert("The number of Parents Night Out participants must be a number");
      theForm.reg_2_participants.focus();
      return(false);
    }
  }

// Sanity check family information
// First parent's first name
  if (theForm.primary_first.value == "") {
    alert("Please enter your first name");
    theForm.primary_first.focus();
    return(false);
  }
// First parent's last name
  if (theForm.primary_last.value == "") {
    alert("Please enter your last name");
    theForm.primary_last.focus();
    return(false);
  }
// Total number of family members attending
  if (theForm.total_attending.value == "") {
    alert("Please enter the total number of people in your family who will be attending Family Week Saugatuck");
    theForm.total_attending.focus();
    return(false);
  }
  if (isNaN(theForm.total_attending.value)) {
    alert("The # of family members attending must be a number");
    theForm.total_atteding.focus();
    return(false);
  }
// Child #1
  if (theForm.child_name_1.value) {
    if(!theForm.child_1_age[0].checked && !theForm.child_1_age[1].checked && !theForm.child_1_age[2].checked && !theForm.child_1_age[3].checked && !theForm.child_1_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_1.value + " falls into");
      theForm.child_name_1.focus();
      return(false);
    }
    if(theForm.child_1_colage.checked) {
      if (theForm.child_1_age[0].checked || theForm.child_1_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_1.focus();
	return(false);
      } else if (theForm.child_1_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_1_bday.focus();
	return(false);
      }
    }
  }
  
// Child #2
  if (theForm.child_name_2.value) {
    if(!theForm.child_2_age[0].checked && !theForm.child_2_age[1].checked && !theForm.child_2_age[2].checked && !theForm.child_2_age[3].checked && !theForm.child_2_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_2.value + " falls into");
      theForm.child_name_2.focus();
      return(false);
    }
    if(theForm.child_2_colage.checked) {
      if (theForm.child_2_age[0].checked || theForm.child_2_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_2.focus();
	return(false);
      } else if (theForm.child_2_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_2_bday.focus();
	return(false);
      }
    }
  }

// Child #3
  if (theForm.child_name_3.value) {
    if(!theForm.child_3_age[0].checked && !theForm.child_3_age[1].checked && !theForm.child_3_age[2].checked && !theForm.child_3_age[3].checked && !theForm.child_3_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_3.value + " falls into");
      theForm.child_name_3.focus();
      return(false);
    }
    if(theForm.child_3_colage.checked) {
      if (theForm.child_3_age[0].checked || theForm.child_3_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_3.focus();
	return(false);
      } else if (theForm.child_3_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_3_bday.focus();
	return(false);
      }
    }
  }

// Child #4
  if (theForm.child_name_4.value) {
    if(!theForm.child_4_age[0].checked && !theForm.child_4_age[1].checked && !theForm.child_4_age[2].checked && !theForm.child_4_age[3].checked && !theForm.child_4_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_4.value + " falls into");
      theForm.child_name_4.focus();
      return(false);
    }
    if(theForm.child_4_colage.checked) {
      if (theForm.child_4_age[0].checked || theForm.child_4_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_4.focus();
	return(false);
      } else if (theForm.child_4_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_4_bday.focus();
	return(false);
      }
    }
  }

// Child #5
  if (theForm.child_name_5.value) {
    if(!theForm.child_5_age[0].checked && !theForm.child_5_age[1].checked && !theForm.child_5_age[2].checked && !theForm.child_5_age[3].checked && !theForm.child_5_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_5.value + " falls into");
      theForm.child_name_5.focus();
      return(false);
    }
    if(theForm.child_5_colage.checked) {
      if (theForm.child_5_age[0].checked || theForm.child_5_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_5.focus();
	return(false);
      } else if (theForm.child_5_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_5_bday.focus();
	return(false);
      }
    }
  }

// Child #6
  if (theForm.child_name_6.value) {
    if(!theForm.child_6_age[0].checked && !theForm.child_6_age[1].checked && !theForm.child_6_age[2].checked && !theForm.child_6_age[3].checked && !theForm.child_6_age[4].checked) {
      alert("Please select the age range that " + theForm.child_name_6.value + " falls into");
      theForm.child_name_6.focus();
      return(false);
    }
    if(theForm.child_6_colage.checked) {
      if (theForm.child_6_age[0].checked || theForm.child_6_age[1].checked) {
	alert("COLAGE registrants must be at least 9 years old");
	theForm.child_name_6.focus();
	return(false);
      } else if (theForm.child_6_bday.value == "" ) {
	alert("COLAGE registration requires a date of birth");
	theForm.child_6_bday.focus();
	return(false);
      }
    }
  }

// Sanity check contact info
// Email address
  if (theForm.email.value == "") {
    alert("Please enter an email address - your registration confirmation will be sent to this address");
    theForm.email.focus();
    return(false);
  }

// Street address
  if (theForm.street.value == "") {
    alert("Please enter your street address");
    theForm.street.focus();
    return(false);
  }

// City
  if (theForm.city.value == "") {
    alert("Please enter your city");
    theForm.city.focus();
    return(false);
  }

// Zip code
  if (theForm.zip.value == "") {
    alert("Please enter your zip code" );
    theForm.zip.focus();
    return(false);
  }
  if (isNaN(theForm.zip.value)) {
    alert("Zip code must be a number" );
    theForm.zip.focus();
    return(false);
  }

// Sanity check survey info
  if (theForm.past_participant[0].checked) {
    if( !theForm.participant_year_2009.checked && !theForm.participant_year_2008.checked && !theForm.participant_year_2007.checked && !theForm.participant_year_2006.checked && !theForm.participant_year_2005.checked && !theForm.participant_year_before05.checked) {
      alert("Please select which year(s) you previously attended Family Week Saugatuck");
      theForm.participant_year_2009.focus();
      return(false);
    }
  } else if (theForm.past_participant[1].checked) {
    if( !theForm.heard_friend.checked && !theForm.heard_FPC.checked && !theForm.heard_colage.checked && !theForm.heard_RF.checked && !theForm.heard_internet.checked && !theForm.heard_advertising.checked) {
      alert("Please tell use where you heard about Family Week Saugatuck");
      theForm.heard_friend.focus();
      return(false);
    }
    if (theForm.heard_RF.checked && !theForm.heard_rf_group.value) {
      alert("Please choose which Rainbow Families group through which you heard about Family Week Saugatuck");
      theForm.heard_RF.focus();
      return(false);
    }
    if (theForm.heard_advertising.checked && !theForm.heard_ad_seen.value) {
      alert("Please tell use where you saw our advertising");
      theForm.heard_ad_seen.focus();
      return(false);
    }
  }

}
