/*****************************************************************************
// 
// (c) 2002 M.Bothge - Schwarzheide 
// 
// BILD IN NEUEM ZENTRIERTEN FENSTER ÖFFNEN 
// 
**************/

function PictureOpen(Datei){ 

Bild1= new Image(); 
Bild1.src=(Datei); 
Control(Datei); 
} 
function Control(Datei){ 
if((Bild1.width!=0)&&(Bild1.height!=0)){ 
Anzeige(Datei); 
} 
else{ 
funzione="Control('"+Datei+"')"; 
intervallo=setTimeout(funzione,20); 
} 
} 

function Anzeige(Datei){ 

var copy = "- © 2003 COPYRIGHT -"; // Copyrightvermerk innerhalb des Bildes 
xsize=Bild1.width+50; // Rand zum Fensterabstand horizintal 
ysize=Bild1.height+85; // Rand zum Fenster vertikal 


ScreenWidth = screen.width; // Bildschirmeinstellung auslesen 
ScreenHeight = screen.height; //Bildschrimeinstellung auslesen 

xpos = (ScreenWidth/2)-(xsize/2); // Position des Fensters horizontal 
ypos = (ScreenHeight/2)-(ysize/2); // Position des Fensters vertikal 

if (ysize>ScreenHeight) ysize=(ScreenHeight-100); // Wenn Bild grösser als Bildschrimeinstellung 


string="width="+xsize+",height="+ysize+",left="+xpos+",top="+ypos+",scrollbars=0,resizable=0,location=0,directories=0,status=0,menubar=0,toolbar=0"; 

NewWindow=window.open("BILDANSICHT","Datei",string); 
NewWindow.document.write ("<html><head><title>BILDANSICHT</title></head>"); 
NewWindow.document.write ("<body topmargin=3 leftmargin=1 onload=focus()>"); 
NewWindow.document.write ("<form><table align=center cellspacing='0' cellpadding='5' border='0' bordercolor='#000000' style='border-collapse: collapse'><tr>"); 
NewWindow.document.write ("<td align='center' valign='top' bgcolor='#000000'>"); 
NewWindow.document.write ("<table border='1' cellpadding='0' cellspacing='1' style='background-image: url("); 
NewWindow.document.write (Datei); 
NewWindow.document.write (")' width='"); 
NewWindow.document.write (Bild1.width); 
NewWindow.document.write ("' height='"); 
NewWindow.document.write (Bild1.height); 
NewWindow.document.write ("'>"); 
NewWindow.document.write ("<tr>"); 
NewWindow.document.write ("<td width='100%' align='right' valign='bottom'><b><font face='Verdana' size='2'color='#C0C0C0'>"); 
NewWindow.document.write (copy); 
NewWindow.document.write ("  </font></b></td>"); 
NewWindow.document.write ("</tr></table>"); 
NewWindow.document.write ("</td></tr><tr>"); 
NewWindow.document.write ("<td align='center'>"); 
NewWindow.document.write ("<table border='0' cellpadding='3' cellspacing='0' style='border-collapse: collapse' bordercolor='#111111' width='100%'><tr>"); 
NewWindow.document.write ("<td width='50%' align='center'><input type='button' value='BILD AUSDRUCKEN' style='font-family: Verdana; font-size: 10px; width: 150' onclick='window.print()'></td>"); 
NewWindow.document.write ("<td width='50%' align='center'><input type='button' value='FENSTER SCHLIESSEN' style='font-family: Verdana; font-size: 10px; width: 150' onClick='self.close()'></td>"); 
NewWindow.document.write ("</tr></table>"); 
NewWindow.document.write ("</td></tr></table></form>"); 
NewWindow.document.write ("</body></html>"); 
NewWindow.document.close(); 
NewWindow.resizeTo(xsize,ysize); 
}
 
