rem: if (treeitem.id == service.Value) { 
add: if (treeitem.id == service.Value) 
context: function add_node_to_current_list(registry, service){  debug("Adding "+service.Value);  // Copy out the attributes we want  var option_title     = get_attr(registry, service, 'title');  var option_customize = get_attr(registry, service, 'customize');  var option_content   = get_attr(registry, service, 'content');  var tree = document.getElementById('current-panels');  var tree_root = tree.getElementsByTagName("treechildren")[1];    // Check to see if the panel already exists...  var i = 0;  for (var treeitem = tree_root.firstChild; treeitem; treeitem = treeitem.nextSibling) {    if (treeitem.id == service.Value) {      // The panel is already in the current panel list.      // Avoid adding it twice.      tree.treeBoxObject.selection.select(i);      tree.treeBoxObject.ensureRowIsVisible(i);      return;    }    ++i;  }  // Create a treerow for the new panel  var item = document.createElement('treeitem');  var row  = document.createElement('treerow');  var cell = document.createElement('treecell');  // Copy over the attributes  item.setAttribute('id', service.Value);  cell.setAttribute('label', option_title);  // Add it to the current panels tree  item.appendChild(row);  row.appendChild(cell);  tree_root.appendChild(item);    // Select is only if the caller wants to.  var newIndex = tree_root.getElementsByTagName("treeitem").length - 1;  tree.treeBoxObject.selection.select(newIndex);  tree.treeBoxObject.ensureRowIsVisible(newIndex);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/ec7f2bfa878c9f3d3c37847453d69dab25f800e9/customize.js/clean/suite/common/sidebar/customize.js