rem: try {  if (!parent.smtpService.defaultServer.redirectorType) { smtpServer = parent.smtpService.defaultServer; setPageData(pageData, "identity", "smtpServerKey", smtpServer.key); } 
add:  if (parent.smtpService.defaultServer && !parent.smtpService.defaultServer.redirectorType) { smtpServer = parent.smtpService.defaultServer; setPageData(pageData, "identity", "smtpServerKey", smtpServer.key); 
context: function serverPageInit() {  gOnMailServersPage = (document.documentElement.currentPage.id == "serverpage");  gOnNewsServerPage = (document.documentElement.currentPage.id == "newsserver");  if (gOnNewsServerPage)  {    var newsServer = document.getElementById("newsServer");    var pageData = parent.GetPageData();    try     {      newsServer.value = pageData.newsserver.hostname.value;    }    catch (ex){}  }      gHideIncoming = false;  if (gCurrentAccountData && gCurrentAccountData.wizardHideIncoming)    gHideIncoming = true;    var incomingServerbox = document.getElementById("incomingServerbox");  var serverTypeBox = document.getElementById("serverTypeBox");  if (incomingServerbox && serverTypeBox) {    if (gHideIncoming) {      incomingServerbox.setAttribute("hidden", "true");      serverTypeBox.setAttribute("hidden", "true");    }    else {      incomingServerbox.removeAttribute("hidden");      serverTypeBox.removeAttribute("hidden");    }  }    // Server type selection (pop3 or imap) is for mail accounts only  var pageData = parent.GetPageData();  var isMailAccount = pageData.accounttype.mailaccount;  if (isMailAccount && isMailAccount.value && !gHideIncoming){    var serverTypeRadioGroup = document.getElementById("servertype");    /*      * Check to see if the radiogroup has any value. If there is no     * value, this must be the first time user visting this page in the     * account setup process. So, the default is set to pop3. If there      * is a value (it's used automatically), user has already visited      * page and server type selection is done. Once user visits the page,      * the server type value from then on will persist (whether the selection      * came from the default or the user action).     */    if (!serverTypeRadioGroup.value) {      // Set pop3 server type as default selection      var pop3RadioItem = document.getElementById("pop3");      serverTypeRadioGroup.selectedItem = pop3RadioItem;    }    setServerType();  }  gPrefsBundle = document.getElementById("bundle_prefs");  var smtpServer = null;  try {    // don't use the default smtp server if it has a redirector type    if (!parent.smtpService.defaultServer.redirectorType) {      smtpServer = parent.smtpService.defaultServer;      setPageData(pageData, "identity", "smtpServerKey", smtpServer.key);    }  }  catch(ex){}  var noSmtpBox = document.getElementById("noSmtp");  var haveSmtpBox = document.getElementById("haveSmtp");  var boxToHide;  var boxToShow;    if (smtpServer && smtpServer.hostname && smtpServer.redirectorType == null) {    // we have a hostname, so modify and show the static text and     // store the value of the default smtp server in the textbox.    modifyStaticText(smtpServer.hostname, "1")    var smtpTextBox = document.getElementById("smtphostname");    if (smtpTextBox && smtpTextBox.value == "")      smtpTextBox.value = smtpServer.hostname;    boxToShow = haveSmtpBox;    boxToHide = noSmtpBox;  } else {    // no default hostname yet    boxToShow = noSmtpBox;    boxToHide = haveSmtpBox;  }  if (boxToHide)    boxToHide.setAttribute("hidden", "true");  if (boxToShow)    boxToShow.removeAttribute("hidden");}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/6faa40fb3a315fbd64a2d245bb23285becabc4d5/aw-server.js/buggy/mailnews/base/prefs/resources/content/aw-server.js