rem: var email = pageData.identity.email.value; var emailParts = email.split("@"); loginNameInput.value = emailParts[0]; 
add: loginNameInput.value = parent.getUsernameFromEmail(pageData.identity.email.value); } }  var smtpNameInput = document.getElementById("smtpusername"); var smtpServer = null; try { smtpServer = parent.smtpService.defaultServer; } catch (ex) {}  if (smtpServer && smtpServer.hostname && smtpServer.username && smtpServer.redirectorType == null) {   modifyStaticText(smtpServer.username, "2") hideShowLoginSettings(2, 1, 3); smtpNameInput.value = smtpServer.username; } else {   var smtpServerName = pageData.server.smtphostname.value; var incomingServerName = pageData.server.hostname.value; if (smtpServerName == incomingServerName) {   modifyStaticText(smtpServerName, "3") hideShowLoginSettings(3, 1, 2); smtpNameInput.value = ""; } else {   hideShowLoginSettings(1, 2, 3); smtpNameInput.value = smtpNameInput.value || loginNameInput.value; 
context: function loginPageInit() {    gPrefsBundle = document.getElementById("bundle_prefs");    var loginNameInput = document.getElementById("username");        if (loginNameInput.value == "") {      // retrieve data from previously entered pages      var pageData = parent.GetPageData();      var type = parent.getCurrentServerType(pageData);      dump("type = " + type + "\n");      protocolinfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + type].getService(Components.interfaces.nsIMsgProtocolInfo);      if (protocolinfo.requiresUsername) {        // since we require a username, use the uid from the email address        var email = pageData.identity.email.value;        var emailParts = email.split("@");        loginNameInput.value = emailParts[0];      }    }}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/2dff18c7d7ef6bea315fcdf96583f60a0a7b8594/aw-login.js/clean/mailnews/base/prefs/resources/content/aw-login.js