// JavaScript Document



/* Youth Programs Javascript included page. Matthew Moore 1/19/2009 */

// Bear Care populate address function on bearcare/registration.php

	
function isDate(mm,dd,yyyy)
{
   var d = new Date(mm + "/" + dd + "/" + yyyy);
   return d.getMonth() + 1 == mm && d.getDate() == dd && d.getFullYear() == yyyy;
}


function cb_populateAddress1()
{
	if (document.Form1.parent1SameAddress.checked)
	{
		document.Form1.parent1Address.value = document.Form1.camperAddress.value;
		document.Form1.parent1City.value = document.Form1.camperCity.value;
		document.Form1.parent1State.value = document.Form1.camperState.value;
		document.Form1.parent1Zip.value = document.Form1.camperZip.value;
	}
	else
	{
		document.Form1.parent1Address.value = "";
		document.Form1.parent1City.value = "";
		document.Form1.parent1State.value ="--";
		document.Form1.parent1Zip.value ="";
	}
}







function bc_populateAddress1()
{
	if (document.Form1.parent1SameAddress.checked)
	{
		document.Form1.pAddress.value = document.Form1.cAddress.value;
		document.Form1.pCity.value = document.Form1.cCity.value;
		document.Form1.pState.value = document.Form1.cState.value;
		document.Form1.pZip.value = document.Form1.cZip.value;
	}
	else
	{
		document.Form1.pAddress.value = "";
		document.Form1.pCity.value = "";
		document.Form1.pState.value ="--";
		document.Form1.pZip.value ="";
	}
}

//Bear Care Validation for Registration form on bearcare/registration.php
function za_validate(theForm)
{



	if (theForm.cFirstName.value == "" || theForm.cFirstName.value.length < 2){
		alert("Please fill in the camper's first name.");
		theForm.cFirstName.focus();
		theForm.cFirstName.select();
		return false;
	}
	
	if (theForm.cLastName.value == "" || theForm.cLastName.value.length < 2){
		alert("Please fill in the camper's last name.");
		theForm.cLastName.focus();
		theForm.cLastName.select();
		return false;
		}
	
	if (theForm.cAddress.value == "" || theForm.cAddress.value.length < 5){
		alert("Please fill in the camper's full address.");
		theForm.cAddress.focus();
		theForm.cAddress.select();
		return false;
		}	
		
	if (theForm.cCity.value == "" || theForm.cCity.value.length < 2){
		alert("Please fill in the camper's city.");
		theForm.cCity.focus();
		theForm.cCity.select();
		return false;
		}
		
	if(theForm.cZip.value == "" || theForm.cZip.value.length <5){
		alert("Please fill in the camper's entire zipcode.");
		theForm.cZip.focus();
		theForm.cZip.select();
		return false;
	}
	

		
	if (theForm.cEmail.value== "" ){
		alert("Please enter the camper's email address.");
		theForm.cEmail.focus();
		theForm.cEmail.select();
		return false;
		}
	if (theForm.cAge.value== "--" ){
		alert("Please enter the camper's age.");
		theForm.cAge.focus();
		return false;
		}
		
	if (theForm.cBirthdate.value== "" || theForm.cBirthdate.value== "xx/xx/xxxx"){
		alert("Please enter the camper's birthdate.");
		theForm.cBirthdate.focus();
		theForm.cBirthdate.select();
		return false;
		}
		
	if (theForm.cSchool.value== "" ){
		alert("Please enter the school your camper is attending.");
		theForm.cSchool.focus();
		theForm.cSchool.select();
		return false;
		}
				
	
		
	//// PARENT INFO NOW///////////
	if (theForm.pFirstName.value == "" || theForm.pFirstName.value.length < 2){
		alert("Please fill in the parent's first name.");
		theForm.pFirstName.focus();
		theForm.pFirstName.select();
		return false;
	}
	
	if (theForm.pLastName.value == "" || theForm.pLastName.value.length < 2){
		alert("Please fill in the parent's last name.");
		theForm.pLastName.focus();
		theForm.pLastName.select();
		return false;
		}
	
	if (theForm.pAddress.value == "" || theForm.pAddress.value.length < 5){
		alert("Please fill in the parents full address.");
		theForm.pAddress.focus();
		theForm.pAddress.select();
		return false;
		}	
	if (theForm.pCity.value == "" || theForm.pCity.value.length < 2){
		alert("Please fill in the parent's city.");
		theForm.pCity.focus();
		theForm.pity.select();
		return false;
		}
	if(theForm.pZip.value == "" || theForm.pZip.value.length <5){
		alert("Please fill in the parent's entire zipcode.");
		theForm.pZip.focus();
		theForm.pZip.select();
		return false;
	}
	
	if (theForm.pPhone.value== "" || theForm.pPhone.value == "000-000-0000" || theForm.pPhone.value.length < 10){
		alert("Please enter the parent's phone number including your areacode, and please include dashes.");
		theForm.pPhone.focus();
		theForm.pPhone.select();
		return false;
		}
		
	if (theForm.pEmail.value== "" ){
		alert("Please enter the parent's email address.");
		theForm.pEmail.focus();
		theForm.pEmail.select();
		return false;
		}
		
	if (theForm.hearAbout.value== "" ){
		alert("Please tell us how you hear about us.");
		theForm.hearAbout.focus();
		theForm.hearAbout.select();
		return false;
		}
		
	// REGISTRATION INFORMATION NOW///////
	
	if(!theForm.computerTourists.checked && !theForm.computerEducation.checked && !theForm.canoeClinic.checked && !theForm.canoeTrip.checked){
		alert("Oops! You've forgotten to select an adventure for your camper! Please select an adventure before continuing.");
		theForm.computerTourists.focus();
		return false;
		}
		
	if(theForm.canoeTrip.checked && !theForm.canoeClinic.checked){
		alert("If your camper is planning to attended the canoe trip he/she must attend the Canoe Clinic. Please select the Canoe Clinic to continue.");
		theForm.canoeClinic.focus();
		return false;
	}
	
	if(theForm.regType[3].checked && theForm.moEmail.value == ""){
		alert("Please enter your Missouri State email address.");
		theForm.moEmail.focus();
		theForm.moEmail.select();
		return false;
		}
	
	if(theForm.regType[2].checked && theForm.sName.value == ""){
		alert("PLease enter your camper's siblings name.");
		theForm.sName.focus();
		theForm.sName.select();
		return false;
		}
	if(theForm.program[1].checked && !theForm.payment[0].checked && !theForm.payment[0].checked){
		alert("Please selecte a payment option for the Spring Break Program.");
		//theForm.payment.focus();
		return false;
		}
	
	}//END  Bear Care Validation Fucntion







//Bear Care Validation for Registration form on bearcare/registration.php
function bc_validate(theForm)
{



	if (theForm.cFirstName.value == "" || theForm.cFirstName.value.length < 2){
		alert("Please fill in the camper's first name.");
		theForm.cFirstName.focus();
		theForm.cFirstName.select();
		return false;
	}
	
	if (theForm.cLastName.value == "" || theForm.cLastName.value.length < 2){
		alert("Please fill in the camper's last name.");
		theForm.cLastName.focus();
		theForm.cLastName.select();
		return false;
		}
	
	if (theForm.cAddress.value == "" || theForm.cAddress.value.length < 5){
		alert("Please fill in the camper's full address.");
		theForm.cAddress.focus();
		theForm.cAddress.select();
		return false;
		}	
		
	if (theForm.cCity.value == "" || theForm.cCity.value.length < 2){
		alert("Please fill in the camper's city.");
		theForm.cCity.focus();
		theForm.cCity.select();
		return false;
		}
		
	if(theForm.cZip.value == "" || theForm.cZip.value.length <5){
		alert("Please fill in the camper's entire zipcode.");
		theForm.cZip.focus();
		theForm.cZip.select();
		return false;
	}
	

		
	if (theForm.cEmail.value== "" ){
		alert("Please enter the camper's email address.");
		theForm.cEmail.focus();
		theForm.cEmail.select();
		return false;
		}
	if (theForm.cAge.value== "--" ){
		alert("Please enter the camper's age.");
		theForm.cAge.focus();
		return false;
		}
		
	if (theForm.cBirthdate.value== "" || theForm.cBirthdate.value== "xx/xx/xxxx"){
		alert("Please enter the camper's birthdate.");
		theForm.cBirthdate.focus();
		theForm.cBirthdate.select();
		return false;
		}
		
	if (theForm.cSchool.value== "" ){
		alert("Please enter the school your camper is attending.");
		theForm.cSchool.focus();
		theForm.cSchool.select();
		return false;
		}
				
	
		
	//// PARENT INFO NOW///////////
	if (theForm.pFirstName.value == "" || theForm.pFirstName.value.length < 2){
		alert("Please fill in the parent's first name.");
		theForm.pFirstName.focus();
		theForm.pFirstName.select();
		return false;
	}
	
	if (theForm.pLastName.value == "" || theForm.pLastName.value.length < 2){
		alert("Please fill in the parent's last name.");
		theForm.pLastName.focus();
		theForm.pLastName.select();
		return false;
		}
	
	if (theForm.pAddress.value == "" || theForm.pAddress.value.length < 5){
		alert("Please fill in the parents full address.");
		theForm.pAddress.focus();
		theForm.pAddress.select();
		return false;
		}	
	if (theForm.pCity.value == "" || theForm.pCity.value.length < 2){
		alert("Please fill in the parent's city.");
		theForm.pCity.focus();
		theForm.pity.select();
		return false;
		}
	if(theForm.pZip.value == "" || theForm.pZip.value.length <5){
		alert("Please fill in the parent's entire zipcode.");
		theForm.pZip.focus();
		theForm.pZip.select();
		return false;
	}
	
	if (theForm.pPhone.value== "" || theForm.pPhone.value == "000-000-0000" || theForm.pPhone.value.length < 10){
		alert("Please enter the parent's phone number including your areacode, and please include dashes.");
		theForm.pPhone.focus();
		theForm.pPhone.select();
		return false;
		}
		
	if (theForm.pEmail.value== "" ){
		alert("Please enter the parent's email address.");
		theForm.pEmail.focus();
		theForm.pEmail.select();
		return false;
		}
		
	if (theForm.hearAbout.value== "" ){
		alert("Please tell us how you hear about us.");
		theForm.hearAbout.focus();
		theForm.hearAbout.select();
		return false;
		}
		
	// REGISTRATION INFORMATION NOW///////
	
	if(!theForm.program[0].checked && !theForm.program[1].checked){
		alert("Please select a program to sign your camper up for");
		theForm.program.focus();
		return false;
		}
	if(theForm.regType[3].checked && theForm.moEmail.value == ""){
		alert("Please enter your Missouri State email address.");
		theForm.moEmail.focus();
		theForm.moEmail.select();
		return false;
		}
	
	if(theForm.regType[2].checked && theForm.sName.value == ""){
		alert("PLease enter your camper's siblings name.");
		theForm.sName.focus();
		theForm.sName.select();
		return false;
		}
	if(theForm.program[1].checked && !theForm.payment[0].checked && !theForm.payment[0].checked){
		alert("Please selecte a payment option for the Spring Break Program.");
		//theForm.payment.focus();
		return false;
		}
	
	}//END  Bear Care Validation Fucntion
	
	
	
// CAMP PAND PRE REGISTRATION VALIDATION BEGINS*******************************************************************
function cp1_validate(theForm)
{
	if (!theForm.ageGroup[0].checked && !theForm.ageGroup[1].checked && !theForm.ageGroup[2].checked)
	{
		alert("Please select your camper's age group.");
		theForm.ageGroup[0].focus();
		return false;
	}
	
	if (theForm.camperFirstName.value == "")
	{
		alert("Please fill in the campers first name.");
		theForm.camperFirstName.focus();
		return false;
	}
	
	if (theForm.camperLastName.value == "")
	{
		alert("Please fill in the campers last name.");
		theForm.camperLastName.focus();
		return false;
	}
	
	if (!theForm.camperGender[0].checked && !theForm.camperGender[1].checked)
	{
		alert("Please select an option for the campers gender.");
		theForm.camperGender[0].focus();
		return false;
	}
	
	if (theForm.camperAddress.value == "")
	{
		alert("Please fill in the campers address.");
		theForm.camperAddress.focus();
		return false;
	}
	
	if (theForm.camperAddress.value == "")
	{
		alert("Please fill in the campers address.");
		theForm.camperAddress.focus();
		return false;
	}
	
	if (theForm.camperCity.value == "")
	{
		alert("Please fill in the campers city.");
		theForm.camperCity.focus();
		return false;
	}
	
	if (theForm.camperState.value == "--")
	{
		alert("Please select the campers state.");
		theForm.camperState.focus();
		return false;
	}
	
	if (theForm.camperZip.value == "")
	{
		alert("Please fill in the campers zip code.");
		theForm.camperZip.focus();
		return false;
	}
	
	if (theForm.camperAge.value == "--")
	{
		alert("Please select the campers age.");
		theForm.camperAge.focus();
		return false;
	}
	
	if (theForm.camperShirtSize.value == "--")
	{
		alert("Please select the campers shirt size.");
		theForm.camperShirtSize.focus();
		return false;
	}
	
	if (theForm.camperBirthday1.value == "")
	{
		alert("Please fill in the campers birth month.");
		theForm.camperBirthday1.focus();
		return false;
	}
	
	if (theForm.camperBirthday2.value == "")
	{
		alert("Please fill in the campers birth day.");
		theForm.camperBirthday2.focus();
		return false;
	}
	
	if ((theForm.camperBirthday3.value == "") || (theForm.camperBirthday3.value.length < 4))
	{
		alert("Please fill in the campers birth year (i.e. 1999).");
		theForm.camperBirthday3.focus();
		return false;
	}
	
	if (!isDate(theForm.camperBirthday1.value, theForm.camperBirthday2.value, theForm.camperBirthday3.value))
	{
		alert("The campers birthdate you entered is not a valid date.");
		theForm.camperBirthday1.focus();
		return false;
	}
	
	if (theForm.hearAbout.value == "--")
	{
		alert("Please select how you heard about this program.");
		theForm.hearAbout.focus();
		return false;
	}
	return true;
}

function cp2_validate(theForm){
	
	if (theForm.parent1FullName.value == "")
	{
		alert("Please fill in a full name for parent 1.");
		theForm.parent1FullName.focus();
		return false;
	}
	
	if (theForm.parent1FullName.value == "")
	{
		alert("Please fill in a full name for parent 1.");
		theForm.parent1FullName.focus();
		return false;
	}
	
	if (theForm.parent1Address.value == "")
	{
		alert("Please fill in an address for parent 1.");
		theForm.parent1Address.focus();
		return false;
	}
	
	if (theForm.parent1City.value == "")
	{
		alert("Please fill in a city for parent 1.");
		theForm.parent1City.focus();
		return false;
	}
	
	if (theForm.parent1State.value == "--")
	{
		alert("Please select a state for parent 1.");
		theForm.parent1State.focus();
		return false;
	}
	
	if (theForm.parent1Zip.value == "")
	{
		alert("Please fill in a zip code for parent 1.");
		theForm.parent1Zip.focus();
		return false;
	}
	
	if (theForm.parent1Relationship.value == "--")
	{
		alert("Please select what relation parent 1 has to the camper.");
		theForm.parent1Relationship.focus();
		return false;
	}

	if ((theForm.parent1HomePhone1.value == "") || (theForm.parent1HomePhone1.value.length < 3))
	{
		alert("Please fill in the area code of parent 1's hone phone number.");
		theForm.parent1HomePhone1.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone2.value == "") || (theForm.parent1HomePhone2.value.length < 3))
	{
		alert("Please fill in the first 3 digits of parent 1's home phone number.");
		theForm.parent1HomePhone2.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone3.value == "") || (theForm.parent1HomePhone3.value.length < 4))
	{
		alert("Please fill in the last 4 digits of parent 1's home phone number.");
		theForm.parent1HomePhone3.focus();
		return false;
	}
	return true;
}

function cp3_validate(theForm){
	if (theForm.cancellationPolicyRead.checked == false)
	{		
		alert("Please read the cancellation policy and parental authorization then check the box to indicate that you've read it.");
		theForm.cancellationPolicyRead.focus();
		return false;
	}
	return true;
}


function cb_validate(theForm)
{ 
	if (theForm.camperFirstName.value == "")
	{
		alert("Please fill in the campers first name.");
		theForm.camperFirstName.focus();
		return false;
	}
	
	if (theForm.camperLastName.value == "")
	{
		alert("Please fill in the campers last name.");
		theForm.camperLastName.focus();
		return false;
	}
	
	if (!theForm.camperGender[0].checked && !theForm.camperGender[1].checked)
	{
		alert("Please select an option for the campers gender.");
		theForm.camperGender[0].focus();
		return false;
	}
	
	if (theForm.camperAddress.value == "")
	{
		alert("Please fill in the campers address.");
		theForm.camperAddress.focus();
		return false;
	}
	
	if (theForm.camperAddress.value == "")
	{
		alert("Please fill in the campers address.");
		theForm.camperAddress.focus();
		return false;
	}
	
	if (theForm.camperCity.value == "")
	{
		alert("Please fill in the campers city.");
		theForm.camperCity.focus();
		return false;
	}
	
	if (theForm.camperState.value == "--")
	{
		alert("Please select the campers state.");
		theForm.camperState.focus();
		return false;
	}
	
	if (theForm.camperZip.value == "")
	{
		alert("Please fill in the campers zip code.");
		theForm.camperZip.focus();
		return false;
	}
	
	if (theForm.camperGrade.value == "--")
	{
		alert("Please select the campers grade.");
		theForm.camperGrade.focus();
		return false;
	}
	
	if (theForm.camperAge.value == "--")
	{
		alert("Please select the campers age.");
		theForm.camperAge.focus();
		return false;
	}
	
	if (theForm.camperShirtSize.value == "--")
	{
		alert("Please select the campers shirt size.");
		theForm.camperShirtSize.focus();
		return false;
	}
	
	if (theForm.camperBirthday1.value == "")
	{
		alert("Please fill in the campers birth month.");
		theForm.camperBirthday1.focus();
		return false;
	}
	
	if (theForm.camperBirthday2.value == "")
	{
		alert("Please fill in the campers birth day.");
		theForm.camperBirthday2.focus();
		return false;
	}
	
	if ((theForm.camperBirthday3.value == "") || (theForm.camperBirthday3.value.length < 4))
	{
		alert("Please fill in the campers birth year (i.e. 1999).");
		theForm.camperBirthday3.focus();
		return false;
	}
	
	if (!isDate(theForm.camperBirthday1.value, theForm.camperBirthday2.value, theForm.camperBirthday3.value))
	{
		alert("The campers birthdate you entered is not a valid date.");
		theForm.camperBirthday1.focus();
		return false;
	}
	
	if (theForm.hearAbout.value == "--")
	{
		alert("Please select how you heard about this program.");
		theForm.hearAbout.focus();
		return false;
	}
	
	if (!theForm.parent1LivesWith[0].checked && !theForm.parent1LivesWith[1].checked)
	{
		alert("Please indicate if the camper lives with parent 1.");
		theForm.parent1LivesWith[0].focus();
		return false;
	}
	
	if (theForm.parent1FullName.value == "")
	{
		alert("Please fill in a full name for parent 1.");
		theForm.parent1FullName.focus();
		return false;
	}
	
	if (theForm.parent1FullName.value == "")
	{
		alert("Please fill in a full name for parent 1.");
		theForm.parent1FullName.focus();
		return false;
	}
	
	if (theForm.parent1Address.value == "")
	{
		alert("Please fill in an address for parent 1.");
		theForm.parent1Address.focus();
		return false;
	}
	
	if (theForm.parent1City.value == "")
	{
		alert("Please fill in a city for parent 1.");
		theForm.parent1City.focus();
		return false;
	}
	
	if (theForm.parent1State.value == "--")
	{
		alert("Please select a state for parent 1.");
		theForm.parent1State.focus();
		return false;
	}
	
	if (theForm.parent1Zip.value == "")
	{
		alert("Please fill in a zip code for parent 1.");
		theForm.parent1Zip.focus();
		return false;
	}
	
	if (theForm.parent1Relationship.value == "--")
	{
		alert("Please select what relation parent 1 has to the camper.");
		theForm.parent1Relationship.focus();
		return false;
	}

	if ((theForm.parent1HomePhone1.value == "") || (theForm.parent1HomePhone1.value.length < 3))
	{
		alert("Please fill in the area code of parent 1's hone phone number.");
		theForm.parent1HomePhone1.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone2.value == "") || (theForm.parent1HomePhone2.value.length < 3))
	{
		alert("Please fill in the first 3 digits of parent 1's hone phone number.");
		theForm.parent1HomePhone2.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone3.value == "") || (theForm.parent1HomePhone3.value.length < 4))
	{
		alert("Please fill in the last 4 digits of parent 1's hone phone number.");
		theForm.parent1HomePhone3.focus();
		return false;
	}
	
	if (theForm.anotherParent.checked)
	{
		if (!theForm.parent2LivesWith[0].checked && !theForm.parent2LivesWith[1].checked)
		{
			alert("Please indicate if the camper lives with parent 2.");
			theForm.parent2LivesWith[0].focus();
			return false;
		}
		
		if (theForm.parent2FullName.value == "")
		{
			alert("Please fill in a full name for parent 2.");
			theForm.parent2FullName.focus();
			return false;
		}
		
		if (theForm.parent2FullName.value == "")
		{
			alert("Please fill in a full name for parent 2.");
			theForm.parent2FullName.focus();
			return false;
		}
		
		if (theForm.parent2Address.value == "")
		{
			alert("Please fill in an address for parent 2.");
			theForm.parent2Address.focus();
			return false;
		}
		
		if (theForm.parent2City.value == "")
		{
			alert("Please fill in a city for parent 2.");
			theForm.parent2City.focus();
			return false;
		}
		
		if (theForm.parent2State.value == "--")
		{
			alert("Please select a state for parent 2.");
			theForm.parent2State.focus();
			return false;
		}
		
		if (theForm.parent2Zip.value == "")
		{
			alert("Please fill in a zip code for parent 2.");
			theForm.parent2Zip.focus();
			return false;
		}
		
		if (theForm.parent2Relationship.value == "--")
		{
			alert("Please select what relation parent 2 has to the camper.");
			theForm.parent2Relationship.focus();
			return false;
		}
	
		if ((theForm.parent2HomePhone1.value == "") || (theForm.parent2HomePhone1.value.length < 3))
		{
			alert("Please fill in the area code of parent 2's hone phone number.");
			theForm.parent2HomePhone1.focus();
			return false;
		}
		
		if ((theForm.parent2HomePhone2.value == "") || (theForm.parent2HomePhone2.value.length < 3))
		{
			alert("Please fill in the first 3 digits of parent 2's hone phone number.");
			theForm.parent2HomePhone2.focus();
			return false;
		}
		
		if ((theForm.parent2HomePhone3.value == "") || (theForm.parent2HomePhone3.value.length < 4))
		{
			alert("Please fill in the last 4 digits of parent 2's hone phone number.");
			theForm.parent2HomePhone3.focus();
			return false;
		}
	}
	return true;	
}



function preRegistration(theForm)
{ 
	if (theForm.camperFirstName.value == "")
	{
		alert("Please fill in the campers first name.");
		theForm.camperFirstName.focus();
		return false;
	}
	
	if (theForm.camperLastName.value == "")
	{
		alert("Please fill in the campers last name.");
		theForm.camperLastName.focus();
		return false;
	}
	
	if(theForm.phone1.value == "" || theForm.phone2.value == "" || theForm.phone3.value == ""){
		
		alert("Please fill in the phone number you used during registration.");
		theForm.phone1.focus();
		return false;
	}
	
	return true;
}

function validate_classSelection(theForm){
	
	
	
	/*if(!theForm.regType[0].checked && !theForm.regType[1].checked && !theForm.regType[2].checked && !theForm.regType[3].checked){
		alert("Please select a registration type for your camper.");
		return false;
	}*/
	
	
if( ((theForm.Week1AM[0].checked || theForm.Week1AM[1].checked) && (!theForm.Week1PM[0].checked && !theForm.Week1PM[1].checked)) || ((theForm.Week1PM[0].checked || theForm.Week1PM[1].checked) && (!theForm.Week1AM[0].checked && !theForm.Week1AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 1. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
	
if( ((theForm.Week2AM[0].checked || theForm.Week2AM[1].checked) && (!theForm.Week2PM[0].checked && !theForm.Week2PM[1].checked)) || ((theForm.Week2PM[0].checked || theForm.Week2PM[1].checked) && (!theForm.Week2AM[0].checked && !theForm.Week2AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 2. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
if( ((theForm.Week3AM[0].checked || theForm.Week3AM[1].checked) && (!theForm.Week3PM[0].checked && !theForm.Week3PM[1].checked)) || ((theForm.Week3PM[0].checked || theForm.Week3PM[1].checked) && (!theForm.Week3AM[0].checked && !theForm.Week3AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 3. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
if( ((theForm.Week5AM[0].checked || theForm.Week5AM[1].checked) && (!theForm.Week5PM[0].checked && !theForm.Week5PM[1].checked)) || ((theForm.Week5PM[0].checked || theForm.Week5PM[1].checked) && (!theForm.Week5AM[0].checked && !theForm.Week5AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 5. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
if( ((theForm.Week6AM[0].checked || theForm.Week6AM[1].checked) && (!theForm.Week6PM[0].checked && !theForm.Week6PM[1].checked)) || ((theForm.Week6PM[0].checked || theForm.Week6PM[1].checked) && (!theForm.Week6AM[0].checked && !theForm.Week6AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 6. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
if( ((theForm.Week7AM[0].checked || theForm.Week7AM[1].checked) && (!theForm.Week7PM[0].checked && !theForm.Week7PM[1].checked)) || ((theForm.Week7PM[0].checked || theForm.Week7PM[1].checked) && (!theForm.Week7AM[0].checked && !theForm.Week7AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 7. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
if( ((theForm.Week8AM[0].checked || theForm.Week8AM[1].checked) && (!theForm.Week8PM[0].checked && !theForm.Week8PM[1].checked)) || ((theForm.Week8PM[0].checked || theForm.Week8PM[1].checked) && (!theForm.Week8AM[0].checked && !theForm.Week8AM[1].checked))  ){
		alert("Please make sure you have selected both an AM and PM class for week 8. You must register for both an AM and PM class to attend a week of Camp Bear.");
		return false;
	}
	
	

	return true;
}

function cardinals(theForm){
	
	if(theForm.fName.value== ""){
		alert("Please fill in your first name.");
		theForm.fName.focus();
		return false;
	}
	
	if(theForm.lName.value== ""){
		alert("Please fill in your last name.");
		theForm.lName.focus();
		return false;
	}
	
	if(theForm.cFName.value== ""){
		alert("Please fill in your camper's first name.");
		theForm.cFName.focus();
		return false;
	}
	
	if(theForm.cLName.value== ""){
		alert("Please fill in your camper's last name.");
		theForm.cLName.focus();
		return false;
	}
	
	
	if(theForm.email.value== ""){
		alert("Please fill in your email address.");
		theForm.email.focus();
		return false;
	}
		if ((theForm.parent1HomePhone1.value == "") || (theForm.parent1HomePhone1.value.length < 3))
	{
		alert("Please fill in the area code of parent 1's hone phone number.");
		theForm.parent1HomePhone1.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone2.value == "") || (theForm.parent1HomePhone2.value.length < 3))
	{
		alert("Please fill in the first 3 digits of parent 1's hone phone number.");
		theForm.parent1HomePhone2.focus();
		return false;
	}
	
	if ((theForm.parent1HomePhone3.value == "") || (theForm.parent1HomePhone3.value.length < 4))
	{
		alert("Please fill in the last 4 digits of parent 1's hone phone number.");
		theForm.parent1HomePhone3.focus();
		return false;
	}
	
	if(!theForm.selectedClass[0].checked && !theForm.selectedClass[1].checked){
		alert("Please select where your camper has selected classes yet.");
		return false;
		
	}
	if(theForm.adult.value == "0" && theForm.children.value == "0"){
		alert("You have not selected any tickets.");
		return false;
	}
	
return true;	
}


