
popx=0;
function popup(Grafik) {

bild= new Image();
bild.src=(Grafik);
groesse(Grafik);
}
function groesse(Grafik){
if((bild.width!=0)&&(bild.height!=0)){
GrafikBreit=bild.width;
GrafikHoch=bild.height;

AusgleichBreit=0;                     // Fenster breiter als Grafik
AusgleichHoch=20;                     // Fenster hoeher als Grafik
FensterBreit=GrafikBreit+AusgleichBreit;
FensterHoch=GrafikHoch+AusgleichHoch;
PositionX=((screen.availWidth/2)-(FensterBreit/2));    // Anzeigeposition von links
PositionY=((screen.availHeight/2)-(FensterHoch/2));    // Anzeigeposition von oben

// nachfolgend die Eigenschaften des Pop-Up
popGrafik=window.open("",popx,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,fullscreen=0,width="+FensterBreit+",height="+FensterHoch+",top="+PositionY+",left="+PositionX);

//  Anfang Inhalt des Pop-Up
popGrafik.document.writeln("<html><head></head>");
popGrafik.document.writeln("<body bgcolor='#FFFFFF' text='#000000' link='#00000' vlink='#000000' marginheight='0' marginwidth='0' topmargin='0' leftmargin='0'>");
popGrafik.document.writeln("<center><img name='Bild"+popx+"' src='"+Grafik+"' width='"+GrafikBreit+"' height='"+GrafikHoch+"'><BR>");
popGrafik.document.writeln("<a href='javascript:window.close()' style='font-family:Arial; font-size:11px; text-decoration:none'>Fenster schliessen</a></center>");
popGrafik.document.writeln("</body></html>");
//  Ende Inhalt des Pop-Up

popx ++;
//  Ende Inhalt des Pop-Up

}
else{
moment="groesse('"+Grafik+"')";
warten=setTimeout(moment,100);
}
}

function hide() {
	document.getElementById("PR").style.display = "none";
	document.getElementById("PO").style.display = "none";
	document.getElementById("NE").style.display = "none";
	document.getElementById("KA").style.display = "none";
	}

function show(id) {
	var visible = document.getElementById(id).style.display;

	if(visible == "none") {
	document.getElementById(id).style.display = "block";
	} else {
	document.getElementById(id).style.display = "none";
	}
}
