rem: { window.content.location.href = "http: } 
add: window.openDialog("chrome: 
context: function OpenSearch(tabName, forceDialogFlag, searchStr){	var searchMode = 0;	var searchEngineURI = null;	var autoOpenSearchPanel = false;	var defaultSearchURL = null;	try	{		searchMode = pref.GetIntPref("browser.search.powermode");		autoOpenSearchPanel = pref.GetBoolPref("browser.search.opensidebarsearchpanel");		searchEngineURI = pref.CopyCharPref("browser.search.defaultengine");		defaultSearchURL = pref.CopyCharPref("browser.search.defaulturl");			}	catch(ex)	{	}	if ((defaultSearchURL == null) || (defaultSearchURL == ""))	{		// Fallback to a Netscape default (one that we can get sidebar search results for)		defaultSearchURL = "http://search.netscape.com/cgi-bin/search?search=";	}	if (window.content.location.href == searchStr) 	{	    dump(searchStr + ' Search: ' + defaultSearchURL + '\n');		if (!(defaultSearchURL == "http://search.netscape.com/cgi-bin/search?search=")) {			window.content.location.href = defaultSearchURL;		}		else		{			window.content.location.href = "http://search.netscape.com/"		}	}	else	{		if ((searchMode == 1) || (forceDialogFlag == true))		{			// Use a single search dialog			var cwindowManager = Components.classes["component://netscape/rdf/datasource?name=window-mediator"].getService();			var iwindowManager = Components.interfaces.nsIWindowMediator;			var windowManager  = cwindowManager.QueryInterface(iwindowManager);			var searchWindow = windowManager.getMostRecentWindow("search:window");			if (searchWindow)			{				searchWindow.focus();				if (searchWindow.loadPage)	searchWindow.loadPage(tabName, searchStr);			}			else			{				window.openDialog("chrome://search/content/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr);			}		}		else 		{  			if ((!searchStr) || (searchStr == ""))	return;			var searchDS = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();			if (searchDS)	searchDS = searchDS.QueryInterface(Components.interfaces.nsIInternetSearchService);			var	escapedSearchStr = escape(searchStr);			defaultSearchURL += escapedSearchStr;			if (searchDS)			{				searchDS.RememberLastSearchText(escapedSearchStr);				if ((searchEngineURI != null) && (searchEngineURI != ""))				{					try					{						var	searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr);						if ((searchURL != null) && (searchURL != ""))						{							defaultSearchURL = searchURL;						}					}					catch(ex)					{					}				}			}  			window.content.location.href = defaultSearchURL;		}	}	// should we try and open up the sidebar to show the "Search Results" panel?	if (autoOpenSearchPanel == true)	{		RevealSearchPanel();	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/d46106418588bec5ed4354933e11d332b81439bb/navigator.js/buggy/suite/browser/navigator.js