function foto(URL) {
	if (navigator.appName == "Netscape")
		{window.open(URL)}
	else
		{
		var WindowLeftPos = 0
	
		var win = (URL,"_blank",'leftmargin=0,topmargin=0,marginwidth=0,marginheight=0,toolbar=0,titlebar=0,menubar=0,location=0,scrollbars=1,resizable=0,width=300,height=350,left=10,top=0');

		var msgWindow = window.open ('', 'ImageDetail', win);
		msgWindow.document.writeln ('<html>');
		msgWindow.document.writeln ('<head>');
		msgWindow.document.writeln ('<title>:. LFHK - detail obrázku .:</title>');
		msgWindow.document.writeln ('<script language="JavaScript">');
		msgWindow.document.writeln ('function ImgSize() {');
		msgWindow.document.writeln ('if (screen.height <= (image.height+80) && screen.width <= (image.width+30)) {window.resizeTo(screen.width-50,screen.height-100);}');
		msgWindow.document.writeln ('else if (screen.height <= (image.height+80) && screen.width >= (image.width+30)) {window.resizeTo(image.width+30,image.height-100)}');
		msgWindow.document.writeln ('else if (screen.height >= (image.height+80) && screen.width <= (image.width+30)) {window.resizeTo(image.width-50,image.height+30)}');
		msgWindow.document.writeln ('else {window.resizeTo(image.width+30,image.height+30);}');
		msgWindow.document.writeln ('}');
		msgWindow.document.writeln ('<' + '/script>');
		msgWindow.document.writeln ('</head>');
		msgWindow.document.writeln ('<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="#ffffff">');
		msgWindow.document.writeln ('<div align="center">');
		msgWindow.document.writeln ('<a href="JavaScript:window.close();">');
		msgWindow.document.writeln ('<br/><br/><font color="#000000" face="Verdana" size="-2"><b>obrázek se načítá</b></font>');
		msgWindow.document.writeln ('<a href="JavaScript:window.close();"><img style="position:absolute;top:0px;left:2px" onload="ImgSize()" align="middle" id="image" src="'+URL+'" border="0" alt="zavřít okno"></a>');
		msgWindow.document.writeln ('</div>');
		msgWindow.document.writeln ('</body>');
		msgWindow.document.writeln ('</html>');
		}
}
