	function InvokeAction(A)
	{
		document.forms[1].action += A;
		document.forms[1].submit();
	}

	function DecreaseQuantity(Seqno)
	{
		document.forms[1]['Quantity_' + Seqno].value = parseInt(document.forms[1]['Quantity_' + Seqno].value) - 1;

		var re = new RegExp(/^[0-9]+$/);
		if (document.forms[1]['Quantity_' + Seqno].value < 1 || !re.test(document.forms[1]['Quantity_' + Seqno].value))
		{
			document.forms[1]['Quantity_' + Seqno].value = 1;
		}
	}

	function IncreaseQuantity(Seqno)
	{
		document.forms[1]['Quantity_' + Seqno].value = parseInt(document.forms[1]['Quantity_' + Seqno].value) + 1;

		var re = new RegExp(/^[0-9]+$/);
		if (document.forms[1]['Quantity_' + Seqno].value < 1 || !re.test(document.forms[1]['Quantity_' + Seqno].value))
		{
			document.forms[1]['Quantity_' + Seqno].value = 1;
		}
	}

	function CartAddProduct(ProductId)
	{
		location.href = 'ViewProduct.asp?Action=Add&ProductId=' + ProductId;
	}

	function CartRemoveItem(i)
	{
		if (confirm('Weet u zeker dat u dit product wilt verwijderen?'))
		{
			InvokeAction('Delete&Seqno=' + i);
		}
	}

	function ViewCart()
	{
		location.href = 'ShoppingCart.asp';
	}

	function OrderForm()
	{
		location.href = 'OrderForm.asp';
	}

	function EditCustomer()
	{
		location.href = 'EditCustomer.asp';
	}

	function ViewCustomer()
	{
		location.href = 'ViewCustomer.asp';
	}

	function LogOut()
	{
		location.href = 'LogOff.asp';
	}

	function Register()
	{
		location.href = 'Register.asp';
	}

	function SetPassword()
	{
		location.href = 'SetPassword.asp';
	}
	function SubmitQuery()
	{
		var Query = document.getElementById('Query').value;

		if (Query.length > 0)
		{
			location.href = 'SearchResults.asp?Query=' + Query;
		}
		else
		{
			return false;
		}
	}	