function ImgShw(ID, width, height, title, image_subject, comment) {
  var scroll = "no";
  var top=0, left=0;
  if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
  if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
  if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
  width = Math.min(width, screen.width-10);
  height = Math.min(height, screen.height-28);
  width = width + 20;
  height = height + 100;
  var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
  wnd.document.write("<html><head>\n");
  wnd.document.write("<"+"script language='JavaScript'>\n");
  wnd.document.write("<!--\n");
  wnd.document.write("function KeyPress()\n");
  wnd.document.write("{\n");
  wnd.document.write("        if(window.event.keyCode == 27)\n");
  wnd.document.write("                window.close();\n");
  wnd.document.write("}\n");
  wnd.document.write("//-->\n");
  wnd.document.write("</"+"script>\n");
  wnd.document.write("<title>"+title+"</title></head>\n");
  wnd.document.write("<body bgcolor=\"#13203A\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">\n");
  wnd.document.write("<div align=\"center\">");
  wnd.document.write("<table width=\""+width+"\" border=\"0\" cellpadding=\"5\" cellspacing=\"1\"><tr>");
  wnd.document.write("<td align=\"right\"><span style=\"font-family: Verdana; font-size: 8pt; color: #BEBEC6\">"+image_subject+"</span></td></tr><tr><td>");
  wnd.document.write("<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#999999\"><tr>");
  wnd.document.write("<td bgcolor=\"#13203A\"><a href=\"javascript:window.close()\"><img src=\""+ID+"\" border=\"0\"></a></td>");
  wnd.document.write("</tr></table>");
  wnd.document.write("</td></tr><tr><td><span style=\"font-family: Verdana; font-size: 8pt; color: #BEBEC6\">"+comment+"</span></td></tr></table>");
  //wnd.document.write("<img src=\""+ID+"\" border=\"0\" width=\""+width+"\" height=\""+height+"\">");
  wnd.document.write("</div><br></body>");
  wnd.document.write("</html>");
  wnd.document.close();
  return false;
}

function PriceShw(ID, width, height, title, image_subject, comment) {
  var scroll = "no";
  var top=0, left=0;
  if(width > screen.width-10 || height > screen.height-28) scroll = "yes";
  if(height < screen.height-28) top = Math.floor((screen.height - height)/2-14);
  if(width < screen.width-10) left = Math.floor((screen.width - width)/2-5);
  width = Math.min(width, screen.width-10);
  height = Math.min(height, screen.height-28);
  width = width + 20;
  height = height + 100;
  var wnd = window.open("","","scrollbars="+scroll+",resizable=yes,width="+width+",height="+height+",left="+left+",top="+top);
  wnd.document.write("<html><head>\n");
  wnd.document.write("<"+"script language='JavaScript'>\n");
  wnd.document.write("<!--\n");
  wnd.document.write("function KeyPress()\n");
  wnd.document.write("{\n");
  wnd.document.write("        if(window.event.keyCode == 27)\n");
  wnd.document.write("                window.close();\n");
  wnd.document.write("}\n");
  wnd.document.write("//-->\n");
  wnd.document.write("</"+"script>\n");
  wnd.document.write("<title>"+title+"</title></head>\n");
  wnd.document.write("<body bgcolor=\"#13203A\" topmargin=\"0\" leftmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onKeyPress=\"KeyPress()\">\n");
  //wnd.document.write("<link href=\"images/style.css\" rel=\"STYLESHEET\" type=\"text/css\">");
  wnd.document.write("<div align=\"center\">");

  wnd.document.write("<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"1\" style=\"font-family: Verdana; font-size: 10pt; color: #BEBEC6\"><tr bgcolor=\"#242F40\" align=\"center\">");
  wnd.document.write("<td><b>МАТЕРИАЛ</b></td><td><b>20 ММ</b></td><td><b>30 ММ</b></td><td><b>40 ММ</b></td></tr>");
  wnd.document.write("<tr align=\"center\"><td>Галтовка россыпь</td><td colspan=\"2\">+</td><td>-</td></tr>");
  wnd.document.write("<tr bgcolor=\"#19253B\" align=\"center\"><td>Галтовка кубики 10*10</td><td colspan=\"2\">+</td><td>-</td></tr>");
  wnd.document.write("<tr align=\"center\"><td>Дайна Реале</td><td>+</td><td>+</td><td>-</td></tr>");
  wnd.document.write("<tr bgcolor=\"#19253B\" align=\"center\"><td>Ботичино </td><td>+</td><td>+</td><td>+</td></tr>");
  wnd.document.write("<tr align=\"center\"><td>Бьянко Каррара экстра</td><td>+</td><td>+</td><td>+</td></tr>");
  wnd.document.write("<tr bgcolor=\"#19253B\" align=\"center\"><td>Травертин</td><td>-</td><td>+</td><td>-</td></tr>");
  wnd.document.write("<tr><td colspan=\"4\">&nbsp;</span></td></tr>");
  wnd.document.write("</tr></table>");

  wnd.document.write("<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"1\" style=\"font-family: Verdana; font-size: 10pt; color: #BEBEC6\"><tr bgcolor=\"#242F40\" align=\"center\">");
  wnd.document.write("<td><b>МАТЕРИАЛ</b></td><td><b>400*600*18</b></td><td><b>400*400*12</b></td><td><b>300*300*15</b></td><td><b>457*457*15</b></td></tr>");
  wnd.document.write("<tr align=\"center\"><td>Ботичино</td><td>+</td><td>+</td><td>+</td><td>-</td></tr>");
  wnd.document.write("<tr bgcolor=\"#19253B\" align=\"center\"><td>Ботичино антик</td><td>-</td><td>+</td><td>-</td><td>-</td></tr>");
  wnd.document.write("<tr align=\"center\"><td>Россо Верона антик</td><td>-</td><td>+</td><td>-</td><td>-</td></tr>");
  wnd.document.write("<tr bgcolor=\"#19253B\" align=\"center\"><td>Травертин</td><td>-</td><td>-</td><td>+</td><td>+</td></tr>");
  wnd.document.write("<tr><td colspan=\"5\" align=\"center\"><span style=\"font-family: Verdana; font-size: 8pt; color: #808895\">Пожалуйста, уточняйте наличие материалов и их цены по телефонам:<br> (499) 243-5123 или (499) 243-7926<br>________________________________________________________________<br>Так же мы предоставляем и другие отделочные материалы, подробнее о которых<br>Вы можете узнать по e-mail или телефону.</span></td></tr>");
  wnd.document.write("</tr></table>");

  wnd.document.write("</div><br></body>");
  wnd.document.write("</html>");
  wnd.document.close();
  return false;
}