rem: var theWindow = null; var list = top.document.getElementsByTagName("window"); var wtype = list[0].getAttribute("windowtype");  if (wtype == "navigator:browser") { theWindow = top.window; } else { var windowManager = Components.classes[WMEDIATOR_PROGID].getService(nsIWindowMediator); if (windowManager) { theWindow = windowManager.getMostRecentWindow("navigator:browser"); } }  if (!theWindow) { window.openDialog (search_getBrowserURL(), "_blank", "chrome,all,dialog=no", url); } else {    var appCore = theWindow._content.appCore; if(appCore) { appCore.loadUrl(url); } else { theWindow.top._content.location.href = url; }  } 
add: var appCore = getNavigatorWindowAppCore(); if (appCore) appCore.loadUrl(url); 
context: function loadURLInContent(url){    var theWindow = null;        var list = top.document.getElementsByTagName("window");    var wtype = list[0].getAttribute("windowtype");        if (wtype == "navigator:browser")    {        theWindow = top.window;    }    else    {        var windowManager =            Components.classes[WMEDIATOR_PROGID].getService(nsIWindowMediator);        if (windowManager)        {            theWindow = windowManager.getMostRecentWindow("navigator:browser");        }    }    if (!theWindow)    {        window.openDialog (search_getBrowserURL(), "_blank",                           "chrome,all,dialog=no", url);    }    else    {        // try to use the BrowserAppCore in the content area        // (for better session history);        // if its unavailable, just blast the content location        var appCore = theWindow._content.appCore;		if(appCore)		{            appCore.loadUrl(url);		}		else		{            theWindow.top._content.location.href = url;		}    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a3954251f28fde4dcb2af9fe990dc94a8ca499ec/search-panel.js/buggy/suite/common/search/search-panel.js