function enlarge(path,width,height,title){
   if(width>640) width=640;
   if(height>480) height=480;
   if(typeof(title)=='undefined') title='Изображение';

   var html="";
html+="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
html+="<html>";
html+="<head>";
html+="<META http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">";
html+="<META http-equiv=\"content-language\" content=\"ru\">";
html+="<META NAME=\"description\" CONTENT=\"\">";
html+="<meta name=\"Keywords\" content=\"\">";
html+="<style type=\"text/css\">";
html+="body {";
html+="        background-color: #BFBFBF;";
html+="        margin: 0px 0px 0px 0px;";
html+="        padding: 0px 0px 0px 0px;";
html+="}";
html+=".img {";
html+="        background-image: url(img/bg_popup.gif);";
html+="        background-position: 0px 100%;";
html+="        background-repeat: repeat-x;";
html+="        text-align: center;";
html+="        padding: 5px 5px 5px 5px;";
html+="}";
html+=".img img {";
html+="        border: 5px solid #0851A5;";
html+="        margin: 0px 0px 7px 0px;";
html+="}";
html+=".close {";
html+="        background-image: url(img/logo2.gif);";
html+="        background-position: 16px 16px;";
html+="        background-repeat: no-repeat;";
html+="        text-align: right;";
html+="}";
html+="input {";
html+="        background-image: url(img/bg_input.gif);";
html+="        background-repeat: no-repeat;";
html+="        border: none;";
html+="        color: #FFFFFF;";
html+="        font-family: Tahoma, Verdana, Arial;";
html+="        font-size: 10px;";
html+="        height: 17px;";
html+="        margin: 15px 16px 15px 0px;";
html+="        width: 70px;";
html+="}";
html+="</style>";
html+="<title>"+title+"</title>";
html+="</head>";
html+="<body>";
html+="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
html+="<tr>";
html+="        <td class=\"img\"><img src=\"files/"+path+"\" alt=\"\" width=\""+width+"\" height=\""+height+"\" border=\"0\"></td>";
html+="</tr>";
html+="<tr>";
html+="        <td class=\"close\"><input type=\"button\" value=\"Закрыть\" onClick=\"window.close();\"></td>";
html+="</tr>";
html+="</table>";
html+="</body>";
html+="</html>";

  var LeftPosition=(screen.width)?(screen.width-(width+40))/2:100;
  var TopPosition=(screen.height)?(screen.height-(height+80))/2:100;
  var settings='width='+(width+40)+',height='+(height+80)+',top='+TopPosition+',left='+LeftPosition+',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';


  var wnd=window.open("", "popup", settings);
  wnd.document.write(html);
}