add:   var menuitemID; switch ( cvPrefs.nameColumn ) { case 2: menuitemID = 'firstLastCmd'; break; case 1: menuitemID = 'lastFirstCmd'; break; case 0: default: menuitemID = 'displayNameCmd'; break; } menuitem = top.document.getElementById(menuitemID); if ( menuitem ) menuitem.setAttribute('checked', 'true'); 
context: function GetCurrentPrefs(){	var prefs = Components.classes["component://netscape/preferences"];	if ( prefs )	{		prefs = prefs.getService();		if ( prefs )			prefs = prefs.QueryInterface(Components.interfaces.nsIPref);	}				if ( prefs )	{		try {			cvPrefs.prefs = prefs;			cvPrefs.displayLastNameFirst = prefs.GetBoolPref("mail.addr_book.displayName.lastnamefirst");			cvPrefs.nameColumn = prefs.GetIntPref("mail.addr_book.lastnamefirst");			cvPrefs.lastFirstSeparator = ", ";			cvPrefs.firstLastSeparator = " ";			cvPrefs.titlePrefix = "Card for ";		}		catch (ex) {			dump("failed to get the mail.addr_book.displayName.lastnamefirst pref\n");		}	}}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/3a0d03e79f7ddd7ddc23b56e18a2c836d884ed6a/abCardViewOverlay.js/buggy/mailnews/addrbook/resources/content/abCardViewOverlay.js