function Timer(action,time)
{
	this.action = action;
	this.time = time;
	this.interval = -1;
}

Timer.prototype.stop = function()
{
	if(this.interval != -1)
		window.clearInterval(this.interval);
}

Timer.prototype.restart = function()
{
	this.stop();
	this.interval = window.setInterval(this.action,this.time);
}
