rem: var internetSearch = Components.classes["component: 
add: var internetSearch = Components.classes["@mozilla.org/rdf/datasource;1?name=internetsearch"].getService(); 
context: function doLoad(){	doSetOKCancel(Commit);    // adjust category popup	var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();	if (internetSearch)	internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIInternetSearchService);	if (internetSearch)	{		internetSearchDS = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource);		catDS = internetSearch.GetCategoryDataSource();		if (catDS)	catDS = catDS.QueryInterface(Components.interfaces.nsIRDFDataSource);		if (catDS)		{			var categoryList = document.getElementById("categoryList");			if (categoryList)			{				categoryList.database.AddDataSource(catDS);				var ref = categoryList.getAttribute("ref");				if (ref)	categoryList.setAttribute("ref", ref);			}			var engineList = document.getElementById("engineList");			if (engineList)			{				engineList.database.AddDataSource(catDS);			}		}	}	// try and determine last category name used	var lastCategoryName = "";	try	{		var pref = Components.classes["component://netscape/preferences"].getService();		if (pref)	pref = pref.QueryInterface( Components.interfaces.nsIPref );		if (pref)	lastCategoryName = pref.CopyCharPref( "browser.search.last_search_category" );		if (lastCategoryName != "")		{			// strip off the prefix if necessary			var prefix="NC:SearchCategory?category=";			if (lastCategoryName.indexOf(prefix) == 0)			{				lastCategoryName = lastCategoryName.substr(prefix.length);			}		}	}	catch( e )	{		debug("Exception in SearchPanelStartup\n");		lastCategoryName = "";	}	debug("\nSearchPanelStartup: lastCategoryName = '" + lastCategoryName + "'\n");	// select the appropriate category	var categoryList = document.getElementById( "categoryList" );	var categoryPopup = document.getElementById( "categoryPopup" );	if( categoryList && categoryPopup )	{	 	var found = false;		for( var i = 0; i < categoryPopup.childNodes.length; i++ )		{			if( ( lastCategoryName == "" && categoryPopup.childNodes[i].getAttribute("data") == "NC:SearchEngineRoot" ) ||			    ( categoryPopup.childNodes[i].getAttribute("id") == lastCategoryName ) )			{				categoryList.selectedItem = categoryPopup.childNodes[i];				found = true;				break;			}		}		if (categoryPopup.childNodes.length > 0)		{			if (found == false)			{				categoryList.selectedItem = categoryPopup.childNodes[0];			}			chooseCategory(categoryList.selectedItem);		}	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0257791053c2b38e1dfaf2ee11afae973e82e394/search-editor.js/clean/xpfe/components/search/resources/search-editor.js