rem: if ( editCard.selectedAB ) abPopup.value = editCard.selectedAB; else {  abPopup.value = "abdirectory: 
add: 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('data') == editCard.selectedAB ) { abPopup.value = menupopup.childNodes[index].getAttribute('value'); break; } } 
context: function OnLoadNewCard(){	InitEditCard();	doSetOKCancel(NewCardOKButton, 0);		var cardproperty = Components.classes["component://netscape/addressbook/cardproperty"].createInstance();	cardproperty = cardproperty.QueryInterface(Components.interfaces.nsIAbCard);	editCard.card = cardproperty;	editCard.okCallback = 0;	editCard.titlePrefix = editCard.newCardTitlePrefix;	if (window.arguments && window.arguments[0])	{		if ( window.arguments[0].selectedAB )			editCard.selectedAB = window.arguments[0].selectedAB;	}	// set popup with address book names	var abPopup = document.getElementById('abPopup');	if ( abPopup )	{		if ( editCard.selectedAB )			abPopup.value = editCard.selectedAB;		else {			// this should not be hardcoded.			abPopup.value = "abdirectory://abook.mab";		}	}		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();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0c28a1387b094427b6605f8d6343a8e341a61de7/abCardOverlay.js/clean/mailnews/addrbook/resources/content/abCardOverlay.js