context: function setupForAccountFromFolder(aURI){  // XXX todo  // XXX make sure we do the right thing for the stand alone msg window  // XXX if no folders are selected or if a folder that doesn't get mail (news, local?) is selected  try {    var msgFolder = GetMsgFolderFromUri(aURI, false);    gCurrentServer = msgFolder.server;  }  catch (ex) {    // get server for default account    var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"]               .getService(Components.interfaces.nsIMsgAccountManager);    var account = accountManager.defaultAccount;    gCurrentServer = account.incomingServer;  }  var obj;  var key = gCurrentServer.key;  if (key in gSpamSettings) {    obj = gSpamSettings[key];  }  else {    // get and clone spam settings for this server    // we clone because if the users cancels we are going to throw away the changes    var settings = Components.classes["@mozilla.org/messenger/spamsettings;1"].createInstance(Components.interfaces.nsISpamSettings);    settings.clone(gCurrentServer.spamSettings);    obj = {server: gCurrentServer, settings: settings};     gSpamSettings[key] = obj;  }   // select server in the menulist  var serverList = document.getElementById("server");  var menuitems = serverList.getElementsByAttribute("id", obj.server.serverURI);  serverList.selectedItem = menuitems[0];  // set up the UI for this server  document.getElementById("level").selectedItem = document.getElementById("level" + obj.settings.level);  document.getElementById("moveOnSpam").checked = obj.settings.moveOnSpam;  if (obj.settings.actionTargetFolder)    SetFolderPicker(obj.settings.actionTargetFolder, "actionTargetFolder");  document.getElementById("purge").checked = obj.settings.purge;  document.getElementById("purgeInterval").value = obj.settings.purgeInterval;  document.getElementById("useWhiteList").checked = obj.settings.useWhiteList;  var abList = document.getElementById("whiteListAbURI");  menuitems = abList.getElementsByAttribute("id", obj.settings.whiteListAbURI);  abList.selectedItem = menuitems[0];}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/646ca49d09e28a39ac6538c4b54d2f58791e2c0b/junkMail.js/buggy/mailnews/base/resources/content/junkMail.js