add:  gObserver= Components.classes["@mozilla.org/observer-service;1"]. getService(Components.interfaces.nsIObserverService); gObserver.notifyObservers(null, "charsetmenu-selected", "other"); 
context: function onPreInit(account, accountValues){  // Bug 134238  // Make sure server.isSecure will be saved before server.port preference  parent.getAccountValue(account, accountValues, "server", "isSecure", null, false);  var type = parent.getAccountValue(account, accountValues, "server", "type", null, false);  gRedirectorType = parent.getAccountValue(account, accountValues, "server", "redirectorType", null, false);  hideShowControls(type);  gServer = account.incomingServer;    if(!account.incomingServer.canEmptyTrashOnExit)  {    document.getElementById("server.emptyTrashOnExit").setAttribute("hidden", "true");    document.getElementById("imap.deleteModel.box").setAttribute("hidden", "true");  }  var hideButton = false;  try {    if (gRedirectorType) {      var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);      var prefString = "mail.accountmanager." + gRedirectorType + ".hide_advanced_button";      hideButton = prefs.getBoolPref(prefString);    }  }  catch (ex) { }  if (hideButton)    document.getElementById("server.advancedbutton").setAttribute("hidden", "true");    // otherwise let hideShowControls decide}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/5abb566d377e787afcf7529d6383e24058f4d750/am-server.js/clean/mailnews/base/prefs/resources/content/am-server.js