rem: var engineBox = document.getElementById("engineKids"); 
add: var engineItems = document.getElementById("searchengines").getElementsByTagName("listitem"); 
context: function saveEngines(){  var categoryList = document.getElementById("categoryList");  var category = categoryList.selectedItem.getAttribute("id");  if (category)    category = "NC:SearchCategory?category=" + category;  else    category = "NC:SearchEngineRoot";  var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService);  var localStore = rdf.GetDataSource("rdf:local-store");  if (!localStore)    return;  var engineBox = document.getElementById("engineKids");  var checkedProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#checked", true);  var categorySRC = rdf.GetResource(category, true);  for (var x = 0; x < engineBox.childNodes.length; ++x) {    var treeitemNode = engineBox.childNodes[x];    var checkboxNode = treeitemNode.firstChild.firstChild.firstChild;    if (checkboxNode) {      var engineURI = treeitemNode.getAttribute("id");      var engineSRC = rdf.GetResource(engineURI, true);      if (checkboxNode.checked)        localStore.Assert(categorySRC, checkedProperty, engineSRC, true);      else        localStore.Unassert(categorySRC, checkedProperty, engineSRC, true);    }  }  // save changes; flush out the localstore  try {    var flushableStore = localStore.QueryInterface(nsIRDFRemoteDataSource);    flushableStore.Flush();  }  catch (ex) {}}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/search-panel.js/buggy/xpfe/components/search/resources/search-panel.js