function keytest(e, txtbox) {
	if (e.keyCode == 13) {
		e.preventDefault ? e.preventDefault() : e.returnValue = false;
		Search(txtbox);
	}
}

function Search(control) {
	window.location.href = 'zoeken.aspx?search=' + control.value;
}

/*** shoppingcart functions ***/

function Delete(name) {
	getElementByName(name).value = "-1";
	SetReload(true);
	Submit(1, "recalc");
}

function Recalc() {
	SetReload(true);
	Submit(1, "recalc");
}

function ValidateQuantity(n, s) {
	var length,
		e, i;

	if (typeof ((length = thisform.shoppingcartitem_quantity.length)) == "undefined") {
		length = 1;
		e = new Array(length);
		e[0] = thisform.shoppingcartitem_quantity;
	}
	else {
		e = new Array(length);
		for (i = 0; i < length; i++)
			e[i] = thisform.shoppingcartitem_quantity[i];
	}
	valid = true;
	for (i = 0; i < length && valid; i++)
		valid = (isNaN(parseInt(e[i].value)) == false && parseInt(e[i].value) >= 0);
	if (!valid) {
		alert(s);
		e[i - 1].select();
	}

	return valid;
}

function ToTheShop() {
	window.location.href = "kiezen-productsoort.aspx";
}

function Proceed() {
	SetRedirect(true);
	AddSubmitParameter("returnurl", "gegevens-invoeren.aspx");
	Submit(1, "proceed");
}

function ToQuantity() {
	window.location.href = "winkelwagen.aspx";
}

function ToAddress() {
	window.location.href = "gegevens-invoeren.aspx";
}

function Checkout() {
	SetRedirect(true);
	Submit(1, "ordernow");
}

/*** Contact ***/

function Send() {
	Submit(1, "send");
}

function EnlargeImage(url) {
	window.open(applicationPath + "rs/common/htmleditor/enlargeimage.aspx?url=" + url, "",
		"left=99999, width=250, height=150, scrollbars=no, status=no");
}

