var openDiv = '';
var timers = new Array();
var oldSetTimeout = window.setTimeout;

window.setTimeout = function(code, interval) {
	timers.push(oldSetTimeout(code, interval));
}

function resetTimeouts() {
	timers = new Array();
}

function clearTimeouts() {
	for (var i= 0;i < timers.length; i++) {
		clearTimeout(timers[i]);
	}
	resetTimeouts();
}

showTip = function(divid) {
	if (openDiv != '' && openDiv != divid){
		hideTip(openDiv);
	}
	openDiv = divid;
	document.getElementById(divid).style.visibility = "visible";
	document.getElementById(divid).style.display = "block";
	clearTimeouts();
	
}

hideTip = function(hidediv) {
	document.getElementById(hidediv).style.visibility = "hidden";
	document.getElementById(hidediv).style.display = "none";
}

stub = function(hidediv) {
	// nothing here, dummy function
}

clearTips = function() {
	if (openDiv != ''){
		hideTip(openDiv);
	}
}
