rem: var resultsTree = document.getElementById("resultsTree"); var editButton = document.getElementById("edit"); var toButton = document.getElementById("toButton"); var ccButton = document.getElementById("ccButton"); var bccButton = document.getElementById("bccButton");  if (editButton && toButton && ccButton && bccButton && resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length) { editButton.removeAttribute("disabled"); toButton.removeAttribute("disabled"); ccButton.removeAttribute("disabled"); bccButton.removeAttribute("disabled"); } else { editButton.setAttribute("disabled", "true"); toButton.setAttribute("disabled", "true"); ccButton.setAttribute("disabled", "true"); bccButton.setAttribute("disabled", "true"); } 
add: var resultsTree = document.getElementById("resultsTree"); var editButton = document.getElementById("edit"); var toButton = document.getElementById("toButton"); var ccButton = document.getElementById("ccButton"); var bccButton = document.getElementById("bccButton");  if (editButton && toButton && ccButton && bccButton && resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length) { editButton.removeAttribute("disabled"); toButton.removeAttribute("disabled"); ccButton.removeAttribute("disabled"); bccButton.removeAttribute("disabled"); } else { editButton.setAttribute("disabled", "true"); toButton.setAttribute("disabled", "true"); ccButton.setAttribute("disabled", "true"); bccButton.setAttribute("disabled", "true"); } 
context: function DialogResultsPaneSelectionChanged(){	var resultsTree = document.getElementById("resultsTree");	var editButton = document.getElementById("edit");	var toButton = document.getElementById("toButton");	var ccButton = document.getElementById("ccButton");	var bccButton = document.getElementById("bccButton");		if (editButton && toButton && ccButton && bccButton && resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length) 	{		editButton.removeAttribute("disabled");		toButton.removeAttribute("disabled");		ccButton.removeAttribute("disabled");		bccButton.removeAttribute("disabled");	} 	else 	{ 		editButton.setAttribute("disabled", "true");		toButton.setAttribute("disabled", "true");		ccButton.setAttribute("disabled", "true");		bccButton.setAttribute("disabled", "true");	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eaa6754a0a946375badf1165b3e4af3999e4b03c/abSelectAddressesDialog.js/clean/mailnews/addrbook/resources/content/abSelectAddressesDialog.js