lastPaintInterval javascript variable was not defined causing painting error

Added a declaration of the lastPaintInterval variable that will later be referenced.