//Check navigator type
var IE = false;
var NS = false;
var NS6 = false;
if(navigator.userAgent.indexOf("MSIE") != -1) {
	IE = true;
} else if(navigator.userAgent.indexOf("Netscape6") != -1) {
	NS6 = true;
} else {
	NS = true;
}
//End Check navigator type
//Hide "loading" text and show pagecontent
function initPage() {
	if(NS) {
		document.layers["main"].left = ((window.innerWidth - document.layers["main"].clip.width) / 2);
		document.layers["main"].top = ((window.innerHeight - document.layers["main"].clip.height) / 2);
		document.layers["loading"].visibility = "hide";
		document.layers["main"].visibility = "show";
	} else if(IE) {
		document.all("main").style.pixelLeft = ((document.body.clientWidth - main.offsetWidth) / 2);
		document.all("main").style.pixelTop = ((document.body.clientHeight - main.offsetHeight) / 2);
		document.all("loading").style.visibility = "hidden";
		document.all("main").style.visibility = "visible";
	} else if(NS6) {
		document.getElementById("main").style.left = ((window.innerWidth - document.getElementById("main").offsetWidth) / 2);
		document.getElementById("main").style.top = ((window.innerHeight - document.getElementById("main").offsetHeight) / 2);
		document.getElementById("loading").style.visibility = "hidden";
		document.getElementById("main").style.visibility = "visible";		
	}
}
//End hide "loading" text and show pagecontent
//On mouse over effects in the menu
function Action(what, which) {
	if(what == "over") {
		if(NS) document.layers["main"].document.images["img" + which].src = "bilder/menu/but" + which + "_02.gif";
		else if(NS6 || IE) document.images["img" + which].src = "bilder/menu/but" + which + "_02.gif";
	}
	if(what == "out") {
		if(NS) document.layers["main"].document.images["img" + which].src = "bilder/menu/but" + which + ".gif";
		else if(NS6 || IE)document.images["img" + which].src = "bilder/menu/but" + which + ".gif";
	}
}
//End On mouse over effects in the menu
//Open new window
function openWin(url, inW, inH, inS){
	if(inW == "") inW = 435; //default width of the window
	if(inH == "") inH = 300; //default height of the window
	if(inS == "") inS = 0; //default scrollbars 0 = no scrollbar; 1 = yes
	
	geneva = window.open(url,"poppup","menubar=no,resizable=yes,Width=" + inW + ",Height=" + inH + ",titlebar=no,alwaysRaised=yes,status=no,resizable=no,scrollbars=" + inS + "");
}
//End Open new window
//Netscape ver < 6 resize fix
function NGN_netscapeCssFix() {
	if (document.win.win_netscapeCssFix.initWindowWidth != window.innerWidth || document.win.win_netscapeCssFix.initWindowHeight != window.innerHeight) {
		document.location = document.location;
	}
}
function NGN_netscapeCssFixCheckIn() {
	if((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4) && (navigator.appName.indexOf("Netscape6") == -1)) {
		if(typeof document.win == "undefined") {
			document.win = new Object;
		}
		if(typeof document.win.win_scaleFont == "undefined") {
			document.win.win_netscapeCssFix = new Object;
			document.win.win_netscapeCssFix.initWindowWidth = window.innerWidth;
			document.win.win_netscapeCssFix.initWindowHeight = window.innerHeight;
		}
		window.onresize = NGN_netscapeCssFix;
	}
}
NGN_netscapeCssFixCheckIn()
//End Netscape ver < 6 resize fix
