navia = new Image();
navia.src = "img/p_navi.gif";
navic = new Image();
navic.src = "img/1p.gif";

function mainWindow(url, name, width, height, toolbar, menubar, location) {
	kp = window.open(url,name,"width=" + width + ",height=" + height + ", toolbar=" + toolbar + ",status=yes,scrollbars=no,resizable=no,menubar=" + menubar + ",location=" + location);
	window.kp.focus();
	return false;
}


function Bw(n,pobjekt) {
	eval('window.document.images.'+n+'.src = pobjekt.src');
}

function BwL(lay,n,pobjekt) {
	if(document.layers){
		eval('document.layers["'+lay+'"].document.images.'+n+'.src = pobjekt.src');
	}else{
		eval('window.document.images.'+n+'.src = pobjekt.src');
	}
}

function resize(x,y) {
	if(document.layers){
		window.resizeTo(x,y);
	}else{
		x = x+12;
		y = y+28;
		window.resizeTo(x,y);
	}
}


function groesse() {
	if(document.layers){
	window.resizeTo(814,610);
	}else{
	window.resizeTo(842,750);
	}
}


var nn1,nn2,nn3,nn4,ie1,ie2,ie3,ie4;
var ln;
var mmenue;
function showMenue(menue,a1,a2,a3,a4,b1,b2,b3,b4){
	if(document.layers)	{
		nn1 = a1;
		nn2 = a2;
		nn3 = a3;
		nn4 = a4
		ln = menue;
		eval('document.layers["'+menue+'"].visibility="visible"');
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=handleMove;
	}else if (document.all)	{
		ie1 = b1;
		ie2 = b2;
		ie3 = b3;
		ie4 = b4;
		ln = menue;
		eval('document.all["'+menue+'"].style.visibility="visible"');
		document.onmousemove=handleMove;
	}else if (document.getElementById) {
		nn1 = a1;
		nn2 = a2;
		nn3 = a3;
		nn4 = a4
		ln = menue;
		document.getElementById(""+menue+"").style.visibility = 'visible';
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=handleMove;
	} 
}

function showSMenue(menue,mm,smn,sm,t,b1,b2,b3,b4){
	if(document.layers)	{
		hideSMenue(smn,sm);
		ie1 = b1;
		ie2 = b2;
		ie3 = b3;
		ie4 = b4;
		ln = menue;
		mmenue = mm;
		eval('document.layers["'+menue+'"].top='+t);
		eval('document.layers["'+menue+'"].visibility="visible"');
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=handleMoveSM;
	}else if (document.all)	{
		hideSMenue(smn,sm);
		ie1 = b1;
		ie2 = b2;
		ie3 = b3;
		ie4 = b4;
		ln = menue;
		mmenue = mm;
		eval('document.all["'+menue+'"].style.top='+t);
		eval('document.all["'+menue+'"].style.visibility="visible"');
		document.onmousemove=handleMoveSM;
	}else if (document.getElementById) {
		hideSMenue(smn,sm);
		ie1 = b1;
		ie2 = b2;
		ie3 = b3;
		ie4 = b4;
		ln = menue;
		mmenue = mm;
		document.getElementById(""+menue+"").style.top = t;
		document.getElementById(""+menue+"").style.visibility = 'visible';
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=handleMoveSM;
	} 
}


function handleMove(ev) {
	if (document.all) {
		if((window.event.clientX < ie1) | (window.event.clientX > ie2) | (window.event.clientY < ie3 ) | (window.event.clientY > ie4)){
			hideLayer(''+ln+'');
		}
	}else {
		Event = ev;
		if((Event.layerX < nn1) | (Event.layerX > nn2) | (Event.layerY < nn3) | (Event.layerY > nn4)){
			hideLayer(''+ln+'');
			document.releaseEvents(Event.MOUSEMOVE);
		}
	}
}


function handleMoveSM(ev) {
	if (document.all) {
		if((window.event.clientX < ie1) | (window.event.clientX > ie2) | (window.event.clientY < ie3 ) | (window.event.clientY > ie4)){
			hideLayer(''+ln+'');
			hideLayer(''+mmenue+'');
		}
	}else {
		Event = ev;
		if((Event.pageX < ie1) | (Event.pageX > ie2) | (Event.pageY < ie3) | (Event.pageY > ie4)){
			hideLayer(''+ln+'');
			hideLayer(''+mmenue+'');
			document.releaseEvents(Event.MOUSEMOVE);
		}
	}
}


function hideLayer(layerName) {
	if(document.layers)	{
		eval('document.layers["'+layerName+'"].visibility="hidden"');
	}else if (document.all)	{
		eval('document.all["'+layerName+'"].style.visibility="hidden"');
	}else if (document.getElementById) {
		document.getElementById(""+layerName+"").style.visibility= 'hidden';
	} 
}

function hideSMenue(name,anzsm) {
	if(document.layers)	{
		var i;
		for(i=0;i<(anzsm);i++){
			eval('document.layers["'+name+''+i+'"].visibility="hidden"');
		}
	}else if (document.all)	{
		var i;
		for(i=0;i<(anzsm);i++){
			eval('document.all["'+name+''+i+'"].style.visibility="hidden"');
		}
	}else if (document.getElementById) {
		var i;
		for(i=0;i<(anzsm);i++){
			document.getElementById(""+name+""+i+"").style.visibility= 'hidden';
		}
	} 
}


function newWindow(d,w,h) {
	if(document.all){
		if(window.kp){
			if(window.kp.closed == true){
						kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
						window.kp.focus();
						return false;
			}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
			}
		}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
		}
	}else if(document.layers){
		if(window.kp){
			if(window.kp.closed == true){
						kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
						window.kp.focus();
						return false;
			}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
			}
		}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
		}
	}else if(document.getElementById){
		if(window.kp){
			if(window.kp.closed == true){
						kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
						window.kp.focus();
						return false;
			}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
			}
		}else{
			kp = window.open(""+d+"","ks","width="+w+",height="+h+",resizable=yes,scrollbars=no,status=no");
			window.kp.focus();
			return false;
		}
	}

}

function aender(who){
	if(document.layers)	{
//	document.anchors["Ankername"].Eigenschaft
		eval('document.anchors["'+who+'"].background="#666666"');
	}else if (document.all)	{
		eval('document.anchors["'+who+'"].style.backgroundColor="#666666"');
	}else if (document.getElementById) {
		document.getElementById(""+who+"").style.backgroundColor= '#666666';
	} 
}

