function fWin(vImgUrl, vImgWidth,  vImgHeight){
   var vWindowWidth = vImgWidth * 1.0 + 20;
   var vWindowHeight =  vImgHeight * 1.0 + 80;
   var vWindowLeft = ( screen.width / 2 ) - ( vWindowWidth / 2);
   var vWindowTop = ( screen.height / 2 ) - ( vWindowHeight / 2);
   var vWindow = window.open("./template/photo.html", "", "toolbar=no, menubar=no, location=no, personalbar=no, status=no, resizable=no, scrollbars=no, copyhistory=no, width="+vWindowWidth+", height="+vWindowHeight+", top="+vWindowTop+", left="+vWindowLeft);
   vWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n'+
   '<html>\n'+
   '\t<head>\n'+
   '\t\t<title> </title>\n'+
   '\t\t<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">\n'+
   '\t\t<link href="./css/gallery_style.css" rel="stylesheet" type="text/css" media="screen" />\n'+
   '\t</head>\n'+
   '\t<body class="img_body">\n'+
   '\t\t<img class="zdjecie" src="'+vImgUrl+'">\n'+
   '\t\t<input type="button" value="zamknij okno" onclick="window.close()" >\n'+
   '\t</body>\n'+
   '</html>\n');
}
