function popupImage(url, title){
  /* ���� � ����� ������������ ����� */
  var imageFile = "/public/html/img.html"

  var img = new Image;
  img.src =  url;

  if(img.complete){
    var window_w = img.width  + 30;
    var window_h = img.height + 30;	
    var screen_w = window.screen.width;
    var screen_h = window.screen.height;

    var scrollbars = 'no';

    if(window_w > screen_w - 50){ window_w = screen_w - 50; scrollbars = 'yes'; }
    if(window_h > screen_h - 50){ window_h = screen_h - 50; scrollbars = 'yes'; }
			
    var t  = (screen_h/2) - (window_h/2);
    var l = (screen_w/2) - (window_w/2);

    var win = window.open(imageFile + "?" + "" + escape(url) + "&" + escape(title), "win", "resizable,scrollbars="+scrollbars+",width="+window_w+",height="+window_h+",top="+t+",left="+l);
    win.focus();	
  }
  img.onload = function(){
    var window_w = img.width  + 30;
    var window_h = img.height + 30;	
    var screen_w = window.screen.width;
    var screen_h = window.screen.height;

    var scrollbars = 'no';

    if(window_w > screen_w - 50){ window_w = screen_w - 50; scrollbars = 'yes'; }
    if(window_h > screen_h - 50){ window_h = screen_h - 50; scrollbars = 'yes'; }

    var t  = (screen_h/2) - (window_h/2);
    var l = (screen_w/2) - (window_w/2);

    var win = window.open(imageFile + "?" + "" + escape(url) + "&" + escape(title), "win", "resizable,scrollbars="+scrollbars+",width="+window_w+",height="+window_h+",top="+t+",left="+l);
    win.focus();				
  };
  if(img.complete) delete(img);			
  return false;
}


function popupPage(url, title, width, height){
  var imageFile = url;


    var window_w = width  + 30;
    var window_h = height + 30;	
    var screen_w = window.screen.width;
    var screen_h = window.screen.height;

    var scrollbars = 'no';

    if(window_w > screen_w - 50){ window_w = screen_w - 50; scrollbars = 'yes'; }
    if(window_h > screen_h - 50){ window_h = screen_h - 50; scrollbars = 'yes'; }
			
    var t  = (screen_h/2) - (window_h/2);
    var l = (screen_w/2) - (window_w/2);

    var win = window.open(imageFile + "?" + "" + escape(url) + "&" + escape(title), "win", "resizable,scrollbars="+scrollbars+",width="+window_w+",height="+window_h+",top="+t+",left="+l);
    win.focus();	

  return false;
}
