rem: editCard.okCallback = 0; 
context: function OnLoadNewCard(){  InitEditCard();  doSetOKCancel(NewCardOKButton, 0);  var cardproperty = Components.classes["@mozilla.org/addressbook/cardproperty;1"].createInstance();  cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);  editCard.card = cardproperty;  editCard.okCallback = 0;  editCard.titleProperty = "newCardTitle"  if ("arguments" in window && window.arguments[0])  {    if ("selectedAB" in window.arguments[0])      editCard.selectedAB = window.arguments[0].selectedAB;    else      editCard.selectedAB = "moz-abmdbdirectory://abook.mab";    // we may have been given properties to pre-initialize the window with....    // we'll fill these in here...    if ("primaryEmail" in window.arguments[0])      editCard.card.primaryEmail = window.arguments[0].primaryEmail;    if ("displayName" in window.arguments[0])      editCard.card.displayName = window.arguments[0].displayName;  }  // set popup with address book names  var abPopup = document.getElementById('abPopup');  if ( abPopup )  {    var menupopup = document.getElementById('abPopup-menupopup');    if ( editCard.selectedAB && menupopup && menupopup.childNodes )    {      for ( var index = menupopup.childNodes.length - 1; index >= 0; index-- )      {        if ( menupopup.childNodes[index].getAttribute('value') == editCard.selectedAB )        {          abPopup.label = menupopup.childNodes[index].getAttribute('label');          abPopup.value = menupopup.childNodes[index].getAttribute('value');          break;        }      }    }    else {      // Default to the first valid addressbook when none is      // selected. (the 0th is an empty/invalid entry)      abPopup.label = menupopup.childNodes[1].getAttribute('label');      abPopup.value = menupopup.childNodes[1].getAttribute('value');    }  }  GetCardValues(editCard.card, document);  //// FIX ME - looks like we need to focus on both the text field and the tab widget  //// probably need to do the same in the addressing widget  // focus on first name  var firstName = document.getElementById('FirstName');  if ( firstName )    firstName.focus();  moveToAlertPosition();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/d08d4d3f9753b01573c0820f3dc3010c62295d11/abCardOverlay.js/clean/mailnews/addrbook/resources/content/abCardOverlay.js