
var popup_window;
function popup( file, width, height ) {

 var _width;
 var _height;

 with(screen) {
  _width  = availWidth;
  _height = availHeight;
 }

 _width -= width;
 _width -= 25; //scrollbar
 _width /= 2;

 _height -= height;
 _height /= 2;

 _height = Math.round( _height );
 _width  = Math.round( _width  );

 popup_window = window.open(''+file+'','','width=' + width + ',height=' + height + ',left='+_width+',top='+_height+',menubar=no,directories=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no');
 popup_window.focus();
}

