rem: var isFirst = index == 0; var isLast  = index == list.options.length - 1; 
add: var noneSelected = (index == -1); var isFirst      = (index == 0); var isLast       = (index == list.options.length - 1); 
context: function enableButtons() {  var up        = document.getElementById('up');  var down      = document.getElementById('down');  var list      = document.getElementById('selectList');  var customize = document.getElementById('customize-button');  var index = list.selectedIndex;  var isFirst = index == 0;  var isLast  = index == list.options.length - 1;  // up /\ button  if (isFirst) {    up.setAttribute('disabled', 'true');  } else {    up.setAttribute('disabled', '');  }  // down \/ button  if (isLast) {    down.setAttribute('disabled', 'true');  } else {    down.setAttribute('disabled', '');  }  // "Customize..." button  var customizeURL = null;  if (index != -1) {    var option = list.childNodes.item(index);    customizeURL = option.getAttribute('customize');  }  if (customizeURL == 'null') {    customize.setAttribute('disabled','true');  } else {    customize.setAttribute('disabled','');  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/dab36ecad380e3aa70415698bb523b6b7e449b23/customize.js/buggy/xpfe/components/sidebar/resources/customize.js