<!--


function openCenteredWindow(url, height, width, name, parms) {
	var left = Math.floor( (screen.width - width) / 2);
	var top = Math.floor( (screen.height - height) / 2);
	var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
	if (parms) { winParms += "," + parms; }
	var win = window.open(url, name, winParms);
	if (win)
	{
		if (parseInt(navigator.appVersion) >= 4)
		{
			if (win != null) {
				win.window.focus();
			}
		}
		return true;
	}
	else
	{
		return false;
	}

}

function showBestelForm(errorMessage) {
	var theLocation = 'bestelling.php';
	
	// Attemp to open cart in new browser window
	for (t=0; t<3; t++) {
		chkTemp = openCenteredWindow(theLocation, 500, 450, 'BestelWin', 'scrollbars=1');
		if (chkTemp == true) {
			break;	
		}
	}
	
	// Unable to open, probably due to pop up blocker
	if (chkTemp == false) {
		chkTemp = confirm(errorMessage);
		if (chkTemp == true) {
			document.location = theLocation;	
		}
	}
	
}



// -->
