//Fenster öffnen W3C tauglich
function fensterhoehe (hoehe){	
	if(navigator.userAgent.indexOf('MSIE 7') !=-1)
		hoehe= hoehe + screen.availHeight-document.body.offsetHeight-100;
	return hoehe;
}
function fensterfunktion (url,name,hoehe,breite,menu,scroll){
	var ns = navigator.appName == "Netscape";
	if (ns){
		hoehe = hoehe + 20;
		if(parseInt(navigator.appVersion.indexOf('4.')) != -1)
			hoehe = hoehe + 20;
	}
	if(navigator.appVersion.indexOf('Mac') !=-1)
		hoehe = hoehe + 20;
	if(navigator.userAgent.indexOf('MSIE 7') !=-1)
		hoehe = hoehe + 20;
	
	var fenster=window.open(url, name, "width=" + breite + ",height=" + hoehe + ",toolbar=no,location=no,directories=no,status=no,menubar=" + menu + ",scrollbars=" + scroll + ",resizable=yes");
	fenster.focus();
}
function oeffnefenster (url,name,hoehe,breite){
	hoehe=fensterhoehe(hoehe);
	fensterfunktion(url,name,hoehe,breite,"yes","no");
}
function oeffnefensterscroll (url,name,hoehe,breite){
	hoehe=fensterhoehe(hoehe);
	fensterfunktion(url,name,hoehe,breite,"yes","yes");
}	
function oeffnefensternomenu (url,name,hoehe,breite){
	fensterfunktion(url,name,hoehe,breite,"no","yes");
}
function oeffnefensternoscroll (url,name,hoehe,breite){
	fensterfunktion(url,name,hoehe,breite,"no","no");
}

function drucken(url,hoehe,breite) 
{
	var popupdrucken = window.open(url,"Druckversion","width=" + breite + ",height=" + hoehe + ",toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=yes,left=100,top=0");
	popupdrucken.focus();
	popupdrucken.print();
	return false;
}	

function SetFokus(formFocus)
{
	if ((formFocus != null) && (formFocus != "")) {
		var cmd = "document." + formFocus + ".focus()";
		eval(cmd);
	}
}
function IDSetFokus(formFocus)
{
	if ((formFocus != null) && (formFocus != "")) {
		 var input = document.getElementById(formFocus);
		 input.focus();
	}
}