
function popUp(imgUrl, winName, winTitle, footnote, imgWidth, imgHeight, cssUrl, jsUrl) {
	var win = null;
	var result = true;
	var outerWidth = imgWidth;
	var outerHeight = imgHeight;

	if (footnote) {
		outerHeight += 45;
	}
	if (outerWidth < 100) {
		outerWidth = 100;
	}
	if (outerHeight < 100) {
		outerHeight = 100;
	}
	win = window.open("", winName, "width=" + outerWidth + ",height=" + outerHeight + ",directories=no,location=no,menubar=no,resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no");
	if (win != null) {
		win.document.open("text/html");
		win.document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		win.document.writeln('<html lang="de" xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">');
		win.document.writeln('<head>');
		win.document.writeln('<title>' + winTitle + '</title>');
		win.document.writeln('<meta content="text/html; charset=iso-8859-1" http-equiv="content-type" />');
		win.document.writeln('<meta content="text/css" http-equiv="content-style-type" />');
		win.document.writeln('<meta content="text/javascript" http-equiv="content-script-type" />');
		win.document.writeln('<link href="' + cssUrl + '" type="text/css" rel="stylesheet" />');
		win.document.writeln('<scr' + 'ipt type="text/javascript" language="JavaScript">');
		win.document.writeln('function closeWindow() {window.close();}');
		win.document.writeln('window.document.onmousedown = closeWindow;');
		win.document.writeln('</' + 'script>');
		win.document.writeln('</head>');
		win.document.writeln('<body onblur="closeWindow()" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
		win.document.writeln('<div align="center">');
		win.document.writeln('<img src="' + imgUrl + '" width="' + imgWidth + '" height="' + imgHeight + '" border="0" alt="' + winTitle + '" />');
		win.document.writeln('</div>');
		if (footnote) {
			win.document.writeln('<div class="footnote" align="center">');
			win.document.writeln(footnote);
			win.document.writeln('</div>');
		}
		win.document.writeln('</body>');
		win.document.writeln('</html>');
		win.document.close();
		result = false;
	}
	return result;
}


function closeWindow() {
	window.close();
}


function initWindow() {
	window.document.onmousedown = closeWindow;
}

