rem: var msgHdr = messenger.messageServiceFromURI(messageURI).messageURIToMsgHdr(messageURI); 
add: var msgHdr = messenger.messageServiceFromURI(loadedMessage).messageURIToMsgHdr(loadedMessage); 
context: function HandleJunkStatusChanged(folder){  // this might be the stand alone window, open to a message that was  // and attachment (or on disk), in which case, we want to ignore it.  var loadedMessage = GetLoadedMessage();  if (loadedMessage && (!(/type=x-message-display/.test(loadedMessage))) && IsCurrentLoadedFolder(folder))  {    var messageURI = GetLoadedMessage();    // if multiple message are selected    // and we change the junk status    // we don't want to show the junk bar    // (since the message pane is blank)    if (messageURI && (GetNumSelectedMessages() == 1))    {      var msgHdr = messenger.messageServiceFromURI(messageURI).messageURIToMsgHdr(messageURI);      if (msgHdr)      {        // HandleJunkStatusChanged is a folder wide event and does not necessarily mean        // that the junk status on our currently selected message has changed.        // We have no way of determining if the junk status of our current message has really changed        // the only thing we can do is cheat by asking if the junkbar visibility had to change as a result of this notification        var changedJunkStatus = SetUpJunkBar(msgHdr);        // we may be forcing junk mail to be rendered with sanitized html. In that scenario, we want to         // reload the message if the status has just changed to not junk.         var sanitizeJunkMail = gPrefBranch.getBoolPref("mailnews.display.sanitizeJunkMail");        if (changedJunkStatus && sanitizeJunkMail) // only bother doing this if we are modifying the html for junk mail....        {          // we used to only reload the message if we were toggling the message to NOT JUNK from junk          // but it can be useful to see the HTML in the message get converted to sanitized form when a message          // is marked as junk.          MsgReload();        }      }    }    else      SetUpJunkBar(null);  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3cb5cbbab283e5d918c7dc0672b9033639b66976/mailWindowOverlay.js/clean/mail/base/content/mailWindowOverlay.js