// JavaScript Document


var checkIt;

function showMenu(id) {
	var d = document.getElementById(id);

	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
	if (d) {
		d.style.display='block';
		d.style.left='0px';
		d.style.top='31px';
	}
	
	if (checkIt) {
		clearTimeout(checkIt);
	} else {
		chkUserInput();
	};
}

function chkUserInput()
{
	if (checkIt) clearTimeout(checkIt);
	checkIt = setTimeout('closeAll()',1000);
}

function keepMenu() {
	if (checkIt) clearTimeout(checkIt);
}

function closeAll()
{
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}	
	
}