add: if (!folder) {  if (gDBView) { try { var msgHdr = gDBView.hdrForFirstSelectedMessage; var accountKey = msgHdr.accountKey; if (accountKey.length > 0) { var account = accountManager.getAccount(accountKey); if (account) { server = account.incomingServer; if (server) folder = server.rootFolder; } } } catch (ex) {} } if (!folder) { folder = GetFirstSelectedMsgFolder();    if (folder && folder.server.type == "none" && folder.server.isDeferredTo) { var defaultServer = accountManager.defaultAccount.incomingServer; if (defaultServer.rootMsgFolder == folder.server.rootFolder) folder = defaultServer.rootFolder; } }  } 
context: function MsgFilters(emailAddress, folder){    var args;    if (emailAddress)    {      /* we have to do prefill filter so we are going to          launch the filterEditor dialog         and prefill that with the emailAddress */               var curFilterList = folder.getFilterList(msgWindow);      args = {filterList: curFilterList};      args.filterName = emailAddress;      window.openDialog("chrome://messenger/content/FilterEditor.xul", "",                         "chrome, modal, resizable,centerscreen,dialog=yes", args);      /* if the user hits ok in the filterEditor dialog we set          args.refresh=true there         we check this here in args to show filterList dialog */      if ("refresh" in args && args.refresh)      {         args = { refresh: true, folder: preselectedFolder };         MsgFilterList(args);      }    }    else  // just launch filterList dialog    {      args = { refresh: false, folder: folder };      MsgFilterList(args);    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/864bec57901417b7e713de73b1516b2d9ae21673/mailWindowOverlay.js/clean/mail/base/content/mailWindowOverlay.js