function enableField(){
	if (document.form.formField_Booth.checked==true){
		document.form.formField_Booth_MemberType.disabled=false;
		document.form.formField_Booth_Qty.disabled=false;
		return true;
	}
	if (document.form.formField_Booth.checked==false){
		document.form.formField_Booth_MemberType.disabled=true;
		document.form.formField_Booth_Qty.disabled=true;
		document.form.formField_Booth_Qty.selectedIndex=0;
		calcSub1()
		return false;
	}
}

function enableField2(){
	if (document.form.formField_Elect.checked==true){
		document.form.formField_Elect_Qty.disabled=false;
		return true;
	}
	if (document.form.formField_Elect.checked==false){
		document.form.formField_Elect_Qty.disabled=true;
		document.form.formField_Elect_Qty.selectedIndex=0;
		calcSub1()
		return false;
	}
}


function enableField3(){
	if (document.form.formField_Phone.checked==true){
		document.form.formField_Phone_Qty.disabled=false;
		return true;
	}
	if (document.form.formField_Phone.checked==false){
		document.form.formField_Phone_Qty.disabled=true;
		document.form.formField_Phone_Qty.selectedIndex=0;
		calcSub1()
		return false;
	}
}

function enableField4(){
	if (document.form.formField_Ind_Lunch.checked==true){
		document.form.formField_Ind_Lunch_Qty.disabled=false;
		return true;
	}
	if (document.form.formField_Ind_Lunch.checked==false){
		document.form.formField_Ind_Lunch_Qty.disabled=true;
		document.form.formField_Ind_Lucnh_Qty.selectedIndex=0;
		calcSub2()
		return false;
	}
}


function enableField5(){
	if (document.form.formField_Corp_Table.checked==true){
		document.form.formField_Corp_Table_Qty.disabled=false;
		return true;
	}
	if (document.form.formField_Corp_Table.checked==false){
		document.form.formField_Corp_Table_Qty.disabled=true;
		document.form.formField_Corp_Table_Qty.selectedIndex=0;
		calcSub2()
		return false;
	}
}




function SetBoothPrice(){
	if (document.form.formField_Booth_MemberType.selectedIndex==1){ 
		var dateNow = new Date();
		var dateFuture = new Date(2006,3,24,12,0,0);
		var amount = dateFuture.getTime() - dateNow.getTime();
		if(amount > 0){
			document.form.formField_Booth_Price.value=400;
			alert('The current Member Price is $'+ document.form.formField_Booth_Price.value);
			calcSub1()
			return true;
		}
		else {
			document.form.formField_Booth_Price.value=450;
		    alert('The current Member Price is $'+ document.form.formField_Booth_Price.value);
			calcSub1()
		}
	}

	if (document.form.formField_Booth_MemberType.selectedIndex==2){ 
		var dateNow = new Date();
		var dateFuture = new Date(2006,3,24,12,0,0);
		var amount = dateFuture.getTime() - dateNow.getTime();
		if(amount > 0){
			document.form.formField_Booth_Price.value=500;
			alert('The current Member Price is $'+ document.form.formField_Booth_Price.value);
			calcSub1()
			return true;
		}
		else {
			document.form.formField_Booth_Price.value=550;
			alert('The current Member Price is $'+ document.form.formField_Booth_Price.value);
			calcSub1()
		}
	}
}

function calcSub1(){
    var boothPrice = document.form.formField_Booth_Price.value;
    var boothQty = document.form.formField_Booth_Qty.selectedIndex;
	var boothSub =  boothPrice * boothQty;
	var ElectQty = document.form.formField_Elect_Qty.selectedIndex;
	var PhoneQty = document.form.formField_Phone_Qty.selectedIndex;
	var ElectPrice = 25;
	var PhonePrice = 75;
	var electSub = ElectPrice * ElectQty;
	var phoneSub = PhonePrice * PhoneQty;
	var ExpoTotal = boothSub + phoneSub + electSub;
	document.form.formField_SubTotal_1.value = ExpoTotal;
	calcTotal()

}

function calcSub2(){
    var IndLunch = 35;
    var IndLunchQty = document.form.formField_Ind_Lunch_Qty.selectedIndex;
	var IndLunchSub = IndLunch * IndLunchQty;
    var CorpLunch = 400;
    var CorpLunchQty = document.form.formField_Corp_Table_Qty.selectedIndex;
    var CorpLunchSub = CorpLunch * CorpLunchQty;
    var LunchTotal = IndLunchSub + CorpLunchSub;
    document.form.formField_SubTotal_2.value = LunchTotal;
	calcTotal()
}

function enableField6(){
	if (document.form.formField_Single_Golf.checked==true){
		document.form.formField_Single_Golf_Qty.disabled=false;
		document.form.formField_Single_Golf_Time.disabled=false;
		SetGolfPrice1()
		return true;
	}
	if (document.form.formField_Single_Golf.checked==false){
		document.form.formField_Single_Golf_Qty.disabled=true;
		document.form.formField_Single_Golf_Time.disabled=true;
		document.form.formField_Single_Golf_Qty.selectedIndex=0;
		calcSub3()
		return false;
	}
}

function enableField7(){
	if (document.form.formField_Foursome.checked==true){
		document.form.formField_Foursome_Qty.disabled=false;
		document.form.formField_Foursome_Time.disabled=false;
		SetGolfPrice2()
		return true;
	}
	if (document.form.formField_Foursome.checked==false){
		document.form.formField_Foursome_Qty.disabled=true;
		document.form.formField_Foursome_Time.disabled=true;
		document.form.formField_Foursome_Qty.selectedIndex=0;
		calcSub3()
		return false;
	}
}

function SetGolfPrice1(){
		var dateNow2 = new Date();
		var dateFuture2 = new Date(2006,3,24,12,0,0);
		var amount2 = dateFuture2.getTime() - dateNow2.getTime();
		if(amount2 > 0){
			document.form.formField_Single_Golf_Price.value=135;
			alert('The current Single Golfer Price is $'+ document.form.formField_Single_Golf_Price.value);
			calcSub3()
			return true;
		}
		else {
			document.form.formField_Single_Golf_Price.value=150;
		    alert('The current Member Price is $'+ document.form.formField_Single_Golf_Price.value);
			calcSub3()
			}
}

function SetGolfPrice2(){
	
		var dateNow3 = new Date();
		var dateFuture3 = new Date(2006,3,24,12,0,0);
		var amount3 = dateFuture3.getTime() - dateNow3.getTime();
		if(amount3 > 0){
			document.form.formField_Foursome_Price.value=540;
			alert('The current Foursome Price is $'+ document.form.formField_Foursome_Price.value);
			calcSub3()
			return true;
		}
		else {
			document.form.formField_Foursome_Price.value=600;
			alert('The current Foursome Price is $'+ document.form.formField_Foursome_Price.value);
			calcSub3()
		}



}

function calcSub3(){
    var HoleSpon=0;
	 for (var i=0; i < document.form.formField_Hole.length; i++)
   {
   if (document.form.formField_Hole[i].checked)
      {
      HoleSpon = eval(document.form.formField_Hole[i].value);
      }
   }


	  var GolfSinglePrice = document.form.formField_Single_Golf_Price.value;
      var GolfSingleQty = document.form.formField_Single_Golf_Qty.selectedIndex;
	  var GolfSingleSub =  GolfSinglePrice * GolfSingleQty;
      var FoursomePrice = document.form.formField_Foursome_Price.value;
      var FoursomeQty = document.form.formField_Foursome_Qty.selectedIndex;
	  var FoursomeSub =  FoursomePrice * FoursomeQty;

	  var GolfTotal = GolfSingleSub + FoursomeSub+HoleSpon;
	document.form.formField_SubTotal_3.value = GolfTotal;
	calcTotal()

}

function calcTotal(){
    var SubTotal1 = eval(document.form.formField_SubTotal_1.value);
    var SubTotal2 = eval(document.form.formField_SubTotal_2.value);
    var SubTotal3 = eval(document.form.formField_SubTotal_3.value);
    var Total = SubTotal1 + SubTotal2 + SubTotal3;
	document.form.formField_SubTotal_4.value=Total;
}

function disableAll(){
    if (document.form.formField_Partner_Package.checked==true){
		document.form.formField_Single_Golf.disabled=true;
		document.form.formField_Foursome.disabled=true;
		document.form.formField_Hole[0].disabled=true;
		document.form.formField_Hole[1].disabled=true;
		document.form.formField_Hole[2].disabled=true;
		document.form.formField_Booth.disabled=true;
		document.form.formField_Phone.disabled=true;
		document.form.formField_Elect.disabled=true;
		document.form.formField_Ind_Lunch.disabled=true;
		document.form.formField_Corp_Table.disabled=true;
		document.form.formField_Accept_Apps.disabled=true;
		
		document.form.formField_SubTotal_4.value=1600;
		}
		
		
		if (document.form.formField_Partner_Package.checked==false){
		document.form.formField_Single_Golf.disabled=false;
		document.form.formField_Foursome.disabled=false;
		document.form.formField_Hole[0].disabled=false;
		document.form.formField_Hole[1].disabled=false;
		document.form.formField_Hole[2].disabled=false;
		document.form.formField_Booth.disabled=false;
		document.form.formField_Phone.disabled=false;
		document.form.formField_Elect.disabled=false;
		document.form.formField_Ind_Lunch.disabled=false;
		document.form.formField_Corp_Table.disabled=false;
		document.form.formField_Accept_Apps.disabled=false;
		calcTotal();
		}
		



}





