rem: var sel = all_panels.treeBoxObject.selection; 
add: var sel = all_panels.view.selection; 
context: function enable_buttons_for_other_panels(){  var add_button = document.getElementById('add_button');  var preview_button = document.getElementById('preview_button');  var all_panels = document.getElementById('other-panels');  var sel = all_panels.treeBoxObject.selection;  var num_selected = sel ? sel.count : 0;  if (sel) {    var ranges = sel.getRangeCount();    for (var range = 0; range < ranges; ++range) {      var min = {}, max = {};      sel.getRangeAt(range, min, max);      for (var index = min; index <= max; ++index) {        var node = all_panels.contentView.getItemAtIndex(index);        if (node.getAttribute('container') != 'true') {          ++num_selected;        }      }    }  }  if (num_selected > 0) {    add_button.removeAttribute('disabled');    preview_button.removeAttribute('disabled');  } else {    add_button.setAttribute('disabled','true');    preview_button.setAttribute('disabled','true');  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/acd11e98e23905f5fbd6c9a3f6be22ba384c2058/customize.js/clean/xpfe/components/sidebar/resources/customize.js