function thumbWindow(mypage, myname, w, h,fit_to_screen, imgtoolbar) {
	h = h+15;
	var props = '';
	var orig_w = w;
	var scroll = '';
	var winl = (screen.availWidth - w) / 2;
	var wint = (screen.availHeight - h) / 2;
	if (winl < 0) { winl = 0; w = screen.availWidth -6; scroll = 1;}
	if (wint < 0) { wint = 0; h = screen.availHeight - 32; scroll = 1;}
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	win = window.open('', 'myThumb', winprops)
	win.document.open();
	win.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
	win.document.write('<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">a:link,a:visited,a:active{text-decoration: none;color:#138acf;font-weight:bold;font-size:12px;}a:hover{text-decoration: underline;color: #003366;font-weight: bold;font-size:12px;}</style>');
	if (imgtoolbar==0) { win.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /><meta http-equiv="imagetoolbar" content="false" />'); }
	win.document.write('<title>'+myname+'</title></head>');
	win.document.write('<body style="margin:0;">');

if (fit_to_screen) {

var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);

if(ns6||ns4) {
sbreite = innerWidth - 23;

}
else if(ie4) {
sbreite = document.body.clientWidth - 6;
}

	if (orig_w>sbreite) { rw = 'width='+sbreite;} else {rw = '';}
	win.document.write('<img src="'+mypage+'" onclick="javascript:window.close();" alt="'+myname+'" title="'+myname+'" border="0" '+rw+' /><br /><div style="text-align:center;font-family:Arial, Helvetica, sans-serif;"><a href="javascript:;" onClick="javascript:window.close();">Fenster schlie&szlig;en</a></div></body></html>');
} else {

	win.document.write('<img src="'+mypage+'" onclick="javascript:window.close();" alt="'+myname+'" title="'+myname+'" border="0" /><br /><div style="text-align:center;font-family:Arial, Helvetica, sans-serif;"><a href="javascript:;" onClick="javascript:window.close();">Fenster schlie&szlig;en</a></div></body></html>');
	}

	win.document.close();
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }

}
