rem: var rdf = Components.classes["component: if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); if (rdf) { var localStore = rdf.GetDataSource("rdf:local-store"); if (localStore) { var engineBox = document.getElementById("searchengines"); if( engineBox ) { var numEngines = engineBox.childNodes.length; var checkedProperty = rdf.GetResource("http: var categorySRC = rdf.GetResource( aCategory, true ); for (var x = 0; x<numEngines; x++) { var checkbox = engineBox.childNodes[x]; if (!checkbox) continue; var engineURI = checkbox.getAttribute("id"); var engineSRC = rdf.GetResource( engineURI, true ); var hasAssertion = localStore.HasAssertion( categorySRC, checkedProperty, engineSRC, true ); if ( hasAssertion == true) checkbox.checked = true; } } } } 
add: var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService); if (rdf) { var localStore = rdf.GetDataSource("rdf:local-store"); if (localStore) { var engineBox = document.getElementById("engineKids");; if( engineBox ) { var numEngines = engineBox.childNodes.length; var checkedProperty = rdf.GetResource("http: var categorySRC = rdf.GetResource( aCategory, true ); for (var x = 0; x<numEngines; x++) { var checkbox = engineBox.childNodes[x].firstChild.firstChild.firstChild; if (!checkbox) continue; var engineSRC = rdf.GetResource( checkbox.id, true ); var hasAssertion = localStore.HasAssertion( categorySRC, checkedProperty, engineSRC, true ); if (hasAssertion) checkbox.checked = true; } } } } 
context: function loadEngines( aCategory ){  var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();  if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);  if (rdf)  {  	var localStore = rdf.GetDataSource("rdf:local-store");  	if (localStore)  	{  		var engineBox = document.getElementById("searchengines");  		if( engineBox )  		{  			var numEngines = engineBox.childNodes.length;  			var checkedProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#checked", true);        var categorySRC = rdf.GetResource( aCategory, true );  			for (var x = 0; x<numEngines; x++)  			{  				var checkbox = engineBox.childNodes[x];  				if (!checkbox) continue;  				var engineURI = checkbox.getAttribute("id");  				var engineSRC = rdf.GetResource( engineURI, true );  				var hasAssertion = localStore.HasAssertion( categorySRC, checkedProperty, engineSRC, true );  				if ( hasAssertion == true)  					checkbox.checked = true;  			}  		}  	}  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6a80dfc41c74ac5b49360af43d1f736a30d98b45/search-panel.js/clean/suite/common/search/search-panel.js