rem: button.setAttribute("value", popup.childNodes.length - 2); 
add: button.setAttribute("value", popup.childNodes.length); 
context: function AddAttachmentToMenu(name, oncommand) {   var popup = document.getElementById("attachmentPopup");   if ( popup && (popup.childNodes.length >= 2) )   {     var item = document.createElement('menuitem');     if ( item )     {       // popup.removeAttribute('menugenerated');      var child = popup.childNodes[popup.childNodes.length - 2];             var bigMenu = document.getElementById('attachmentMenu');      popup.insertBefore(item, child);       item.setAttribute('value', name);       item.setAttribute('oncommand', oncommand);     }     var button = document.getElementById("attachmentButton");    if (button)       button.setAttribute("value", popup.childNodes.length - 2);  }   var attachBox = document.getElementById("attachmentBox");  if (attachBox)    attachBox.removeAttribute("hide");} 
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8603e2c5a28e0ccf41f641a56f4bb80a96bb800d/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js