function AddToCart(thisForm) {
	thisForm.action = "assets/cgi-bin/addOrUpdateLine.php?lineNumber="+thisForm.lineNumber.value+"&amp;optionNumber="+thisForm.optionNumber.value+"&amp;optionCode="+thisForm.optionCode.value+"&amp;stock="+thisForm.stock.value+"&amp;quantity="+thisForm.quantity.value;
	thisForm.submit();
}

function RemoveFromCartDB(line) {
	if ( confirm( "Click 'OK' to remove this product from your shopping cart." ) ) {
		location.href="assets/cgi-bin/removeLine.php?orderLine="+line;
	}
}

function ChangeQuantityDB(line, quantity) {
	location.href="assets/cgi-bin/changeQuantity.php?line="+line+"&quantity="+quantity;
}


TrapClicksForHowManySeconds = 5;
TrapTime = 0;
DoubleClickTrapperCounter = 0;

function DoubleClickTrapperAction() {
	DoubleClickTrapperCounter++;
	var trapTheClick = false;
	if(DoubleClickTrapperCounter > 1 ) { trapTheClick = true; }
	if(trapTheClick == true) {
		if(TrapTime == 0) {
			var tDate = new Date;
			TrapTime = tDate.valueOf();
			}
		else {
			var tDate = new Date;
			var localTrapTime = tDate.valueOf();
			if((localTrapTime - TrapTime) > (TrapClicksForHowManySeconds * 1000)) {
				TrapTime = 0;
				trapTheClick = false;
				DoubleClickTrapperCounter = 0;
				}
			}
		}
	var valueToReturn = true;
	if(trapTheClick == true) {
		valueToReturn = false;
		}
	return valueToReturn;
} // end of function DoubleClickTrapperAction()
