function Timer(){this.timers=new Array();this.timerFunctions=[function(){Callback(0)},function(){Callback(1)},function(){Callback(2)},function(){Callback(3)},function(){Callback(4)},function(){Callback(5)},function(){Callback(6)},function(){Callback(7)},function(){Callback(8)},function(){Callback(9)},function(){Callback(10)},function(){Callback(11)},function(){Callback(12)},function(){Callback(13)},function(){Callback(14)},function(){Callback(15)},function(){Callback(16)},function(){Callback(17)},function(){Callback(18)},function(){Callback(19)}]}function Callback(D){var C=timer.timers[D].object;var A=timer.timers[D].memberFunction;var B=timer.timers[D].args;if(C){A.apply(C,B)}else{A(B)}timer.timers[D].memberFunction=undefined}Timer.prototype.SetTimer=function(C,B,A){for(iTimerSlot=0;iTimerSlot<this.timers.length;iTimerSlot++){if(this.timers[iTimerSlot].memberFunction==undefined){break}}if(iTimerSlot==this.timers.length){this.timers[iTimerSlot]=new Object()}this.timers[iTimerSlot].object=B;this.timers[iTimerSlot].memberFunction=A;this.timers[iTimerSlot].args=Array.prototype.splice.call(arguments,3,arguments.length-3);this.timers[iTimerSlot].timer=setTimeout(this.timerFunctions[iTimerSlot],C);return iTimerSlot};Timer.prototype.ClearTimer=function(A){if(this.timers[A]){clearTimeout(this.timers[A].timer);this.timers[A].memberFunction=undefined}};var timer=new Timer()
