<!--

/* Funktion fuer den Handler onClick in der Navigation*/
var nr;
function show(nr){

	if(document.getElementById(nr).style.display == "block"){
		// wenn das Element "block" ist, wird es beim Funktionsaufruf "none" gesetzt
		document.getElementById(nr).style.display = "none";
	}else{
		// wenn das Element "none" ist, wird es beim Funktionsaufruf "block" gesetzt
		document.getElementById(nr).style.display = "block";
		
		// alle, ausser das aufgerufene Element, auf "none" setzen
		for (i=1; i<=document.getElementsByName("ub").length; i++) {
			if (i != nr) {
				document.getElementById(i).style.display = "none";
			}
		}
	}
}

function setDiv(id) {
	op = window.opera;
	ie = (document.all);
	ie7 = window.XMLHttpRequest && window.ActiveXObject;
	dom = (!ie && document.getElementById);
	w = parseInt(document.getElementById(id).style["width"]); // Breite des anzuzeigenden Containers
	h = parseInt(document.getElementById(id).style["height"]); // Hoehe des anzuzeigenden Containers
	breite = 955; // Breite des all-Containers
	cw = (breite - w)/2;
	
	if (op) {
	
		ch = (document.body.clientHeight - h)/2;
		Left = Math.round(cw + document.documentElement.scrollLeft);
		Top = Math.round(ch + document.documentElement.scrollTop + 400);
		//alert("IE\nLayer: " + w + " x " + h + "\nScreen: " + document.body.clientWidth + " x " + document.body.clientHeight + "\nScroll: " + document.documentElement.scrollLeft + " x " + document.documentElement.scrollTop + "\nLeft/Top: " + Left + " x " + Top);
	
	} else if (ie && !ie7) {
		
		ch = ((screen.availHeight - h)/2) - 70;
		Left = Math.round(cw + document.documentElement.scrollLeft);
		Top = Math.round(ch + document.documentElement.scrollTop);
		//alert("IE\nLayer: " + w + " x " + h + "\nScreen: " + screen.availWidth + " x " + screen.availHeight + "\nScroll: " + document.documentElement.scrollLeft + " x " + document.documentElement.scrollTop + "\nLeft/Top: " + Left + " x " + Top);
	
	} else if(ie7) {
		
		ch = (document.documentElement.clientHeight - h)/2;
		Left = Math.round(cw + document.documentElement.scrollLeft);
		Top = Math.round(ch + document.documentElement.scrollTop);
		//alert("IE 7\nLayer: " + w + " x " + h + "\nScreen: " + document.documentElement.clientWidth + " x " + document.documentElement.clientHeight + "\nScroll: " + document.documentElement.scrollLeft + " x " + document.documentElement.scrollTop + "\nLeft/Top: " + Left + " x " + Top);
	
	} else if (dom) {
		
		ch = (window.innerHeight - h)/2;
		Left = Math.round(cw + window.pageXOffset);
		Top = Math.round(ch + window.pageYOffset);
		//alert("DOM\nLayer: " + w + " x " + h + "\nScreen: " + window.innerWidth + " x " + window.innerHeight + "\nScroll: " + window.pageXOffset + " x " + window.pageYOffset + "\nLeft/Top: " + Left + " x " + Top);
	
	}
	
	document.getElementById(id).style.left = Left+'px';
	document.getElementById(id).style.top = Top+'px';
	
	Leftx = Left - cw;
	Topy = Top - ch;
	window.setTimeout("window.scrollTo(Leftx, Topy)", 100);
}

 function shw(id, bild, BU){
	 document.images['grb'].src = bild;
	document.getElementById('bu').value=BU;
	document.getElementById(id).style.display='block';
	setDiv(id);
}

function hd(gb){
	document.getElementById(gb).style.display='none';
}

var Objekte = new Array("d1","d2","d3");
function displ(elem){
	document.getElementById(elem).style.display='block';
	for(var i = 0; i < Objekte.length; ++i){
		if(Objekte[i] != elem){
			document.getElementById(Objekte[i]).style.display='none';
		}
	}
}
		
function hide(){
	for(var i = 0; i < Objekte.length; ++i){
		document.getElementById(Objekte[i]).style.display='none';
	}
}
//-->
