rem: var numSelected = tree.selectedItems.length; 
add: var numSelected = tree.treeBoxObject.selection ? tree.treeBoxObject.selection.count : 0; 
context: function CustomizePanel(){  var tree  = document.getElementById('current-panels');  var numSelected = tree.selectedItems.length;  if (numSelected == 1) {    var selectedNode  = tree.selectedItems[0];    var panel_id = selectedNode.getAttribute('id');    var customize_url = selectedNode.getAttribute('customize');    debug("url   = " + customize_url);    if (!customize_url) return;    window.openDialog('chrome://communicator/content/sidebar/customize-panel.xul',                      '_blank',                      'chrome,resizable,width=690,height=600,dialog=no,close',                      panel_id,                      customize_url,                      sidebarObj.datasource_uri,                      sidebarObj.resource);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/25b0d4b13faed65318661dfa01871b40d195b479/customize.js/buggy/suite/common/sidebar/customize.js