rem: if (aStatus == 0) processEndOfDownload(false); else processEndOfDownload(true); 
add: window.close(); 
context:     onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus)    {      if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_START)      {        // Put progress meter in undetermined mode.        dialog.progress.setAttribute( "value", 0 );        dialog.progress.setAttribute( "mode", "undetermined" );      }            if (aStateFlags & Components.interfaces.nsIWebProgressListener.STATE_STOP)      {        // we are done sending/saving the message...        // Indicate completion in status area.        var msg;        if (itsASaveOperation)          msg = getString( "messageSaved" );        else          msg = getString( "messageSent" );        dialog.status.setAttribute("value", msg);        // Put progress meter at 100%.        dialog.progress.setAttribute( "value", 100 );        dialog.progress.setAttribute( "mode", "normal" );        var percentMsg = getString( "percentMsg" );        percentMsg = replaceInsert( percentMsg, 1, 100 );        dialog.progressText.setAttribute("value", percentMsg);        if (aStatus == 0)          processEndOfDownload(false);        else          processEndOfDownload(true);      }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/404f22fd90a4b657fb3c2d3e43abf7322618f43c/sendProgress.js/buggy/mailnews/compose/resources/content/sendProgress.js