add:  var isSecureSelected = document.getElementById("server.isSecure").checked; var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + serverType].getService(Components.interfaces.nsIMsgProtocolInfo); document.getElementById("defaultPort").value = protocolInfo.getDefaultServerPort(isSecureSelected); 
context: function initServerType() {  var serverType = document.getElementById("server.type").getAttribute("value");    var propertyName = "serverType-" + serverType;  var messengerBundle = document.getElementById("bundle_messenger");  var verboseName = messengerBundle.getString(propertyName);  setDivText("servertype.verbose", verboseName);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/8af4b71a1c22a4a914867522d820ae772589242c/am-server.js/clean/mailnews/base/prefs/resources/content/am-server.js