rem: deleted_image_permissions_count += document.getElementById("imagepermissionstree").selectedItems.length; 
add: var imagepermissiontree = document.getElementById("imagepermissionstree"); deleted_image_permissions_count += imagepermissiontree.selectedItems.length; var newIndex = imagepermissiontree.selectedIndex; 
context: function DeleteImagePermissionSelected(){  deleted_image_permissions_count    += document.getElementById("imagepermissionstree").selectedItems.length;  gone_i += DeleteItemSelected('imagepermissionstree', 'imagepermtree_', 'imagePermList');  if( !document.getElementById("imagepermissionstree").selectedItems.length ) {    if( !document.getElementById("removeImages").disabled ) {      document.getElementById("removeImages").setAttribute("disabled", "true")    }  }  if (deleted_image_permissions_count >= image_permissions_count) {    document.getElementById("removeAllImages").setAttribute("disabled","true");  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/44efea8c08c2196f15c6ed96742ee2840f7391e9/CookieViewer.js/clean/extensions/wallet/cookieviewer/CookieViewer.js