rem: setTimeout("postStart()", 0); 
add: setTimeout(postStart, 0); 
context: function Startup() {  var folderList = document.getElementById("downloadFolderList");    const nsILocalFile = Components.interfaces.nsILocalFile;  var pref = Components.classes["@mozilla.org/preferences-service;1"]                      .getService(Components.interfaces.nsIPrefBranch);                        try {    var downloadDir = pref.getComplexValue(downloadDirPref, nsILocalFile);          var desktop = getDownloadsFolder("Desktop");    var downloads = getDownloadsFolder("Documents");        // Check to see if the user-entered download dir is actually one of our    // enumerated values (Desktop, My Downloads) and if so select that    // item instead of the user selected one.     // XXX - It's lame that I should have to compare the path directly. The     // win32 implementation of nsIFile should know that Windows is not case     // sensitive.    var downloadPath = downloadDir.path.toUpperCase();    if (downloadPath == desktop.path.toUpperCase()) {      pref.clearUserPref(downloadDirPref);      pref.setIntPref(downloadModePref, 0);      folderList.selectedIndex = 0;    }    else if (downloadPath == downloads.path.toUpperCase()) {      pref.clearUserPref(downloadDirPref);      pref.setIntPref(downloadModePref, 1);      folderList.selectedIndex = 1;    }  }  catch (e) {  }    try {    selectCustomFolder(false);  }  catch (e) {  }    gLastSelectedIndex = folderList.selectedIndex;    // Initialize the File Type list  gHelperApps = new HelperApps();    gHandlersList = document.getElementById("fileHandlersList");  gHandlersList.database.AddDataSource(gHelperApps);  gHandlersList.setAttribute("ref", "urn:mimetypes");    (gEditFileHandler = document.getElementById("editFileHandler")).disabled = true;  (gRemoveFileHandler = document.getElementById("removeFileHandler")).disabled = true;    parent.hPrefWindow.registerOKCallbackFunc(updateSaveToFolder);  // XXXben such a hack. Should really update the OKCallbackFunction thing a bit to   //        let it support holding arbitrary data.   parent.hPrefWindow.getSpecialFolderKey = getSpecialFolderKey;  // XXXben menulist hack #43. When initializing the display to the custom  //        download path field, the field is blank.   var downloadFolderList = document.getElementById("downloadFolderList");  downloadFolderList.parentNode.removeChild(downloadFolderList);  var showFolder = document.getElementById("showFolder");  showFolder.parentNode.insertBefore(downloadFolderList, showFolder);  downloadFolderList.hidden = false;#ifdef MOZ_PHOENIX  toggleDMPrefUI(document.getElementById("showWhenStarting"));#endif    setTimeout("postStart()", 0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e90d87d0f0bd0b71e8d68b7f49507bfc2ae8a527/pref-downloads.js/clean/toolkit/mozapps/downloads/content/pref-downloads.js