rem: var progressLabel = getString("progress"); if (progressLabel == "") { progressLabel = "Progress:"; } switchUI = false; }  if (progressParams) { var docTitleStr = elipseString(progressParams.docTitle, false); if (docTitleStr != docTitle) { docTitle = docTitleStr; dialog.title.value = docTitle; } var docURLStr = progressParams.docURL; if (docURLStr != docURL && dialog.title != null) { docURL = docURLStr; if (docTitle == "") { dialog.title.value = elipseString(docURLStr, true); } } }   var percent; if ( aMaxTotalProgress > 0 ) { percent = Math.round( (aCurTotalProgress*100)/aMaxTotalProgress ); if ( percent > 100 ) percent = 100;  dialog.progress.removeAttribute( "mode");   dialog.progress.setAttribute( "value", percent );   var percentPrint = getString( "progressText" ); percentPrint = replaceInsert( percentPrint, 1, percent ); dialog.progressText.setAttribute("value", percentPrint); } else {  dialog.progress.setAttribute( "mode", "undetermined" );  dialog.progressText.setAttribute("value", ""); } }, 
add:  if (aMaxTotalProgress > 0) { var percentage = Math.round(aCurTotalProgress * 100 / aMaxTotalProgress); setProgressPercentage(percentage); } else {  setProgressPercentage(-1); } }, 
context:     onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress)    {      if (switchUI)       {        dialog.tempLabel.setAttribute("hidden", "true");        dialog.progress.setAttribute("hidden", "false");        dialog.cancel.setAttribute("disabled", "false");        var progressLabel = getString("progress");        if (progressLabel == "") {          progressLabel = "Progress:"; // better than nothing        }        switchUI = false;      }      if (progressParams)      {        var docTitleStr = elipseString(progressParams.docTitle, false);        if (docTitleStr != docTitle) {          docTitle = docTitleStr;          dialog.title.value = docTitle;        }        var docURLStr = progressParams.docURL;        if (docURLStr != docURL && dialog.title != null) {          docURL = docURLStr;          if (docTitle == "") {            dialog.title.value = elipseString(docURLStr, true);          }        }      }      // Calculate percentage.      var percent;      if ( aMaxTotalProgress > 0 )       {        percent = Math.round( (aCurTotalProgress*100)/aMaxTotalProgress );        if ( percent > 100 )          percent = 100;                dialog.progress.removeAttribute( "mode");                // Advance progress meter.        dialog.progress.setAttribute( "value", percent );        // Update percentage label on progress meter.        var percentPrint = getString( "progressText" );        percentPrint = replaceInsert( percentPrint, 1, percent );        dialog.progressText.setAttribute("value", percentPrint);      }       else       {        // Progress meter should be barber-pole in this case.        dialog.progress.setAttribute( "mode", "undetermined" );        // Update percentage label on progress meter.        dialog.progressText.setAttribute("value", "");      }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/59cd8cec6e8a8a946512ae4ad7ee8b2f545283fd/printProgress.js/buggy/xpfe/global/resources/content/printProgress.js