rem: SetCardValues(gEditCard.card, document);  var directory = GetDirectoryFromURI(uri); 
add: if (!CheckAndSetCardValues(gEditCard.card, document, true)) return false; 
context: function NewCardOKButton(){  if (gOkCallback)  {    SetCardValues(gEditCard.card, document);    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)    {      SetCardValues(gEditCard.card, document);      var directory = GetDirectoryFromURI(uri);      // replace gEditCard.card with the card we added      // so that save listeners can get / set attributes on      // the card that got created.      var addedCard = directory.addCard(gEditCard.card);      gEditCard.card = addedCard;      NotifySaveListeners();    }  }  return true;  // close the window}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d8f33fc83af8eee4cc30d61e6aeb836a5aa41ada/abCardOverlay.js/clean/mailnews/addrbook/resources/content/abCardOverlay.js