add:    var defaultSmtpServerKey = gPrefBranch.getCharPref("mail.smtp.defaultserver"); var prefString = "mail.smtpserver."+ defaultSmtpServerKey + ".advanced.disable";  var advButton = document.getElementById("smtp.advancedbutton"); if (gPrefBranch.prefIsLocked(prefString)) { advButton.setAttribute("disabled", "true"); } 
context: function onLoad(){    parent.onPanelLoaded('am-smtp.xul');    var defaultSmtpServer = null;    try {        defaultSmtpServer = smtpService.defaultServer;    }    catch (ex) {        defaultSmtpServer = null;    }    initSmtpSettings(defaultSmtpServer);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5b9ab3f0a4933f47f37d7aef4a0fa88f976350aa/am-smtp.js/clean/mailnews/base/prefs/resources/content/am-smtp.js