var screenW = window.screen.width;
var screenH = window.screen.height;

function wopen(foto,popis){
	myLeft = (screenW > 800) ? ((screenW / 2) - (390 + 10)) : 10;
	myHeight = (screenH > 600) ? 605 : 550;
	photo = window.open('','photo','width=780,height='+myHeight+',top=0,left='+myLeft+',scrollbars=yes,resizable=yes');
	photo.focus();
	okno(foto,popis);
}
function okno(foto,popis){
with(photo.document){
	open();
	writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html>\n');
	writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
	writeln('<meta http-equiv="Content-Language" content="cs">');
	writeln('<meta http-equiv="imagetoolbar" content="no" />');
	writeln('<head><title>'+popis+'</title>\n</head>');
	writeln('<body style="background-color: #fff; margin:0px; padding:0px" title="Kliknutím zavøete okno">');
	writeln('<table style="width: 100%; height: 100%; cursor: hand; cursor: pointer" cellspacing="0" cellpadding="0" onClick="window.close()">');
	write('<tr><td align="center" valign="middle">');
	write('<img src="images/fotky/'+foto+'" border="0"></td>');
	writeln('</tr>\n</table>');
	writeln('</body>\n</html>');
	close();
}}

