gCurrentlyPrinting = PR_FALSE;
DocumentViewerImpl::mIsDoingPrinting = PR_FALSE;
  NS_IMETHOD_(void) Notify(nsITimer *timer)  {    if (mPresContext && mDocViewer) {      PRPackedBool initNewTimer = PR_TRUE;      // Check to see if we are done      // donePrinting will be true if it completed successfully or      // if the printing was cancelled      PRBool donePrinting = mDocViewer->PrintPage(mPresContext, mPrintOptions, mPrintObj);      if (donePrinting) {        // now clean up print or print the next webshell        if (mDocViewer->DonePrintingPages(mPrintObj)) {          initNewTimer = PR_FALSE;        }      }       Stop();      if (initNewTimer) {        nsresult result = StartTimer();        if (NS_FAILED(result)) {          donePrinting = PR_TRUE;     // had a failure.. we are finished..          gCurrentlyPrinting = PR_FALSE;        }      }    }  }