rem: top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); 
add: top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance(); top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook); 
context: function OnLoadSelectAddress(){  gAddressBookBundle = document.getElementById("bundle_addressBook");  prefixTo = gAddressBookBundle.getString("prefixTo") + ": ";  prefixCc = gAddressBookBundle.getString("prefixCc") + ": ";  prefixBcc = gAddressBookBundle.getString("prefixBcc") + ": ";	InitCommonJS();	var toAddress="", ccAddress="", bccAddress="";	doSetOKCancel(SelectAddressOKButton, 0);	top.addressbook = Components.classes["@mozilla.org/addressbook;1"].createInstance();	top.addressbook = top.addressbook.QueryInterface(Components.interfaces.nsIAddressBook);	top.gDialogResultsPaneSelectionChanged = DialogResultsPaneSelectionChanged;	// look in arguments[0] for parameters	if (window.arguments && window.arguments[0])	{		// keep parameters in global for later		if ( window.arguments[0].composeWindow )			top.composeWindow = window.arguments[0].composeWindow;		if ( window.arguments[0].msgCompFields )			top.msgCompFields = window.arguments[0].msgCompFields;		if ( window.arguments[0].toAddress )			toAddress = window.arguments[0].toAddress;		if ( window.arguments[0].ccAddress )			ccAddress = window.arguments[0].ccAddress;		if ( window.arguments[0].bccAddress )			bccAddress = window.arguments[0].bccAddress;					dump("onload top.composeWindow: " + top.composeWindow + "\n");		dump("onload toAddress: " + toAddress + "\n");		// put the addresses into the bucket		AddAddressFromComposeWindow(toAddress, prefixTo);		AddAddressFromComposeWindow(ccAddress, prefixCc);		AddAddressFromComposeWindow(bccAddress, prefixBcc);	}		SelectFirstAddressBook();		DialogResultsPaneSelectionChanged();	DialogBucketPaneSelectionChanged();}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/0b2dd2b2d2fd037df917e07645fa019a963332a5/abSelectAddressesDialog.js/clean/mailnews/addrbook/resources/content/abSelectAddressesDialog.js