function Timer(i,c)
{
	this.interval=i
	this.started=false
	this.cyclic=c
	this.tId=null

	this.Start = function(cb)
	{
		if ( !this.started )
		{
			this.started = true
			this.tId = (this.cyclic) ? setInterval(cb,this.interval) : setTimeout(cb,this.interval)
		}
	}

	this.Stop = function()
	{
		if ( this.started )
			(this.cyclic) ? clearInterval(this.tId) : clearTimeout(this.tId)
		this.started = false
	}
}