rem: var canDetach = CanDetachAttachments();  var openpopup = document.createElement('menupopup'); openpopup = item.appendChild(openpopup);  var menuitementry = document.createElement('menuitem');  menuitementry.attachment = attachment; menuitementry.setAttribute('oncommand', 'this.attachment.openAttachment()');  if (!gDeleteLabel) gDeleteLabel = gMessengerBundle.getString("deleteLabel"); if (!gDeleteLabelAccesskey) gDeleteLabelAccesskey = gMessengerBundle.getString("deleteLabelAccesskey"); if (!gDetachLabel) gDetachLabel = gMessengerBundle.getString("detachLabel"); if (!gDetachLabelAccesskey) gDetachLabelAccesskey = gMessengerBundle.getString("detachLabelAccesskey"); if (!gSaveLabel) gSaveLabel = gMessengerBundle.getString("saveLabel"); if (!gSaveLabelAccesskey) gSaveLabelAccesskey = gMessengerBundle.getString("saveLabelAccesskey"); if (!gOpenLabel) gOpenLabel = gMessengerBundle.getString("openLabel"); if (!gOpenLabelAccesskey) gOpenLabelAccesskey = gMessengerBundle.getString("openLabelAccesskey");  menuitementry.setAttribute('label', gOpenLabel); menuitementry.setAttribute('accesskey', gOpenLabelAccesskey); menuitementry = openpopup.appendChild(menuitementry);  menuitementry = document.createElement('menuitem'); menuitementry.attachment = attachment; menuitementry.setAttribute('oncommand', 'this.attachment.saveAttachment()'); menuitementry.setAttribute('label', gSaveLabel); menuitementry.setAttribute('accesskey', gSaveLabelAccesskey); menuitementry = openpopup.appendChild(menuitementry);  var menuseparator = document.createElement('menuseparator'); openpopup.appendChild(menuseparator);  menuitementry = document.createElement('menuitem'); menuitementry.attachment = attachment; menuitementry.setAttribute('oncommand', 'this.attachment.detachAttachment()'); menuitementry.setAttribute('label', gDetachLabel); menuitementry.setAttribute('accesskey', gDetachLabelAccesskey); if (!canDetach) menuitementry.setAttribute('disabled', 'true'); menuitementry = openpopup.appendChild(menuitementry);  menuitementry = document.createElement('menuitem'); menuitementry.attachment = attachment; menuitementry.setAttribute('oncommand', 'this.attachment.deleteAttachment()'); menuitementry.setAttribute('label', gDeleteLabel); menuitementry.setAttribute('accesskey', gDeleteLabelAccesskey); if (!canDetach) menuitementry.setAttribute('disabled', 'true'); menuitementry = openpopup.appendChild(menuitementry); } } 
add: } } 
context: function addAttachmentToPopup(popup, attachment, attachmentIndex) {   if (popup)  {     var item = document.createElement('menu');    if ( item )     {           if (!gMessengerBundle)        gMessengerBundle = document.getElementById("bundle_messenger");      // insert the item just before the separator      item = popup.insertBefore(item, popup.childNodes[attachmentIndex - 1]);      item.setAttribute('class', 'menu-iconic attachment-item');      var formattedDisplayNameString = gMessengerBundle.getFormattedString("attachmentDisplayNameFormat",                                       [attachmentIndex, attachment.displayName]);      item.setAttribute('label', formattedDisplayNameString);       item.setAttribute('accesskey', attachmentIndex);       if (attachment.contentType == "text/x-moz-deleted") {        item.setAttribute('disabled', 'true');        return;      }      setApplicationIconForAttachment(attachment, item);      var canDetach = CanDetachAttachments();      var openpopup = document.createElement('menupopup');      openpopup = item.appendChild(openpopup);      var menuitementry = document.createElement('menuitem');           menuitementry.attachment = attachment;      menuitementry.setAttribute('oncommand', 'this.attachment.openAttachment()');       if (!gDeleteLabel)        gDeleteLabel = gMessengerBundle.getString("deleteLabel");      if (!gDeleteLabelAccesskey)        gDeleteLabelAccesskey = gMessengerBundle.getString("deleteLabelAccesskey");      if (!gDetachLabel)        gDetachLabel = gMessengerBundle.getString("detachLabel");      if (!gDetachLabelAccesskey)        gDetachLabelAccesskey = gMessengerBundle.getString("detachLabelAccesskey");      if (!gSaveLabel)        gSaveLabel = gMessengerBundle.getString("saveLabel");      if (!gSaveLabelAccesskey)        gSaveLabelAccesskey = gMessengerBundle.getString("saveLabelAccesskey");      if (!gOpenLabel)        gOpenLabel = gMessengerBundle.getString("openLabel");      if (!gOpenLabelAccesskey)        gOpenLabelAccesskey = gMessengerBundle.getString("openLabelAccesskey");      menuitementry.setAttribute('label', gOpenLabel);       menuitementry.setAttribute('accesskey', gOpenLabelAccesskey);       menuitementry = openpopup.appendChild(menuitementry);      menuitementry = document.createElement('menuitem');      menuitementry.attachment = attachment;      menuitementry.setAttribute('oncommand', 'this.attachment.saveAttachment()');       menuitementry.setAttribute('label', gSaveLabel);       menuitementry.setAttribute('accesskey', gSaveLabelAccesskey);       menuitementry = openpopup.appendChild(menuitementry);      var menuseparator = document.createElement('menuseparator');      openpopup.appendChild(menuseparator);      menuitementry = document.createElement('menuitem');      menuitementry.attachment = attachment;      menuitementry.setAttribute('oncommand', 'this.attachment.detachAttachment()');       menuitementry.setAttribute('label', gDetachLabel);       menuitementry.setAttribute('accesskey', gDetachLabelAccesskey);       if (!canDetach)        menuitementry.setAttribute('disabled', 'true');      menuitementry = openpopup.appendChild(menuitementry);      menuitementry = document.createElement('menuitem');      menuitementry.attachment = attachment;      menuitementry.setAttribute('oncommand', 'this.attachment.deleteAttachment()');       menuitementry.setAttribute('label', gDeleteLabel);       menuitementry.setAttribute('accesskey', gDeleteLabelAccesskey);       if (!canDetach)        menuitementry.setAttribute('disabled', 'true');      menuitementry = openpopup.appendChild(menuitementry);    }  // if we created a menu item for this attachment...  } // if we have a popup} 
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/5f5a9dd71ae4ad6dc00c4f9cf438579817dd4558/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js