rem: if ( resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length ) { for ( item = 0; item < resultsTree.selectedItems.length; item++ ) { uri = resultsTree.selectedItems[item].getAttribute('id'); cardResource = rdf.GetResource(uri); card = cardResource.QueryInterface(Components.interfaces.nsIAbCard); if (card.isMailList) { address = prefix + "\"" + card.name + "\" <" + card.name + ">"; email = card.name; 
add: for (var i = 0; i < count; i++) { AddCardIntoBucket(prefix, cards[i]); 
context: function AddSelectedAddressesIntoBucket(prefix){  var item, uri, rdf, cardResource, card, address;  var email ="";  rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService();  rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);  if ( resultsTree && resultsTree.selectedItems && resultsTree.selectedItems.length )  {    for ( item = 0; item < resultsTree.selectedItems.length; item++ )    {      uri = resultsTree.selectedItems[item].getAttribute('id');      cardResource = rdf.GetResource(uri);      card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);      if (card.isMailList)      {        address = prefix + "\"" + card.name + "\" <" + card.name + ">";        email = card.name;      }      else      {        address = prefix + "\"" + card.name + "\" <" + card.primaryEmail + ">";        email = card.primaryEmail;      }      AddAddressIntoBucket(address,email);    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/404e12e0541a3ffd54ae714e9a3401c380718f10/abSelectAddressesDialog.js/clean/mailnews/addrbook/resources/content/abSelectAddressesDialog.js