function fensterAuf(url, name, b, h) {
    var eigenschaft,sbreite,shoehe,fenster;

	if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        sbreite = window.innerWidth;
        shoehe = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        sbreite = document.documentElement.clientWidth;
        shoehe = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        sbreite = document.body.clientWidth;
        shoehe = document.body.clientHeight;
    }

	// Fensterpossition linke obere Ecke
	x = (sbreite-b)/2;
	y = (shoehe-h)/2;
	//alert("x: "+x+"y: "+y);
	var eigenschaften ="left="+x+",top="+y+",screenX="+x+",screenY="+y;
	// weitere Attribiute hinzufügen

    if (typeof(popupWin) != "object"){
        popupWin = window.open(url, name, eigenschaften+'menubar=no, resizeable=no, location=no, scrollbars=no, status=no');
    }
    else {
        if (!popupWin.closed){
            popupWin.location.href = url;
        }
        else {
        popupWin = window.open(url, name, eigenschaften+'menubar=no, resizeable=no, location=no, scrollbars=no, status=no');
        }
    }
    popupWin.focus();
    popupWin.moveTo(x,y);
}

function resize(w,h) {
	window.focus();
	window.resizeTo(w, h);
}

function resizeContactForm() {
	window.focus();
	window.resizeTo(325, 525);
}

function checkInput () {
  for (i = 0; i < document.forms[0].elements.length; ++i)
    if (document.forms[0].elements[i].value == "") {
      alert("Es wurden nicht alle Felder ausgefuellt!");
      document.forms[0].elements[i].focus();
      return false;
    }
  return true;
}

function agbCkecked() {
	//alert(document.cart_form.agb.checked);

	if(document.cart.agb.checked) {
		opener.location.href = '../site.php?submit=submit';
		window.close();

	} else {
		alert('Die AGB wurden nicht akzeptiert!');
	}
	//this.document.cart_form.agb[0]
	return false;
}
function getGMapKey() {
	if( location.host == "www.4experiment.de") var key ="ABQIAAAAtaTEvWJmhRnXkN9NML77eRSX4I49eqwV6SqGfhG8lQayaxxwSBQMdgRO9Dz1EPCRXv5q4uyqJI2uiA";
	if( location.host == "4experiment.de") var key ="ABQIAAAAtaTEvWJmhRnXkN9NML77eRQAS6Aa-GQ87iAX_QQd-3hRzAkvFxQe6SLWMCAIokQx42RP7FI5YsnJBQ";
	if( location.host == "www.gastraum4experiment.de") var key ="ABQIAAAAtaTEvWJmhRnXkN9NML77eRRCd0_p3w8DvuejKFghZ2mpEigbQRRvOQwVbsGy3bdiHHQ61lYglUeYMg";
	if(location.host == "gastraum4experiment.de") var key = "ABQIAAAAtaTEvWJmhRnXkN9NML77eRQ6RCazlaOhDpRvpXoEFAsiTyHNaxT6vulCUH8874zs9FlqKeRFkO1VYA";
	return key;
}
