/* Systems beeReg Form validation script */

//------------------------------------------------------------------------------------
// function: formCheck
//           Function tells whether all require fields are filled in.
//------------------------------------------------------------------------------------

function formCheck(form) {
	if (document.beeReg.studentName.value == "" ){
		document.beeReg.studentName.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Student Name field is incomplete.");
		return false;
	}
		
	if ((document.beeReg.dobMonth.value == "") ||
		(document.beeReg.dobDay.value == "") ||
		(document.beeReg.dobYear.value == "")){
		document.beeReg.dobMonth.style.background = "#EDC52B";
		document.beeReg.dobDay.style.background = "#EDC52B";
		document.beeReg.dobYear.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Birth Date field is incomplete.");
		return false;	
	}
	
	if (document.beeReg.age.value == "" ){
		document.beeReg.age.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Age field is incomplete.");
		return false;
	}
	
	if (document.beeReg.studentAddress.value == "" ){
		document.beeReg.studentAddress.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Student Address field is incomplete.");
		return false;
	}
	
	if (document.beeReg.studentZipcode.value == "" ){
		document.beeReg.studentZipcode.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Student zipcode field is incomplete.");
		return false;
	}

	if (document.beeReg.homePhone.value == "" ){
		document.beeReg.homePhone.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Home phone field is incomplete.");
		return false;
	}
	
	if (document.beeReg.school.value == "" ){
		document.beeReg.school.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, School field is incomplete.");
		return false;
	}
	
	if (document.beeReg.grade.value == "" ){
		document.beeReg.grade.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Grade field is incomplete.");
		return false;
	}
	
	if (document.beeReg.gender.value == "" ){
		document.beeReg.gender.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Gender field is incomplete.");
		return false;
	}

	if (document.beeReg.studentDescription.value == "" ){
		document.beeReg.studentDescription.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Student Description field is incomplete.");
		return false;
	}

	if (document.beeReg.childEnjoys.value == "" ){
		document.beeReg.childEnjoys.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Child Enjoys field is incomplete.");
		return false;
	}
	
	if (document.beeReg.childFav.value == "" ){
		document.beeReg.childFav.style.background = "#EDC52B";
		location.href('#step1');
		alert("Oops, Child Favorite field is incomplete.");
		return false;
	}

	if (document.beeReg.parentsName.value == "" ){
		document.beeReg.parentsName.style.background = "#EDC52B";
		location.href('#step2');
		alert("Oops, Parents Name field is incomplete.");
		return false;
	}

	if (document.beeReg.emailAddress.value == "" ){
		document.beeReg.emailAddress.style.background = "#EDC52B";
		location.href('#step2');
		alert("Oops, Email address field is incomplete.");
		return false;
	}
	
	if (document.beeReg.workPhone.value == "" ){
		document.beeReg.workPhone.style.background = "#EDC52B";
		location.href('#step2');
		alert("Oops, Work phone field is incomplete.");
		return false;
	}

	if (document.beeReg.bestContact.value == "" ){
		document.beeReg.bestContact.style.background = "#EDC52B";
		location.href('#step2');
		alert("Oops, Best contact method field is incomplete.");
		return false;
	}
	
	if (document.beeReg.bestContactTime.value == "" ){
		document.beeReg.bestContactTime.style.background = "#EDC52B";
		location.href('#step2');
		alert("Oops, Best contact time field is incomplete.");
		return false;
	}
}




