add: else moveDownButton.removeAttribute("disabled"); 
context: function doMoveDirectionEnabling(){  var tree = document.getElementById("engineList")  var selectedItems = tree.selectedItems;  if (!selectedItems && selectedItems.length != 1)    return false;  var ref = tree.getAttribute("ref");  var categoryResource = RDF.GetResource(ref);  var elementResource = RDF.GetResource(selectedItems[0].id);  RDFC.Init(catDS, categoryResource);  var nodeIndex = RDFC.IndexOf(elementResource);  var moveUpButton = document.getElementById("up");  var moveDownButton = document.getElementById("down");  moveUpButton.removeAttribute("disabled");  moveDownButton.removeAttribute("disabled");  if (nodeIndex <= 1)    moveUpButton.setAttribute("disabled", "true");  if (nodeIndex >= RDFC.GetCount())    moveDownButton.setAttribute("disabled", "true");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/a376ddc0531725ad80728692bef9c8ab8b17636c/search-editor.js/clean/suite/common/search/search-editor.js