// ----------------------------------------------------------------------------
// Open a window, resize it, and display an image w/ a window-close link.
// ----------------------------------------------------------------------------
// KH: Konrad Holl
// ----------------------------------------------------------------------------
// 2002/05/15: Initial release (KH)
// 2002/06/11: Added language dependant close link (KH)
// 2002/06/12: Added directory depth analyzation for LINK tag (KH)
// ----------------------------------------------------------------------------

function detailWindow (strIMGsrc, intIMGwidth, intIMGheight, strIMGalt) {
	win = window.open('', 'detail', 'height=' + intIMGheight + ',width=' + intIMGwidth + ',toolbar=no,scrollbars=no,status=no,location=no,menubar=no,resizable=yes');
	//
	// Resize the window depending on the browser
	//
	if (navigator.appName != "Netscape")
		win.resizeTo(intIMGwidth + 12, intIMGheight + 66);
	else if (navigator.appVersion.charAt(0) == "4")
		win.resizeTo(intIMGwidth, intIMGheight + 30);
	else
		win.resizeTo(intIMGwidth + 8, intIMGheight + 60);
	//
	// Get the upward directory portion.
	//
	strUpDir = strIMGsrc.slice(0, strIMGsrc.lastIndexOf('../') + 3);
	//
	// Write the HTML code to the new window.
	//
	doc = win.document;
	doc.writeln('<HTML>');
	doc.writeln('<HEAD>');
	doc.writeln('<LINK rel="stylesheet" type="text/css" href="' + strUpDir + 'style.css" />');
	doc.writeln('<TITLE>' + strIMGalt + '</TITLE>');
	doc.writeln('</HEAD>');
	doc.writeln('<BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">');
	doc.writeln('<DIV align="center" class="klein">');
	doc.write('<A href="javascript:self.close();">');
	doc.write('<IMG src="' + strIMGsrc + '" width="' + intIMGwidth + '" height="' + intIMGheight + '" alt="' + strIMGalt + '" border="0" />');
	doc.write('<BR /><BR />');
	doc.write((document.URL.indexOf('/deutsch/') > -1) ? '[Schlie&szlig;en]' : '[Close]');
	doc.writeln('</A>');
	doc.writeln('</DIV>');
	doc.writeln('</BODY>');
	doc.writeln('</HTML>');
	doc.close();
	//
	// Activate the new window.
	//
	win.focus();
}


