// Script copyright by Michael Praast, http://www.praast.de
// *********** AB HIER NICHTS MEHR ÄNDERN !!! ***********
// Variablen deklarieren
var x=0;var y=0; var h=0;

function oeffne(bild,hoehe,weite){
// UMRECHNUNGEN:
// für NN-Fenster muss ein größeres Window aufgebaut werden, da der kein CSS2 kann:
if (document.layers) {y=(Number(weite)+15);x=(Number(weite)+15);h=(Number(hoehe)+55)}

// für IE übernehmen wir einfach die Höhe (+50px für Button) und Breite
else {x=hoehe;h=(Number(hoehe)+50);y=weite;}

// nun das seperate Fenster oeffnen:
mywin=window.open("","Detailansicht","height="+h+",width="+y+",top=10,left=10,screenX=10,screenY=10");
	mywin.document.open('text/html', 'replace');
	mywin.document.write('<HTML><HEAD><TITLE>Detailansicht<\/TITLE><\/HEAD>');
	mywin.document.write('<BODY bgcolor=white leftmargin=0 topmargin=0>');
	mywin.document.write('<IMG SRC=');
	mywin.document.write(bild);
	mywin.document.write(' WIDTH=');
	mywin.document.write(weite);
	mywin.document.write(' HEIGHT=');
	mywin.document.write(hoehe);
	mywin.document.write(' BORDER=0 VSPACE=0 HSPACE=0 ALT="Lade Bild. Einen Moment bitte!" TITLE=""><BR>');
	// mywin.document.write('<CENTER><FORM><INPUT TYPE="BUTTON" VALUE="SCHLIESSEN" onClick="self.close\(\);"><\/FORM><\/CENTER>');
	mywin.document.write('<p align="center"><a href="#" style="font-weight:bold;font-family:VERDANA,ARIAL;color:blue" onClick="self.close\(\);">[ Fenster schließen ]<\/a><\/p>');
	hs=hoehe+20;
	//mywin.document.write('<span style="font-family:Arial,sans-serif;font-size:0.7em;color:#008080;position:absolute;top:'+hs+'px;left:10px;">Script created &amp\; &copy\; by<br> <a href="http:/'+'/www.praast.de/" target="_blank">Michael Praast</a>.</span>');
	mywin.document.write('<\/BODY>');
	mywin.document.close();
	mywin.focus();
}
// alte Fensterrefferenz und auch das Fenster entsorgen:
onfocus=myCloser;
function myCloser()
{
    if(self.mywin && !self.mywin.closed)
    {
        self.mywin.close();  self.mywin = null;   
    }
}