rem: dump("This is before the search " + window._content.location.href + "\n"); dump("This is before the search " + searchStr + "\n"); 
add: debug("This is before the search " + window._content.location.href + "\n"); debug("This is before the search " + searchStr + "\n"); 
context: function OpenSearch(tabName, forceDialogFlag, searchStr){	var searchMode = 0;	var searchEngineURI = null;	var autoOpenSearchPanel = false;	var defaultSearchURL = null;	var fallbackDefaultSearchURL = bundle.GetStringFromName("fallbackDefaultSearchURL");    var otherSearchURL = bundle.GetStringFromName("otherSearchURL");	try	{		searchMode = pref.GetIntPref("browser.search.powermode");		autoOpenSearchPanel = pref.GetBoolPref("browser.search.opensidebarsearchpanel");		searchEngineURI = pref.CopyCharPref("browser.search.defaultengine");		defaultSearchURL = pref.getLocalizedUnicharPref("browser.search.defaulturl");			}	catch(ex)	{	}    dump("Search defaultSearchURL: " + defaultSearchURL + "\n");	if ((defaultSearchURL == null) || (defaultSearchURL == ""))	{		// Fallback to a Netscape default (one that we can get sidebar search results for)		defaultSearchURL = fallbackDefaultSearchURL;	}    dump("This is before the search " + window._content.location.href + "\n");	dump("This is before the search " + searchStr + "\n");	if ((window._content.location.href == searchStr) || (searchStr == '')) 	{		//	window._content.location.href = defaultSearchURL;		// Call in to BrowserAppCore instead of replacing 		// the url in the content area so that B/F buttons work right      if (!(defaultSearchURL == fallbackDefaultSearchURL))      {        if (appCore)          appCore.loadUrl(defaultSearchURL);        else          dump("BrowserAppCore is not initialised\n");      }      else      {        //window._content.local.href = "http://home.netscape.com/bookmark/6_0/tsearch.html"        // Call in to BrowserAppCore instead of replacing        // the url in the content area so that B/F buttons work right        if (appCore)          appCore.loadUrl(otherSearchURL);        else          dump("BrowserAppCore is not initialised\n");              }	}	else	{		if ((searchMode == 1) || (forceDialogFlag == true))		{			// Use a single search dialog			var cwindowManager = Components.classes["@mozilla.org/rdf/datasource;1?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://communicator/content/search/search.xul", "SearchWindow", "dialog=no,close,chrome,resizable", tabName, searchStr);			}		}		else 		{  			if ((!searchStr) || (searchStr == ""))	return;			var searchDS = Components.classes["@mozilla.org/rdf/datasource;1?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		// Call in to BrowserAppCore instead of replacing 		// the url in the content area so that B/F buttons work right		    if (appCore)			   appCore.loadUrl(defaultSearchURL);			else			   dump("BrowserAppCore is not initialised\n");		}	}	// should we try and open up the sidebar to show the "Search Results" panel?	if (autoOpenSearchPanel == true)	{		RevealSearchPanel();	}}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/73019ea054da57bc12001ee9fbddfc7695e0c300/navigator.js/clean/xpfe/browser/resources/content/navigator.js