// JavaScript Document
function validateForm() {

	
	
	if (( document.form.Address.value == "")||( document.form.City.value == "")||( document.form.State.value == "")||( document.form.Zip.value == "")) {

		alert ('Please enter your address, city, state and zip code.');

		document.form.Address.focus();

		return false;

	}	
		if (document.form.Phone.value == "") {

		alert ('Please enter your phone number.');

		document.form.Phone.focus();

		return false;

	}	
		if ((document.form.Session_Time[0].checked ==false) && (document.form.Session_Time[1].checked ==false) &&(document.form.Session_Time[2].checked ==false) && (document.form.Session_Time[3].checked ==false)) {

		alert ('Please select a Session Time.');

		document.form.Session_Time[0].focus();

		return false;

	}

	if ((document.form.Fathers_first_name.value == "") && (document.form.Mothers_first_name.value == "")) {

		alert ('Please enter either Father or Mothers information.');

		document.form.Fathers_first_name.focus();

		return false;

	}

	if ((document.form.Address.value == "") || (document.form.City.value == "") || (document.form.State.value == "") || (document.form.Zip.value == "") || (document.form.Phone.value == "")) {

		alert ('Please enter your complete Family Information including address, city, state, zip code and phone number.');

		document.form.Address.focus();

		return false;

	}

	if ((document.form.first_name_1.value == "") || (document.form.last_name_1.value == "") || (document.form.male_female_1.value == "") || (document.form.birthdate_1.value == "") || (document.form.grade_1.value == "")) {

		alert ('Please enter the first child\'s complete information.');

		document.form.first_name_1.focus();

		return false;

	}

	if ((document.form.first_name_2.value != "") || (document.form.last_name_2.value != "")) {

		if ((document.form.male_female_2.value == "") || (document.form.birthdate_2.value == "") || (document.form.grade_2.value == "")) {

			alert ('Please complete the second child\'s information.');

			document.form.first_name_2.focus();

			return false;

		}

	}

	if ((document.form.first_name_3.value != "") || (document.form.last_name_3.value != "")) {

		if ((document.form.male_female_3.value == "") || (document.form.birthdate_3.value == "") || (document.form.grade_3.value == "")) {

			alert ('Please complete the third child\'s information.');

			document.form.first_name_3.focus();

			return false;

		}

	}

	if ((document.form.first_name_4.value != "") || (document.form.last_name_4.value != "")) {

		if ((document.form.male_female_4.value == "") || (document.form.birthdate_4.value == "") || (document.form.grade_4.value == "")) {

			alert ('Please complete the fourth child\'s information.');

			document.form.first_name_4.focus();

			return false;

		}

	}

	if ((document.form.first_name_5.value != "") || (document.form.last_name_5.value != "")) {

		if ((document.form.male_female_5.value == "") || (document.form.birthdate_5.value == "") || (document.form.grade_5.value == "")) {

			alert ('Please complete the fifth child\'s information.');

			document.form.first_name_5.focus();

			return false;

		}

	}

	if (document.form.Total_Fee_Family.value == "")  {

		alert ('Please enter the Total Fee for the family.');

		document.form.Total_Fee_Family.focus();

		return false;

	}	

	return true;

	



-->

}

function calculateFee() {
		parseInt(document.form.nbr_years_44.value);
		parseInt(document.form.nbr_years_510.value);

		if (isNaN(document.form.nbr_years_44.value)) document.form.nbr_years_44.value = 0;
		if (isNaN(document.form.nbr_years_510.value)) document.form.nbr_years_510.value = 0;
		
		var nbr_1 = document.form.nbr_years_44.value;
		var nbr_2 = document.form.nbr_years_510.value;
		
		var fee_1 = 0;
		var fee_2 = 0;
		var price_level = 1;
		
		
		if (document.form.fee_44[0].checked == true) {
				fee_1 =  65;
				price_level = 1;
		}
		if (document.form.fee_44[1].checked == true) {
				fee_1 =  70;
				price_level = 2;
		}
		if (document.form.fee_44[2].checked == true) {
				fee_1 =  85;
				price_level = 3;
		}
		
		if (document.form.fee_510[0].checked == true) {
				fee_2 =  85;
				price_level = 1;
		}
		if (document.form.fee_510[1].checked == true) {
				fee_2 =  90;
				price_level = 2;
		}
		if (document.form.fee_510[2].checked == true) {
				fee_2 =  105;
				price_level = 3;
		}
		
		var total_1 = 0;
		var total_2 = 0;
		
		total_1 = nbr_1 * fee_1;
		total_2 = nbr_2 * fee_2;
		
		if (isNaN(total_1)) total_1 = 0;
		if (isNaN(total_2)) total_2 = 0;
		
		document.form.tot_44.value = total_1;
		document.form.tot_510.value = total_2;
		
		var grand_total = total_1 + total_2;
		
		if (price_level == 1 && grand_total > 240) grand_total = 240;
		if (price_level == 2 && grand_total > 250) grand_total = 250;
		if (price_level == 3 && grand_total > 300) grand_total = 300;
		
		document.form.tot_grand.value = grand_total;
		
}
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);
}
// -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
