rem:  var add_button = document.getElementById('add_button'); var preview_button = document.getElementById('preview_button'); var other_panels = document.getElementById('other-panels');  var num_selected = 0;  for (var ii=0; ii<other_panels.selectedItems.length; ii++) { var node = other_panels.selectedItems[ii]; if (node.getAttribute('container') != 'true') { num_selected++; } }  if (num_selected > 0) { add_button.setAttribute('disabled',''); preview_button.setAttribute('disabled',''); } else { add_button.setAttribute('disabled','true'); preview_button.setAttribute('disabled','true'); } 
add: enableOtherButtons(); 
context: function otherPanelSelected(event, target){  if (target.getAttribute('container') == 'true') {   if (target.getAttribute('open') == 'true') {	 target.removeAttribute('open');   } else {	 target.setAttribute('open','true');   }   return; }  var add_button = document.getElementById('add_button');  var preview_button = document.getElementById('preview_button');  var other_panels = document.getElementById('other-panels');  var num_selected = 0;  // Only count non-folders as selected for button enabling  for (var ii=0; ii<other_panels.selectedItems.length; ii++) {    var node = other_panels.selectedItems[ii];	if (node.getAttribute('container') != 'true') {	  num_selected++;	}  }  if (num_selected > 0) {    add_button.setAttribute('disabled','');    preview_button.setAttribute('disabled','');  }  else {    add_button.setAttribute('disabled','true');    preview_button.setAttribute('disabled','true');  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/1b109edcc208a7dc0894b00f467663a711609f47/customize.js/buggy/suite/common/sidebar/customize.js