// *************************************
// Skript zum Bilderanzeigen
// *************************************
// Erstellt eine temporäre HTML-Datei - 
// so muss nur das Bild angegeben werden
// *************************************

function imageView(bild, beschreibung, weite, hoehe)        
{
 // Fensterhöhe für Beschreibung (unter Bild) anpassen
 var descHoehe = hoehe + 60;

 // Variablen füllen
 var posi_links = screen.availWidth / 2-(weite/2);
 var posi_oben = screen.availHeight / 2-(hoehe/2);
 parameterListe = ('width='+ weite +',height='+ descHoehe +',left='+ posi_links +',top='+ posi_oben +',directories=0,location=0,menubar=0,personalbar=0,toolbar=0,status=0,scrollbars=0,resizable=0');

 // Temp. HTML-Seite erzeugen
 fenster = window.open("",'tmpFile',parameterListe);
 
 // HTML-Inhalt in die Datei schreiben (das kannst du auch anpassen)
 with (fenster.document) {
		open();
		write("<html>");
		write("<head>");
		write("<title>Bildanzeige: " + beschreibung + "</title>");
		write("<style type='text/css'>");
		write("  body {font-size:13px; margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px }");
		write(" .txtNormal {font-size:13px; color: #FFFFFF; font-family:Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif}");
		write(" .txtKlein {font-size:11px; color: #FFFFFF; font-family:Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif}");
		write(" a:link { font-family: Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none;}");
		write(" a:visited { font-family: Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none;}");
		write(" a:hover { font-family: Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none;}");
		write(" a:active { font-family: Calibri, Tahoma, Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF; text-decoration: none;}");
		write("</style>");
		write("</head>");
		
		// Hintergrund schwarz mit Lade-Bild
		write("<body onLoad=self.focus() marginwidth='0' marginheight='0' leftmargin='0' topmargin='" + descHoehe + "' bgcolor='#000000' text='#000000' background='/images/loading.jpg'>");
		
		// Bild anzeigen
		write("<div align='center'>");
		write("<span class='txtNormal'><b>" + beschreibung + "</b><br>");
		write("<a href='javascript:self.close()'><img src='" + bild + "' width='" + weite + "' height='" + hoehe + "' border='0' title='" + beschreibung + "'></a><br>");
		
		// Beschreibung unter Bild anzeigen
		write("<span class='txtKlein'><a href='javascript:self.close()'>Klicken Sie auf das Bild um dieses Fenster zu schlie&szlig;en</a></span>"); 
		write("</span>"); 
		
		write("</div>");
		write("</body>");
		write("</html>");		
		close();
	}

 // HTML-Seite mit Bild anpassen
 //window.fenster.resizeTo(weite,descHoehe);
}

