rem: var identity = accountManager.getIdentity(idKey); 
add: currentIdentity = accountManager.getIdentity(idKey);  if (!startup && prevIdentity && idKey != prevIdentity.key) { var prevReplyTo = prevIdentity.replyTo; var prevBcc = ""; if (prevIdentity.bccSelf) prevBcc += prevIdentity.email; if (prevIdentity.bccOthers) { if (prevBcc != "") prevBcc += "," prevBcc += prevIdentity.bccList; }  var newReplyTo = currentIdentity.replyTo; var newBcc = ""; if (currentIdentity.bccSelf) newBcc += currentIdentity.email; if (currentIdentity.bccOthers) { if (newBcc != "") newBcc += "," newBcc += currentIdentity.bccList; }  var needToCleanUp = false; var msgCompFields = msgCompose.compFields;  if (newReplyTo != prevReplyTo) { needToCleanUp = true; if (prevReplyTo != "") awRemoveRecipients(msgCompFields, "addr_reply", prevReplyTo); if (newReplyTo != "") awAddRecipients(msgCompFields, "addr_reply", newReplyTo); }  if (newBcc != prevBcc) { needToCleanUp = true; if (prevBcc != "") awRemoveRecipients(msgCompFields, "addr_bcc", prevBcc); if (newReplyTo != "") awAddRecipients(msgCompFields, "addr_bcc", newBcc); }  if (needToCleanUp) awCleanupRows(); } 
context: function LoadIdentity(startup){    var identityElement = document.getElementById("msgIdentity");        if (identityElement) {        var item = identityElement.selectedItem;        idKey = item.getAttribute('id');        var identity = accountManager.getIdentity(idKey);                //Setup autocomplete session, we can doit from here as it's use as a service        var session = Components.classes["component://netscape/autocompleteSession&type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession);        if (session)        {            var emailAddr = identity.email;            var start = emailAddr.lastIndexOf("@");            session.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);        }    }   }
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/2b61e46f5f6721825fdc57287c6cf5eff849ddca/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js