function photo(image, text, width, height, w_19, x, y) {
  if (arguments[2]==null) width=400;
  if (arguments[3]==null) height=300;
  if (arguments[4]==null) w_19=5;
  if (arguments[5]==null) x=0;
  if (arguments[6]==null) y=0;
  w_width=width;w_height=height;
  // w_19 - расположение 1-левый верхний угол, 2-верх-середина,... 9-правый нижний
  // x - отступ в пикселях по горизонтали, у - отступ в пикселях по вертикали
  if (w_19==1) {w_t=0; w_l=0;}
  if (w_19==2) {w_t=0; w_l=(screen.availWidth-width-10)/2;}
  if (w_19==3) {w_t=0; w_l=screen.availWidth-width-10;}
  if (w_19==4) {w_t=(screen.availHeight-height-28)/2; w_l=0;}
  if (w_19==5) {w_t=(screen.availHeight-height-28)/2; w_l=(screen.availWidth-width-10)/2;}
  if (w_19==6) {w_t=(screen.availHeight-height-28)/2; w_l= screen.availWidth-width-10;}
  if (w_19==7) {w_t= screen.availHeight-height-28; w_l=0;}
  if (w_19==8) {w_t= screen.availHeight-height-28; w_l=(screen.availWidth-width-10)/2;}
  if (w_19==9) {w_t= screen.availHeight-height-28; w_l= screen.availWidth-width-10;}
  w_l+=x; w_t+=y;                    // смещения по горизонтали-вертикали
  w_l=w_l<0?0:w_l; w_t=w_t<0?0:w_t;  // отрицательные значения не проглатываются
  wnd=window.open("","","dependent=0,directories=no,hotkeys=no,location=no,menubar=no,toolbar=no,titlebar=no,scrollbars=no,status=no,resizable=no,top="+w_t+",screenY="+w_t+",left="+w_l+",screenX="+w_l+",width="+w_width+",innerWidth="+w_width+",height="+w_height+",innerHeight="+w_height+"");
  wnd.document.open();
  wnd.document.writeln("<html><head><title>&nbsp;"+text+"</title></head><body onload='window.focus();' onblur='self.close();' onclick='self.close()'; onkeypress='self.close();' bgcolor=#e0e0e0 text=green topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'>");
  wnd.document.writeln("<img src='"+image+"' galleryimg='no' border=0 hspace=0 vspace=0 alt='"+text+"'>");
  wnd.document.writeln("</body></html>");
  wnd.document.close();
  return false;

  // Пример:
  // <a onclick="return photo('img/gost2_b.jpg', 'Сертификат', 440, 640, 1, 7, 5);" href="">...
  // показать окно с фото в левом-верхнем углу с отступами слева 7, сверху 5
  // (c) 2003 Povetkin.ru
}
