function ShoppingCartC() {
	
	
	this.onLoad = function() {
			if (document.RedirectToPayPalForm) {
				document.RedirectToPayPalForm.submit();
			}
		}
	
	
	this.updateQuantity = function() {
			document.cartForm.action = 'index.php?q=node/44';
			document.cartForm.performAction.value = 'UpdateQuantity';
			document.cartForm.submit();
		}
	
	
	this.removeItem = function(itemID) {
			document.cartForm.action = 'index.php?q=node/44';
			if (!confirm('Please confirm that you want to remove selected item')) return;
			document.cartForm.performAction.value = 'RemoveItem';
			document.cartForm.ShopBasketID.value = itemID;
			document.cartForm.submit();
		}

	
	this.emptyCart = function() {
			document.cartForm.action = 'index.php?q=node/44';
			if (!confirm('Please confirm that you want to empty the cart')) return;
			document.cartForm.performAction.value = 'EmptyCart';
			document.cartForm.submit();
		}
	
	
}

ShoppingCart = new ShoppingCartC();

/********************************/

function ShippingInfoC() {
	
	
	this.SelectPostage = function(SelectPostage) {
			document.getElementById("DisplayChosenShippingLabel").innerHTML = SelectPostage.options[SelectPostage.selectedIndex].text;
			document.getElementById("DisplayChosenShippingValue").innerHTML = "&pound;"+postages[SelectPostage.value].toFixed(2);
			var totalCostValue = parseFloat(postages[SelectPostage.value])+parseFloat(document.ShipppingInformationForm.WithoutShipping.value);
			document.getElementById("TotalCostValue").innerHTML = "&pound;" + totalCostValue.toFixed(2);
			document.ShipppingInformationForm.TotalCost.value = totalCostValue.toFixed(2);
		}


}

ShippingInfo = new ShippingInfoC();