download = gDownloadsView.insertBefore(itm, gDownloadsActiveLabel.nextSibling); 
download = gDownloadsView.insertBefore(itm, gDownloadsActiveTitle.nextSibling); 
  onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress,                              aCurTotalProgress, aMaxTotalProgress, aDownload)  {    var download = getDownload(aDownload.id);    if (!download) {      // d'oh - why this happens is complicated, let's just add it in      let uri = Cc["@mozilla.org/network/util;1"].                getService(Ci.nsIIOService).newFileURI(aDownload.targetFile);      let itm = createDownloadItem(aDownload.id, uri.spec,                                   aDownload.displayName,                                   aDownload.source.spec,                                   aDownload.state,                                   aDownload.percentComplete);      download = gDownloadsView.insertBefore(itm, gDownloadsActiveLabel.nextSibling);    }    // any activity means we should have active downloads!    gDownloadsActiveLabel.hidden = false;    // Update this download's progressmeter    if (aDownload.percentComplete == -1)      download.setAttribute("progressmode", "undetermined");    else {      download.setAttribute("progressmode", "normal");      download.setAttribute("progress", aDownload.percentComplete);    }    // Dispatch ValueChange for a11y    var event = document.createEvent("Events");    event.initEvent("ValueChange", true, true);    document.getAnonymousElementByAttribute(download, "anonid", "progressmeter")            .dispatchEvent(event);    // Update the rest of the UI (bytes transferred, bytes total, download rate,    // time remaining).     let status = this._statusFormat;    // Update the bytes transferred and bytes total    let ([progress, progressUnits] = this._convertByteUnits(aCurTotalProgress),         [total, totalUnits] = this._convertByteUnits(aMaxTotalProgress),         transfer) {      if (total <= 0)        transfer = this._transferNoTotal;      else if (progressUnits == totalUnits)        transfer = this._transferSameUnits;      else        transfer = this._transferDiffUnits;      transfer = this._replaceInsert(transfer, 1, progress);      transfer = this._replaceInsert(transfer, 2, progressUnits);      transfer = this._replaceInsert(transfer, 3, total);      transfer = this._replaceInsert(transfer, 4, totalUnits);      // Insert 1 is the download progress      status = this._replaceInsert(status, 1, transfer);      download.setAttribute("status-internal", transfer);    }    // Update the download rate    let ([rate, unit] = this._convertByteUnits(aDownload.speed)) {      // Insert 2 is the download rate      status = this._replaceInsert(status, 2, rate);      // Insert 3 is the |unit|/sec      status = this._replaceInsert(status, 3, unit);    }    // Update time remaining.    let (remain) {      if ((aDownload.speed > 0) && (aMaxTotalProgress > 0)) {        let minutes = Math.ceil((aMaxTotalProgress - aCurTotalProgress) /                                aDownload.speed / 60);        if (minutes > 1)          remain = this._replaceInsert(this._timeLeft, 1, minutes);        else          remain = this._timeLessMinute;      } else {        remain = this._timeUnknown;      }      // Insert 4 is the time remaining      status = this._replaceInsert(status, 4, remain);    }        download.setAttribute("status", status);  },
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/88b905fb32d8461302c3b42dfc079ba8268afa92/DownloadProgressListener.js/buggy/toolkit/mozapps/downloads/content/DownloadProgressListener.js