/*   All Javascript code is Copyright 2009 HunterGD @ HunterGD.com   *
*  Do not use or borrow my code without giving credit to me, at the  *
*  least, please leave this header with the code.                   */

function getBox()
{
	if (location.hash == "#classpayment" || location.hash == "#register")
	{
		var resultBox = location.hash.substr(1);
		showBox(resultBox);
	}
}

/* PayPal Checkout Code */
function send_to_cart() 
{
	changePrice( )
	document.add_cart.amount.value = document.forms.add_cart.price.value;
	
	if (document.add_cart.where[0].checked == true) document.add_cart.item_name.value = "Bergen County, morning";
   	else if (document.add_cart.where[1].checked == true)document.add_cart.item_name.value = "Bergen County, evening";
   	else if (document.add_cart.where[2].checked == true)document.add_cart.item_name.value = "Orange County";
   	else if (document.add_cart.where[3].checked == true)document.add_cart.item_name.value = "Rockland County, evening";
   	else if (document.add_cart.where[4].checked == true)document.add_cart.item_name.value = "Rockland County, morning";
   	
   	if (document.add_cart.R2[0].checked == true) document.add_cart.item_name.value += " -- One Person";
   	else document.add_cart.item_name.value += " -- Two People";
   	
	document.add_cart.submit();
}

function changePrice( )
{
   var price;
   var s_price;
   if (document.add_cart.where[2].checked == true ) 
   {
   		price = 120
   		s_price = 80;
   		
   	}
   else 
   {
 		price = 195;
   		s_price = 130;
   	}
   
   if (document.add_cart.R2[1].checked == true) price += s_price;
   document.forms.add_cart.price.value = "$" + price;
   document.forms.add_cart.price2.value = "$" + price;
}