rem: var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref); var compactFolderMin = document.getElementById("offline.compactFolderMin").value; var compactFolder = document.getElementById("offline.compactFolder").checked;  
context: function onSave(){    var retentionSettings = new Array;    var downloadSettings = new Array;    var prefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPref);    var compactFolderMin = document.getElementById("offline.compactFolderMin").value;    var compactFolder = document.getElementById("offline.compactFolder").checked;	     gIncomingServer.limitMessageSize = document.getElementById("offline.notDownload").checked;    gIncomingServer.maxMessageSize = document.getElementById("offline.notDownloadMin").value;    if(document.getElementById("nntp.keepAllMsg").checked)        retentionSettings.retainByPreference = 1;		    else if(document.getElementById("nntp.keepOldMsg").checked)        retentionSettings.retainByPreference = 2;    else if(document.getElementById("nntp.keepNewMsg").checked)        retentionSettings.retainByPreference = 3;    document.getElementById("nntp.keepMsg").value = retentionSettings.retainByPreference;    retentionSettings.daysToKeepHdrs = document.getElementById("nntp.keepOldMsgMin").value;    retentionSettings.daysToKeepBodies = document.getElementById("nntp.removeBodyMin").value;    retentionSettings.numHeadersToKeep = document.getElementById("nntp.keepNewMsgMin").value;    retentionSettings.keepUnreadMessagesOnly = document.getElementById("nntp.keepUnread").checked;    retentionSettings.cleanupBodiesByDates = document.getElementById("nntp.removeBody").checked;    downloadSettings.downloadByDate = document.getElementById("nntp.downloadMsg").checked;    downloadSettings.downloadUnreadOnly = document.getElementById("nntp.downloadUnread").checked;    downloadSettings.ageLimitOfMsgsToDownload = document.getElementById("nntp.downloadMsgMin").value;    prefs.SetBoolPref("mail.prompt_purge_threshhold", compactFolder);    prefs.SetIntPref("mail.purge_threshhold", compactFolderMin);    gIncomingServer.retentionSettings = retentionSettings;    gIncomingServer.downloadSettings = downloadSettings;    if (gImapIncomingServer) {        gImapIncomingServer.downloadBodiesOnGetNewMail = document.getElementById("offline.downloadBodiesOnGetNewMail").checked;        gImapIncomingServer.offlineDownload = document.getElementById("offline.newFolder").checked;    }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/14e38088a8190e1d4f088feb649b309a99f41f5e/am-offline.js/clean/mailnews/base/prefs/resources/content/am-offline.js