var delayedHide = 100;

var runTime;

function startTimer() {
	runTime = setTimeout("hideAll()",delayedHide);
}

function resetTimer() {
	clearTimeout(runTime);
}

function showCalendar(sDiv) {
	resetTimer();
	hideAll();
	showDiv(sDiv);
}

function hideAll() {
	for(i=1;i<32;i++) {
		if(document.getElementById('calendar_' + i)) document.getElementById('calendar_' + i).style.visibility='hidden';
	}
}

function showDiv(sDiv) {
	document.getElementById(sDiv).style.visibility = 'visible';
	if (sDiv.substring(sDiv.indexOf('_') + 1) > 13)
	{
		document.getElementById(sDiv).className = "calendarday calendardayLeft";
	}
}
