rem:   var attachmentIndex = 0; var isAllDeleted = true; 
context: function FillAttachmentListPopup(popup){  // the FE sometimes call this routine TWICE...I haven't been able to figure out why yet...  // protect against it...  if (!gBuildAttachmentPopupForCurrentMsg) return;   // otherwise we need to build the attachment view...  // First clear out the old view...  ClearAttachmentMenu(popup);  // add all attachments to the popup and determine if *all* attachments   // are deleted    var attachmentIndex = 0;  var isAllDeleted = true;  for (index in currentAttachments)  {    ++attachmentIndex;    var attachment = currentAttachments[index];    isAllDeleted = (attachment.contentType == 'text/x-moz-deleted');    addAttachmentToPopup(popup, attachment, attachmentIndex);  }  // if all selected attachments are already deleted, you can't save, detach or  // delete any attachments  var saveAllMenu = document.getElementById('file-saveAllAttachments');  var detachAllMenu = document.getElementById('file-detachAllAttachments');  var deleteAllMenu = document.getElementById('file-deleteAllAttachments');  if ( !isAllDeleted )  {    saveAllMenu.removeAttribute('disabled');    detachAllMenu.removeAttribute('disabled');    deleteAllMenu.removeAttribute('disabled');  }  else  {    saveAllMenu.setAttribute('disabled', true);    detachAllMenu.setAttribute('disabled', true);    deleteAllMenu.setAttribute('disabled', true);  }  gBuildAttachmentPopupForCurrentMsg = false;}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/1653b73c2bb770359805e1bd5f8979722274e7e1/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js