function PrintWindow(url){
 window.open(url,'print','location=0,menubar=0,resizable=yes,status=0,menubar=no,width=600,height=500,scrollbars=yes');
}


function PopupImage(img, name, description, url) {
    __title=name;
    w=open("",'','width=300,height=200,toolbar=no,scrollbars=no,resizable=yes');  
    w.document.write("<HTML><HEAD><TITLE>"+__title+"</TITLE></HEAD>\n");

    w.document.write("<link href='"+url+"/css/style.css' rel='stylesheet' type='text/css'>\n");

    w.document.write("<SCRIPT language=javascript>function MM_preloadImages() { //v3.0\n");
    w.document.write("  var d=document;\n");
    w.document.write("  if(d.images) {\n");
    w.document.write("      if(!d.MM_p) d.MM_p=new Array();\n");
    w.document.write("      var i, j=d.MM_p.length, a=MM_preloadImages.arguments;\n");
    w.document.write("      for(i=0; i<a.length; i++)\n");
    w.document.write("          if (a[i].indexOf('#')!=0) {\n");
    w.document.write("              d.MM_p[j]=new Image;\n");
    w.document.write("              d.MM_p[j++].src=a[i];\n");
    w.document.write("          }\n");
    w.document.write("  }\n");
    w.document.write("}\n");
    
    w.document.write("function MM_swapImgRestore() { //v3.0\n");
    w.document.write("  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;\n");
    w.document.write("}\n");

    w.document.write("function MM_findObj(n, d) { //v4.01\n");
    w.document.write("  var p,i,x;  if(!d) d=document; if((p=n.indexOf('?'))>0&&parent.frames.length) {\n");
    w.document.write("    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}\n");
    w.document.write("  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];\n");
    w.document.write("  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);\n");
    w.document.write("  if(!x && d.getElementById) x=d.getElementById(n); return x;\n");
    w.document.write("}\n");

    w.document.write("function MM_swapImage() { //v3.0\n");
    w.document.write("  var i,j=0,x,a=MM_swapImage.arguments;\n");
    w.document.write("  document.MM_sr=new Array;\n");
    w.document.write("  for(i=0;i<(a.length-2);i+=3) {\n");
    w.document.write("      if ((x=MM_findObj(a[i]))!=null) {\n");
    w.document.write("      document.MM_sr[j++] = x;\n");
    w.document.write("      if(!x.oSrc) {\n");
    w.document.write("          x.oSrc=x.src;\n");
    w.document.write("      }\n");
    w.document.write("      x.src=a[i+2];\n");
    w.document.write("  }\n");
    w.document.write("  }\n");
    w.document.write("}\n");
    w.document.write("</"+"SCRIPT>\n");

    w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) { window.resizeTo(document.images[0].width+58,document.images[0].height+155); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>\n");
    //w.document.write("<head><link href=\"../texho.css\" rel=\"stylesheet\" type=\"text/css\"></head>");
    w.document.write("<BODY onload=\"checksize()\" bgcolor='#F0F0F0' leftMargin='5' topMargin='5' marginwidth='5' marginheight='5'>\n");
    w.document.write("<center><table border='0' cellpadding='0' cellspacing='4' bgcolor='#FFFFFF' height='100%' width='100%'>\n");
    w.document.write("    <tr valign='top'>\n");
    w.document.write("    <td colspan='2' align='center'><a href='#' onclick='window.close();' alt='Закрыть' title='Закрыть'><img border='0' id='main' src='" + img + "' class='aA'></a></td>\n");
    w.document.write("  </tr>\n");
    w.document.write("    <tr valign='top' >\n");
    w.document.write("    <td colspan='2' align='center' class='news_label' bgcolor='F0F0F0'><strong>"+ name +"</strong><br>"+ description +"</td>\n");
    w.document.write("  </tr>\n");
    w.document.write("</table></center>\n");
    w.document.write("</BODY></HTML>");
    w.document.close();
}
