function ShowPhoto(Photo,WidthWin,HeightWin,Zag)
{
// Описываем параметры окна
param = "Width=" + WidthWin + ","            ;
param = param + "Height=" + HeightWin + ","  ;
param = param + "Top=200,"             ;
param = param + "Left=200,"            ;
param = param + "Toolbar=0,"         ;
param = param + "Status=0,"          ;
param = param + "Menubar=0,"         ;
param = param + "location=0,"        ;
param = param + "Scrollbars=1,"      ;
param = param + "Resizable=1"        ;
// открыть объект document для последующей печати 
myWin=window.open("", "Photo", param); 
// генерировать новый документ 
myWin.document.write("<html>");
myWin.document.write("<head>");
myWin.document.write("<title>");
myWin.document.write(Zag);
myWin.document.write("</title>"); 
myWin.document.write("<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-27552948-1']);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type =
'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
 })();

</script>
</HEAD>");
myWin.document.write("<body topmargin='0' leftmargin='0' bgcolor = '#ffffff'>");
myWin.document.write("<IMG src=" + Photo + 
               " border='0' align='' valign='' alt=\'  " +Zag+ " \' hspace='0' vspace='0' >"); 
myWin.document.write("</body></html>");

//Width=100%

// закрыть документ - (но не окно!) 
myWin.document.close(); 
}
