rem: am = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);  var invalidAccounts = getInvalidAccounts(am.accounts); var firstInvalidAccount;  if (invalidAccounts.length > 0) firstInvalidAccount = invalidAccounts[0]; else return null; 
add: var firstInvalidAccount = getFirstInvalidAccount(); 
context: function checkForInvalidAccounts(){    am = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);    var invalidAccounts = getInvalidAccounts(am.accounts);    var firstInvalidAccount;       if (invalidAccounts.length > 0)        firstInvalidAccount = invalidAccounts[0];    else        return null;    if (firstInvalidAccount) {        var pageData = GetPageData();        dump("We have an invalid account, " + firstInvalidAccount + ", let's use that!\n");        gCurrentAccount = firstInvalidAccount;        // there's a possibility that the invalid account has ISP defaults        // as well.. so first pre-fill accountData with ISP info, then        // overwrite it with the account data        var identity =            firstInvalidAccount.identities.QueryElementAt(0, nsIMsgIdentity);        dump("Invalid account: trying to get ISP data for " + identity.email + "\n");        var accountData = getIspDefaultsForEmail(identity.email);        dump("Invalid account: Got " + accountData + "\n");                // account -> accountData -> pageData        accountData = AccountToAccountData(firstInvalidAccount, accountData);                AccountDataToPageData(accountData, pageData);        gCurrentAccountData = accountData;                dump(parent.wizardManager.WSM);    }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/a00b42b2d7f7225771b1d8c73f406f5bb3d37952/AccountWizard.js/clean/mailnews/base/prefs/resources/content/AccountWizard.js