rem: if (treeitemNode) { var checkboxNode = treeitemNode.firstChild.firstChild.firstChild; 
add: if (itemNode.localName == "listitem" && itemNode.checked) { var engineURI = itemNode.id; 
context: function doSearch(){  var searchMode = nsPreferences.getIntPref("browser.search.mode", 0);  // hide various columns  var navWindow = getNavigatorWindow(false);  if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) {    colNode = navWindow._content.document.getElementById("RelevanceColumn");    if (colNode)      colNode.setAttribute("hidden", "true");    colNode = navWindow._content.document.getElementById("PriceColumn");    if (colNode)      colNode.setAttribute("hidden", "true");    colNode = navWindow._content.document.getElementById("AvailabilityColumn");    if (colNode)      colNode.setAttribute("hidden", "true");  }  // get user text to find  var textNode = document.getElementById("sidebar-search-text");  if (!textNode.value) {    alert(searchBundle.getString("enterstringandlocation"));    return;  }  var engineURIs = [];  if (searchMode > 0) {    var foundEngine = false;    var treeitemNode;    var engineBox = document.getElementById("engineKids");    // in advanced search mode, get selected search engines    // (for the current search category)    for (var x = 0; x < engineBox.childNodes.length; x++) {      treeitemNode = engineBox.childNodes[x];      if (treeitemNode) {        var checkboxNode = treeitemNode.firstChild.firstChild.firstChild;        if (checkboxNode && checkboxNode.checked) {          var engineURI = treeitemNode.id;          if (engineURI) {            engineURIs[engineURIs.length] = engineURI;            foundEngine = true;          }        }      }    }    if (!foundEngine) {      if (getNumEngines() == 1) {        // only one engine in this category, check it        treeitemNode = engineBox.firstChild;        engineURIs[engineURIs.length] = treeitemNode.id;      }      else {        for (var i = 0; i < engineBox.childNodes.length; ++i) {          treeitemNode = engineBox.childNodes[i];          var theID = treeitemNode.id;          if (theID.indexOf("NetscapeSearch.src") != -1) {            engineURIs[engineURIs.length] = theID;            foundEngine = true;            break;          }        }        if (!foundEngine) {          alert(searchBundle.getString("enterstringandlocation"));          return;        }      }    }  }  else  {    var basicEngines = document.getElementById("basicEngineMenu");    engineURIs[0] = basicEngines.selectedItem.id;    debug("basic mode URI = " + engineURIs[0]);  }  if (!gStopButtonText)    gStopButtonText = searchBundle.getString("stopButtonText");  var searchButtonNode = document.getElementById("searchButton");  searchButtonNode.setAttribute("stop", "true");  searchButtonNode.setAttribute("label", gStopButtonText);  var progressNode = top.document.getElementById("statusbar-icon");  if (progressNode)    progressNode.setAttribute("mode", "undetermined");  // run the search  OpenSearch(textNode.value, engineURIs);  switchTab(0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a376ddc0531725ad80728692bef9c8ab8b17636c/search-panel.js/buggy/suite/common/search/search-panel.js