context: function enableButtons() {  var up        = document.getElementById('up');  var down      = document.getElementById('down');  var tree      = document.getElementById('selected-panels');  var customize = document.getElementById('customize-button');  var remove    = document.getElementById('remove-button');  var numSelected = tree.selectedItems.length;  var noneSelected, isFirst, isLast, selectedNode  if (numSelected > 0) {    selectedNode = tree.selectedItems[0]    isFirst = selectedNode == selectedNode.parentNode.firstChild    isLast  = selectedNode == selectedNode.parentNode.lastChild  }  // up /\ button  if (numSelected != 1 || isFirst) {    up.setAttribute('disabled', 'true');  } else {    up.setAttribute('disabled', '');  }  // down \/ button  if (numSelected != 1 || isLast) {    down.setAttribute('disabled', 'true');  } else {    down.setAttribute('disabled', '');  }  // "Customize..." button  var customizeURL = null;  if (selectedNode) {    customizeURL = selectedNode.getAttribute('customize');  }  if (customizeURL == null || customizeURL == '') {    customize.setAttribute('disabled','true');  } else {    customize.setAttribute('disabled','');  }  // "Remove" button  if (numSelected == 0) {    remove.setAttribute('disabled','true');  } else {    remove.setAttribute('disabled','');  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/1a32cc1c526c53fd9e341d35b5639757bb33402a/customize.js/clean/xpfe/components/sidebar/resources/customize.js