function CheckBoxChangeState(sRowName){
// toggle the checkbox and set quantity value to 1 if checked otherwise 0 if not checked
	var sQtyBox, sStateBox
	var oQtyBox, oStateBox
	// coded for compatability
	sQtyBox = "+" + sRowName
	sStateBox = "_" + sRowName
	// make object elements
	oQtyBox = document.frmShopping.elements[sQtyBox] ;
	oStateBox = document.frmShopping.elements[sStateBox] ;
		if (oStateBox.checked==true)
			{
			oQtyBox.value = parseInt("1");
			}
		else
			{
			oQtyBox.value = parseInt("0");
			}
}

function AddToCartLocal(sRowName){
// set the quantity to 1 if 0 and add 1 to the action count, then submit form which when re-loaded will add item to cart in database
	var sQtyBox
	var oQtyBox
	// coded for compatability
	sQtyBox = "+" + sRowName
	// make object elements
	oQtyBox = document.frmShopping.elements[sQtyBox] ;
		if (oQtyBox.value == 0)
			{
			oQtyBox.value = parseInt("1");
			}
	document.frmShopping.elements["ActionCount"].value = parseInt(document.frmShopping.elements["ActionCount"].value) + parseInt("1") ;
	document.frmShopping.elements["Action"].value = "AddToCart" ;
	document.frmShopping.submit()
}
