rem: var focusedElement = document.commandDispatcher.focusedElement; 
add: var focusedElement = document.commandDispatcher.focusedNode; 
context: function AbUpdateCommandDelete(){	var command = "cmd_delete";	var focusedElement = document.commandDispatcher.focusedElement;	var id = 0;	if ( focusedElement )		id = focusedElement.getAttribute('id');	dump("focusedOn = " + id + "\n");	switch ( id )	{		case "dirTree":			// menu text			goSetMenuValue(command, 'valueAddressBook');			// delete button			var dirTree = document.getElementById('dirTree');			var numSelected = 0;			if ( dirTree && dirTree.selectedItems )				numSelected = dirTree.selectedItems.length;			goSetCommandEnabled('button_delete', (numSelected>0));			break;		case "resultsTree":			// menu text			var resultsTree = document.getElementById('resultsTree');			var numSelected = 0;			if ( resultsTree && resultsTree.selectedItems )				numSelected = resultsTree.selectedItems.length;			if ( numSelected < 2 )				goSetMenuValue(command, 'valueCard');			else				goSetMenuValue(command, 'valueCards');			// delete button			goSetCommandEnabled('button_delete', (numSelected>0));			break;		default:			goSetMenuValue(command, 'valueDefault');			goSetCommandEnabled('button_delete', false);			break;	}}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4c0d31db999c6b774b06cd41024f524391b49ff5/addressbook.js/clean/mailnews/addrbook/resources/content/addressbook.js