rem: else return openNewNavigator(); 
add: else { wm = nsJSComponentManager.getService(WM_PROGID, "nsIWindowMediator"); return wm ? wm.getMostRecentWindow("navigator:browser") : openNewNavigator(); } 
context: function getNavigatorWindow(){  if (top.document) {    var possibleNavigator = top.document.getElementById("main-window");    if (possibleNavigator &&         possibleNavigator.getAttribute("windowtype") == "navigator:browser")      return top;    else return openNewNavigator();  }  else {    const WM_PROGID = "component://netscape/rdf/datasource?name=window-mediator";    var wm = nsJSComponentManager.getService(WM_PROGID, "nsIWindowMediator");    return wm ? wm.getMostRecentWindow("navigator:browser") : openNewNavigator();  }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7c72322237118989dc76c1a382c8234b4c685a37/search-panel.js/buggy/suite/common/search/search-panel.js