rem: defaultSearchURL = searchURL; 
add: var	searchURL = searchDS.GetInternetSearchURL(searchEngineURI, escapedSearchStr); if ((searchURL != null) && (searchURL != "")) { defaultSearchURL = searchURL; } 
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 ((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	escapedSearchStr = escape(searchStr);		defaultSearchURL += escapedSearchStr;		if ((searchEngineURI != null) && (searchEngineURI != ""))		{			try			{				var	searchURL = null;					var searchDS = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();				if (searchDS)	searchDS = searchDS.QueryInterface(Components.interfaces.nsIInternetSearchService);				if (searchDS)	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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e2a4b7a0401e7006260fbfa4a7fdc1c84fabbc36/navigator.js/buggy/xpfe/browser/resources/content/navigator.js