// JavaScript Document

var timeStart = new Boolean(false);
var timeOutID;
var timeConstant = 2000;


function switchDiv(id,classID)
{
	document.getElementById(id).className = classID;
	document.getElementById(id).style.cursor = "pointer";
}

function showNav(id) //,classID
{
	if (timeStart == true)
	{
		clearInterval(timeOutID);
		timeStart = false;
	}
	document.getElementById(id).style.display = "block";
//	document.getElementById(id).className = classID;
	document.getElementById(id).style.cursor = "pointer";
	
	timeOutID = setInterval('clearMenu()',timeConstant);
	timeStart = true;
}

function hideNav(id) //,classID
{
	stopTimer();
	document.getElementById(id).style.display = "none";
//	document.getElementById(id).className = classID;
}

function clearMenu()
{
	clearInterval(timeOutID);
	timeStart = false;
}

function stopTimer()
{
	clearInterval(timeOutID);
	timeStart = false;
}

function startTimer()
{
	if (timeStart == true)
	{
		clearInterval(timeOutID);
		timeStart = false;
	}	
	timeOutID = setInterval('clearMenu()',timeConstant);
	timeStart = true;
}