// JavaScript Document
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 switchCopy(myParam) {
	if (document.getElementById) {
		var aParams = myParam.split(',');
		for (i=0;i<aParams.length;i++) {
			var aTmp = aParams[i].split('=');
			var tmp=document.getElementById(aTmp[0]);
			var linkfett=document.getElementById('p'+(i+1));
			if (tmp && aTmp[1]=='on') {
				tmp.style.display = 'block';
				if (linkfett) linkfett.style.fontWeight = 'bold';
			} else {
				tmp.style.display = 'none';
				if (linkfett) linkfett.style.fontWeight = 'normal';
			}
		}
	}
}
function switchImg(x,y,z,k) {
/*
	x = Bild für <div id="bild7">
	y = Bild für <div id="bild8">
	z = Bild für <div id="bild9">
	k = id des <IMG> Tags, dessen src mit dem Kreuz-Bild ausgestattet werden soll
*/
	if (document.getElementById) {
		myBild7 = document.getElementById('bild7');
		myBild8 = document.getElementById('bild8');
		myBild9 = document.getElementById('bild9');
		myKreuz = document.getElementById(k);

		//alert('url(' + x + ')');
		
		myBild7.style.backgroundImage = 'url(' + x + ')';
		myBild8.style.backgroundImage = 'url(' + y + ')';
		myBild9.style.backgroundImage = 'url(' + z + ')';
		
		// zunächst alle <img id="img??? auf transparentes Bild setzen
		for (i=1;i<=6;i++) {
			dummy = document.getElementById('img' + i);
			if (dummy) dummy.src = '../img/-.gif';
		}
		// ... dann das Kreuz einblenden
		if (myKreuz) myKreuz.src = '../img/kreuz.gif';

		// ... dann erst alle Klammern [] ausblenden
		for (i=7;i<=9;i++) {
			tmp = document.getElementById('klammer' + i);
			if(tmp) tmp.style.display='none';
		}
		// ... und eine zufällig wieder einblenden
		var rand = Math.floor(Math.random()*3)+7;
		tmp = document.getElementById('klammer' + rand);
		if(tmp) tmp.style.display='inline';
	}
}

newwindow=false;
function fenster(url,name,breite,hoehe) {
  if(newwindow&&newwindow.closed==false)
    newwindow.close()
    var l = (screen.availWidth - breite) / 2;
    var t = (screen.availHeight - hoehe) / 2;
    newwindow = window.open(url,name,"width=" + breite +
                                            ",height=" + hoehe +
                                            ",left=" + l +
                                            ",scrollbars=no" +
                                            ",top=" + t + ";")
  newwindow.focus();
}
