var Timer=function(n,t,i,r,u){this.id=n;this.delay=t;this.interval=i;this.callback=r;this.context=u},TimerManager;Timer.prototype.start=function(){this.timer!==undefined&&(clearTimeout(this.timer),delete this.timer);var n=this,t=function(){n.callback(n);n.timer!==undefined&&(n.timer=setTimeout(t,n.interval))};this.timer=setTimeout(t,this.delay)};Timer.prototype.halt=function(){clearTimeout(this.timer);delete this.timer};Timer.prototype.isRunning=function(){return this.timer!==undefined};TimerManager=function(){var n=this;this.timers={};TimerManager=function(){return n}};TimerManager.prototype.addTimer=function(n){return this.timers[n.id]===undefined&&(this.timers[n.id]=n),this};TimerManager.prototype.getTimer=function(n){return this.timers[n]};TimerManager.prototype.deleteTimer=function(n){this.timers[n]!==undefined&&this.timers[n].halt();delete this.timers[n]};TimerManager.prototype.startAll=function(){for(id in this.timers)this.timers[id].start()};TimerManager.prototype.haltAll=function(){for(id in this.timers)this.timers[id].halt()}