var	NS4 = (document.layers && !document.getElementById)?1:0;
var	IE4 = (document.all && !document.getElementById)?1:0;
var	NS6 = (document.getElementById && !document.layers &&!document.all)?1:0;
var	IE5 = (document.all && document.getElementById)?1:0;
var	IEX = (document.all)?1:0;
var	DOM = (document.getElementById)?1:0;
var MAC = (navigator.userAgent.indexOf("Mac")>-1)?1:0;
var OP5 = ((navigator.userAgent.indexOf("Opera")>-1) && document.getElementById)?1:0;

var breite = 0;
var hoehe = 0;
var containerX = 0;
var containerY = 0;

function fenstergroesse() {

	if (window.innerWidth) {
		breite = window.innerWidth;
		hoehe = window.innerHeight;
		
		if(breite < 1005){
			breite = 1005;
			hoehe = 640;
			}
		
	} else if (document.body && document.body.offsetWidth) {
		breite = document.body.offsetWidth;
		hoehe = document.body.offsetHeight;
		
		if(breite < 1005){
			breite = 1005;
			hoehe = 640;
			}
	}

}
function centerLayer(div){
	fenstergroesse();
	containerX = parseInt((breite/2)-(parseInt(document.getElementById(div).style.width)/2));
	containerY = parseInt((hoehe/2)-(parseInt(document.getElementById(div).style.height)/2));
	//alert (containerY);
	if(containerY<18){containerY=18;}
	
	document.getElementById(div).style.left = containerX;
	document.getElementById(div).style.top = containerY;
	
	document.getElementById(div).style.visibility = 'visible';

}
function ausrImpressum(){
	document.getElementById("impressum").style.left = parseInt(containerX)+"px";
	document.getElementById("impressum").style.top = (parseInt(containerY)-18)+"px";
	document.getElementById("impressum").style.visibility = 'visible';
}

function hideFlashNotice(){
	if(document.getElementById){
		document.getElementById("flashnotice").style.display= 'none';
	}
	else if(document.all){
		document.all.flashnotice.style.display= 'none';
	}
}


function popup(thema){
	switch(thema){
	
	case "impressum": 
		url = "impressum.htm"; size = "width=460,height=590";
	break;
	
	case "datenschutz": 
		url = "datenschutz.htm"; size = "width=460,height=590";
	break;
	}
	
	settings = "top=10,left=10,"+size+",menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no";
	window.open(url,'popup',settings);
}
