function HotSpotRotator()
{
	this.DEFAULT_DELAY = 300;

	this.lastId = 'ia-solutions-image';
	
	this.timer = null;
	
	this.idTable = {};
	
	this.delayedReset = function()
	{
		this.reset(this.DEFAULT_DELAY);
	}
	
	this.reset = function()
	{
		if (this.lastId)
		{
			if (arguments[0])
			{
				var instance = this;
				this.timeout(function() { instance.idTable[instance.lastId].style.display = 'none'; instance.lastId = null; }, arguments[0]);
			}
			else
			{
				this.idTable[this.lastId].style.display = 'none';
				this.lastId = null;
			}
		}
	}
	
	this.execute = function(id)
	{
		this.stopTimer();
		if (!this.idTable[this.lastId])
		{
			this.idTable[this.lastId] = document.getElementById(this.lastId);
		}
		this.reset();
		if (!this.idTable[id])
		{
			this.idTable[id] = document.getElementById(id);
		}
		
		this.idTable[id].style.display = '';
		this.lastId = id;
	}
	
	this.stopTimer = function()
	{
		if (this.timer)
		{
			clearTimeout(this.timer);
			this.timer = null;
		}
	}
	
	this.timeout = function(command, delay)
	{
		this.timer = window.setTimeout(command, delay);
	}
}

var rotator = new HotSpotRotator();
