var popup_window;

// write the status text (delayed, NS6 bugfixed)
function writeStatusText(status_text) {
  setTimeout("status=\"" + status_text + "\"",15); return true;
}

function openPopUp(_filename,_width,_height,_scroll,_resize) {  
  _status = false;
	window.opener = self;
  scrollbar = (_scroll)? ",scrollbars" : "";
  resizing = (_resize)? ",resizable" : "";
	status = (_status)? ",status=1" : "";
  if (popup_window != undefined)
    popup_window.close();
  popup_window = window.open(_filename,"_blank","width="+_width+",height="+_height+scrollbar+resizing+status);
  //if(popup_window)
  popup_window.focus();
}