rem: var prefs = Components.classes["@mozilla.org/preferences;1"]; 
add: var prefs = Components.classes["@mozilla.org/preferences-service;1"]; 
context: function GetCurrentPrefs(){	// prefs	if ( cvPrefs == 0 )		cvPrefs = new Object;	var prefs = Components.classes["@mozilla.org/preferences;1"];	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 = " ";		}		catch (ex) {			dump("failed to get the mail.addr_book.displayName.lastnamefirst pref\n");		}	}		// check "Show Name As" menu item based on pref	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');}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/faf03ce445712b372523f881cc3144cfadc7a611/addressbook.js/clean/mailnews/addrbook/resources/content/addressbook.js