var popUpWin=0;
function popUpWindowBase(urlStr, left, top, width, height, resizable) {
	if (popUpWin) {
		if(!popUpWin.closed) { popUpWin.close(); }
	}
	var prm = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes";
	prm = prm + ",copyhistory=no,resizable=" + resizable + ",width=" + width + ",height=" + height;
	prm = prm + ",left=" + left + ", top=" + top + ",screenX=" + left + ",screenY=" + top;
	popUpWin = window.open(urlStr, 'popUpWin', prm);
}

function nutzungsbedingungen() {
	if (document.getElementById("Formular").Nutzungsbedingungen.checked != true) {
		alert("Bitte akzeptieren Sie die Liefer- und Zahlungsbedingungen.");
		return false;
	}
	return true;
}

function nachfragen(frage, meldung_ja, meldung_nein) {
	var antwort = confirm(frage);
	if (antwort == true)	{ alert(meldung_ja); }
	else { alert(meldung_nein); }
}

function setfocus(Formularfeld) {
	document.getElementById(Formularfeld).focus();
}

function popUpWindow(url) {
	var width = 600;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 400;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "no");
}

function popUpWindowZeichnungen(url) {
	var width = 400;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 520;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "yes");
}

function popUpWindowMorePics(url) {
	var width = 400;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 520;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "yes");
}

function popUpWindowAvailability(url) {
	var width = 500;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 400;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "no");
}

function popUpWindowHighResPics(url) {
	var width = 400;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 300;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "yes");
}

function popUpWindowDatenblaetter(url) {
	var width = 600;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 300;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "no");
}

function popUpWindowInformationen(url) {
	var width = 600;
	var posX = (window.screen.width / 2) - (width / 2);
	var height = 300;
	var posY = (window.screen.height / 2) - (height / 2);
	popUpWindowBase(url, posX, posY, width, height, "no");
}

function MM_callJS(jsStr) {
	return eval(jsStr); 
}