function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setzentrieren() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var zentrierenElement = document.getElementById('zentrieren');
					var zentrierenHeight = zentrierenElement.offsetHeight;
					zentrierenElement.style.visibility = "visible";
					if (windowHeight - zentrierenHeight > 0) {
						zentrierenElement.style.position = 'relative';
						zentrierenElement.style.top = ((windowHeight / 2) - (zentrierenHeight / 2)) + 'px';
					}
					//else {
					//	zentrierenElement.style.position = 'static';
					//}
				}
			}
		}
		//window.onload = function() {
		//	setzentrieren();
		//}
		window.onresize = function() {
			setzentrieren();
		}
function init() {
	setzentrieren();
	if (document.forms[0]) {
		for (var i=0; i<document.forms[0].elements.length; i++) {
			if (document.forms[0].elements[i].type!='hidden') {
				document.forms[0].elements[i].focus();
				break;
			}
		}
	}
}
function disclaimer() {
	var popup_left=Math.round((window.screen.width-400)/2)
    var popup_top=Math.round((window.screen.height-210)/2)
	var popupwindow=window.open("disclaimer.html","disclaimer","menubar=yes,status=yes,height=210,width=400,resizable=no,left="+popup_left+",top="+popup_top+",scrollbars=yes");
}


function centerpopup(popupwidth,popupheight,params) {
    var popup_width=popupwidth
    var popup_height=popupheight
    var screen_width=window.screen.width
    var screen_height=window.screen.height
    var popup_left=Math.round((screen_width-popup_width)/2)
    var popup_top=Math.round((screen_height-popup_height)/2)
    var popupwindow=window.open("print.php"+params,"print","menubar=yes,status=yes,height="+popup_height+",width="+popup_width+",resizable=yes,left="+popup_left+",top="+popup_top+",scrollbars=yes");
}

// Right Mouse Click fuer Bilddownload verbieten

  function right(e) {
    if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) {
      alert('Copyright © Klopfer-Nährmittel GmbH 2004, Ismaning. Alle Rechte vorbehalten.');
      return false;
    }
    else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button==2 || event.button == 3)) {
      alert('Copyright © Klopfer-Nährmittel GmbH 2004, Ismaning. Alle Rechte vorbehalten.');
      return false;
    }
    return true;
  }
 // document.onmousedown=right;
 // if (document.layers) window.captureEvents(Event.MOUSEDOWN);
 // window.onmousedown=right;

