

var ActionTimers = new Array();
var ActionTimerCount = 0;

function ActionTimer()
{
	this.timerReference = ActionTimerCount++;
	ActionTimers[this.timerReference] = this;
	this.testValue = "";
	this.finishFunctions = new Array();
	//start a countdown for a function and fire if the classes' test value is onValue
	this.startCountdown = function(finishFunction,onValue,time)
	{
		this.finishFunctions[onValue] = finishFunction;
		var q = 
		setTimeout('ActionTimers['+this.timerReference+'].completeAction("'+onValue+'")', time);
	}
	
	this.completeAction = function(onValue)
	{
		if(this.testValue == onValue)
			this.finishFunctions[onValue]();
	}

}
