rem:   if (document.getElementById("server.isSecure").checked) document.getElementById("server.port").value = protocolInfo.getDefaultServerPort(true); else document.getElementById("server.port").value = protocolInfo.getDefaultServerPort(false); 
add: if (isSecureSelected) { document.getElementById("defaultPort").value = defaultPortSecure; if (previouslyDisplayedPort == defaultPort) document.getElementById("server.port").value = defaultPortSecure; } else { document.getElementById("defaultPort").value = defaultPort; if (previouslyDisplayedPort == defaultPortSecure) document.getElementById("server.port").value = defaultPort; } 
context: function secureSelect() {    var serverType   = document.getElementById("server.type").getAttribute("value");    var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + serverType].getService(Components.interfaces.nsIMsgProtocolInfo);    // If the secure option is checked, protocolInfo returns a secure port value	// for the corresponding protocol. Otherwise, a default value is returned.    if (document.getElementById("server.isSecure").checked)        document.getElementById("server.port").value = protocolInfo.getDefaultServerPort(true);    else        document.getElementById("server.port").value = protocolInfo.getDefaultServerPort(false);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/127f838241e9ef816f1128000c169de685b31f83/am-server.js/buggy/mailnews/base/prefs/resources/content/am-server.js