rem: var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook); 
add: var addressbook = Components.classes["@mozilla.org/addressbook;1"] .getService(Components.interfaces.nsIAddressBook); 
context: function NewCardOKButton(){  if (gOkCallback)  {    if (!CheckAndSetCardValues(gEditCard.card, document, true))      return false;  // don't close window    var addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(Components.interfaces.nsIAddressBook);    gOkCallback(addressbook.abCardToEscapedVCard(gEditCard.card));    return true;  // close the window  }  var popup = document.getElementById('abPopup');  if ( popup )  {    var uri = popup.getAttribute('value');    // FIX ME - hack to avoid crashing if no ab selected because of blank option bug from template    // should be able to just remove this if we are not seeing blank lines in the ab popup    if ( !uri )      return false;  // don't close window    // -----    if (gEditCard.card)    {      if (!CheckAndSetCardValues(gEditCard.card, document, true))        return false;  // don't close window      // replace gEditCard.card with the card we added      // so that save listeners can get / set attributes on      // the card that got created.      gEditCard.card = GetDirectoryFromURI(uri).addCard(gEditCard.card);      NotifySaveListeners();      if ("arguments" in window && window.arguments[0])        window.arguments[0].allowRemoteContent = gEditCard.card.allowRemoteContent;    }  }  return true;  // close the window}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/7bedc789ce4693f8b68d8f9969c41b7272a65e21/abCardOverlay.js/clean/mailnews/addrbook/resources/content/abCardOverlay.js