
var NS4 = document.layers;
var msgWindow=0;
var sichtMenue="";

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


//---------------------------------------------------------------------------------
function showMenue(LName){
	if(NS4){
		var aktL=window.document.layers[LName];
	}else{
		var obj=window.document.getElementById(LName);
		var aktL=obj.style;
	}
	
	//----- vorherigen Layer wieder unsichtbar machen
	if(sichtMenue!=""){
		if(NS4){
			var oldL=window.document.layers[sichtMenue];
		}else{
			var obj=window.document.getElementById(sichtMenue);
			var oldL=obj.style;
		}
		oldL.visibility = "hidden";
	}
	
	
	window.scroll(0,0);
	if(sichtMenue==LName){
		aktL.visibility = "hidden";
		sichtMenue="";
	}else{
		aktL.visibility = "visible";
		sichtMenue=LName;
	}
}

function clearAllMenue(){
	clearMenue("unternehmen");
}

function clearMenue(LName){
	sichtMenue="";
	
	if(NS4){
		var aktL=window.document.layers[LName];
	}else{
		var obj=window.document.getElementById(LName);
		var aktL=obj.style;
	}
	
	aktL.visibility = "hidden";
}


function centerWindow(aurl, width, height)
{
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;
  var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;

	if(msgWindow){
		if(!msgWindow.closed) msgWindow.close();
	}

 	msgWindow = window.open(aurl,"VWA", styleStr);
}

