	function InvokeFormAction(F, A)
	{
		var Pos = document.forms[F].action.indexOf("Action=") + 7;
		document.forms[F].action = document.forms[F].action.substring(0, Pos) + A;
		document.forms[F].submit();
	}
	function InvokeAction(A)
	{
		var Pos = document.forms[1].action.indexOf("Action=") + 7;
		document.forms[1].action = document.forms[1].action.substring(0, Pos) + A;
		document.forms[1].submit();
	}

	function ViewArticle(ArticleId, ArticleName)
	{
		location.href = 'ViewArticle.asp?ArticleId=' + ArticleId + '&Page=' + ArticleName;
	}

	function CartAddArticleRentalOnly(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=RentalOnly'); //&ArticleId=' + ArticleId);
	}

	function CartAddArticleCombination(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=Combination'); //&ArticleId=' + ArticleId);
	}

	function CartAddArticleFullService(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=FullService'); //&ArticleId=' + ArticleId);
	}
	
	function CartQuickAddArticleRentalOnly(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=RentalOnly&ArticleId=' + ArticleId);
	}

	function CartQuickAddArticleCombination(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=Combination&ArticleId=' + ArticleId);
	}

	function CartQuickAddArticleFullService(ArticleId)
	{
		InvokeAction('AddArticle&PriceType=FullService&ArticleId=' + ArticleId);
	}

	function CartRemoveItem(i)
	{
		if (confirm('Weet u zeker dat u dit product wilt verwijderen?'))
		{
			InvokeAction('Delete&Seqno=' + i);
		}
	}

	function DecreaseQuantity(Seqno)
	{
		document.forms[2]['Quantity_' + Seqno].value = parseInt(document.forms[2]['Quantity_' + Seqno].value) - 1;

		var re = new RegExp(/^[0-9]+$/);
		if (document.forms[2]['Quantity_' + Seqno].value < 1 || !re.test(document.forms[2]['Quantity_' + Seqno].value))
		{
			document.forms[2]['Quantity_' + Seqno].value = 1;
		}
	}

	function IncreaseQuantity(Seqno)
	{
		document.forms[2]['Quantity_' + Seqno].value = parseInt(document.forms[2]['Quantity_' + Seqno].value) + 1;

		var re = new RegExp(/^[0-9]+$/);
		if (document.forms[2]['Quantity_' + Seqno].value < 1 || !re.test(document.forms[2]['Quantity_' + Seqno].value))
		{
			document.forms[2]['Quantity_' + Seqno].value = 1;
		}
	}

	function ViewCart()
	{
		location.href = 'ShoppingCart.asp';
	}

	function Register()
	{
		location.href = 'Register.asp';
	}

	function OrderRental()
	{
		location.href = 'OrderRental.asp?Action=Load';
	}

	function EditCustomer()
	{
		location.href = 'EditCustomer.asp';
	}

	function ViewCustomer()
	{
		location.href = 'ViewCustomer.asp';
	}

	function SetPassword()
	{
		location.href = 'SetPassword.asp';
	}

	function Show(id)
	{
		document.getElementById(id).style.visibility = "visible";
	}

	function Hide(id)
	{
		document.getElementById(id).style.visibility = "hidden";
	}

	function ValidateRegisterType()
	{
		if (document.forms['RegisterType'].IsCorporate[0].checked || document.forms['RegisterType'].IsCorporate[1].checked)
		{
			document.forms['RegisterType'].submit();
		}
		else
		{
			alert('Selecteer eerst of u een particuliere of zakelijke klant bent');
		}
	}

	function PasswordReset()
	{
		location.href = 'PasswordReset.asp';
	}

	function toggleT(_w,_h)
	{
		if (document.all) { // is IE
		if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
		if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
		} else { // is NS?
		if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
		if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
		}
	}
	function ViewOriginal(ImageId, Title, ImgWidth, Height)
	{
		if (ImgWidth == 0)
		{
			var ImgWindow = window.open('FullscreenPhoto.asp?ImageId=' + ImageId + '&Title=' + Title + '&Width=0&Height=0', '_blank', 'width=500,height=400,resizable,scrollbars=yes');
		}
		else
		{
			var ImgWindow = window.open('FullscreenPhoto.asp?ImageId=' + ImageId + '&Title=' + Title + '&Width=' + ImgWidth + '&Height=' + Height, '_blank', 'width=' + ImgWidth + ',height=' + Height + ',resizable');
		}
	}

	function QuickSearcherSubmit() 
	{
		if (document.getElementById("QuickSearch").value != "0")
		{
			location.href = document.getElementById("QuickSearch").value;
		}
	}
