rem: optionalToggleButton.removeAttribute('collapsed'); 
add: if (numAddressesParsed > gNumAddressesToShow) headerEntry.toggleIcon.removeAttribute('collapsed'); else headerEntry.toggleIcon.setAttribute('collapsed', true); 
context: function OutputEmailAddresses(parentBox, defaultParentDiv, emailAddresses, includeShortLongToggle, optionalLongDiv, optionalToggleButton, currentHeaderName){  // if we don't have any addresses for this field, hide the parent box!  if ( !emailAddresses )  {    hdrViewSetVisible(parentBox, false);    return;  }  if (msgHeaderParser)  {    // Count the number of email addresses being inserted into each header    // The headers could be "to", "cc", "from"    var myEnum = msgHeaderParser.ParseHeadersWithEnumerator(emailAddresses);    myEnum = myEnum.QueryInterface(Components.interfaces.nsISimpleEnumerator);    numOfEmailsInEnumerator = 0;    while (myEnum.hasMoreElements())    {        myEnum.getNext();        numOfEmailsInEnumerator++;    }    // Depending on the headerName and the variable that keeps track of the    // numOfEmails inserted into that header,    if (currentHeaderName == "to")        numOfEmailsInToField = numOfEmailsInEnumerator;    else if (currentHeaderName == "cc")        numOfEmailsInCcField = numOfEmailsInEnumerator;    var enumerator = msgHeaderParser.ParseHeadersWithEnumerator(emailAddresses);    enumerator = enumerator.QueryInterface(Components.interfaces.nsISimpleEnumerator);    var numAddressesParsed = 0;    if (enumerator)    {      var emailAddress = {};      var name = {};      while (enumerator.hasMoreElements())      {        var headerResult = enumerator.getNext();        headerResult = enumerator.QueryInterface(Components.interfaces.nsIMsgHeaderParserResult);        // get the email and name fields        var addrValue = {};        var nameValue = {};        var fullAddress = headerResult.getAddressAndName(addrValue, nameValue);        emailAddress = addrValue.value;        name = nameValue.value;        // if we want to include short/long toggle views and we have a long view, always add it.        // if we aren't including a short/long view OR if we are and we haven't parsed enough        // addresses to reach the cutoff valve yet then add it to the default (short) div.        if (includeShortLongToggle && optionalLongDiv)        {          InsertEmailAddressUnderEnclosingBox(parentBox, optionalLongDiv, true, emailAddress, fullAddress, name);        }        if (!includeShortLongToggle || (numAddressesParsed < gNumAddressesToShow))        {          InsertEmailAddressUnderEnclosingBox(parentBox, defaultParentDiv, includeShortLongToggle, emailAddress, fullAddress, name);        }        numAddressesParsed++;      }    } // if enumerator    if (includeShortLongToggle && (numAddressesParsed > gNumAddressesToShow) && optionalToggleButton)    {      optionalToggleButton.removeAttribute('collapsed');    }  } // if msgheader parser}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c67a0430b1f6a28483542ee1bfc4325f6249ad46/msgHdrViewOverlay.js/clean/mailnews/base/resources/content/msgHdrViewOverlay.js