rem: searchEngineURI = pref.CopyCharPref("browser.search.defaultengine"); 
context: function OpenSearch( aSearchStr, engineURIs ){	var searchEngineURI = null;	var autoOpenSearchPanel = false;	var defaultSearchURL = null;	try	{        if (pref)        {	  	    autoOpenSearchPanel = pref.GetBoolPref("browser.search.opensidebarsearchpanel");  		    defaultSearchURL = pref.getLocalizedUnicharPref("browser.search.defaulturl");	        searchEngineURI = pref.CopyCharPref("browser.search.defaultengine");        }	}	catch(ex)	{	}	if ( !defaultSearchURL )	{		defaultSearchURL = bundle.GetStringFromName("defaultSearchURL");    }    var searchDS = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService);    if( searchDS )    {        if(!aSearchStr)        {            return(false);        }        var	escapedSearchStr = escape( aSearchStr );        searchDS.RememberLastSearchText( escapedSearchStr );  		try  		{            if( !engineURIs || ( engineURIs && engineURIs.length <= 1 ) )            {                // not called from sidebar or only one engine selected                if (engineURIs && engineURIs.length == 1)                {                    searchEngineURI = engineURIs[0];                    gURL = "internetsearch:engine=" + searchEngineURI + "&text=" + escapedSearchStr;                }                // look up the correct search URL format for the given engine                var	searchURL = searchDS.GetInternetSearchURL( searchEngineURI, escapedSearchStr );                if (searchURL)                {                    defaultSearchURL = searchURL;                }                else                 {                    defaultSearchURL = defaultSearchURL + escapedSearchStr;                    gURL = "";                }                // load the results page of selected or default engine in the content area                if (defaultSearchURL)                {                    loadURLInContent(defaultSearchURL);                }            }            else            {                // multiple providers                searchURL = "";                for( var i = 0; i < engineURIs.length; i++ )                 {                    if( searchURL == "" )                        searchURL = "internetsearch:";                    else                        searchURL += "&";                    searchURL += "engine=" + engineURIs[i];                }                searchURL += ( "&text=" + escapedSearchStr );                gURL = searchURL;                loadURLInContent("chrome://communicator/content/search/internetresults.xul?" + searchURL);            }  		}  		catch(ex)  		{  		}        setTimeout("checkSearchProgress()", 1000);    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f35042debfeb638e916315465f0e57a709bb3c36/search-panel.js/clean/xpfe/components/search/resources/search-panel.js