var currentId = "none";
var timer;

function show(id)
{
	if(currentId != "none")
		nodelay_hide(currentId);
	document.getElementById(id).style.visibility = "visible";
}

function stay(id)
{
	clearTimeout(timer);
	show(id);
}

function nodelay_hide(id)
{
	document.getElementById(id).style.visibility = "hidden";
}

function delay_hide(id)
{
	currentId = id;
	timer = setTimeout("hide_current()", 400);
}

function hide_current()
{
	nodelay_hide(currentId);
}