function DelayHover(anchor, delay) {
	this.delayTime = delay;
	this.initCheck = true;
	this.HoverFiredCallback = null;
	this.objEvent = null;

	this.objAnchor = anchor;
	this.otherAnchors = null;

	this.onMouseOverCallback = null;
	this.onMouseOutCallback = null;
	this.enabled = true;

	var obj = this;

	var showReference = this.checkHover;
	this.showCallback = function(event) { showReference.call(obj, event); };

	addHandler(this.objAnchor, "mouseover", this.showCallback);
}

DelayHover.prototype.checkHover = function(event) 
{
	var obj = this;
	if (this.enabled == false) { return; }	

	if (this.initCheck == true && this.delayTime > 0)
	{
		this.initCheck = false;

		//add mouse out handler
		var removeCallback = this.removeHoverCheck;
		this.removeCallback = function(event) { removeCallback.call(obj, event); };

		addHandler(obj.objAnchor, "mouseout", this.removeCallback);
	//	removeHandler(this.objAnchor, "mouseover", this.showCallback);

		//set timer && wait
		var functionReference = this.checkHover;
		var callback = function(event) { functionReference.call(obj, event); };
		this.interval = setInterval(callback, this.delayTime);

		this.objEvent = event;
		if (this.onMouseOverCallback) { this.onMouseOverCallback(); }
	}
	else 
	{		
		//if this is being trigged by an event ignore it - it must be trigged by the TIMER
		if (event && event.type && this.delayTime > 0) { return; }

		//fire callback
		this.HoverFiredCallback(this.objEvent, this.objAnchor);

		clearInterval(this.interval);
		this.initCheck = true;
	}
}

DelayHover.prototype.removeHoverCheck = function(event)
{
	var curX = event.clientX + document.body.scrollLeft;
	var curY = event.clientY + document.body.scrollTop;
	if (hitTest(curX, curY, this.objAnchor)) { return; }

	this.initCheck = true;
	clearInterval(this.interval);

	//remove mouse out handler
	removeHandler(this.objAnchor, "mouseout", this.removeCallback);
	//addHandler(this.objAnchor, "mouseover", this.showCallback);

	if (this.onMouseOutCallback) { this.onMouseOutCallback(); }
}
