function IniciarMenus()
{
	EsconderMenu();
}

function MostrarMenu(strMenu)
{ 
	EsconderMenu();
	document.getElementById(strMenu).style.visibility = 'visible';
}

function AvaliarEsconderMenu(menu)
{
    if (!menu.contains(event.toElement))
    EsconderMenu(); 
}

function EsconderMenu()
{
	for(i=1;i<=2;i++)
	{
		if (document.getElementById('ssmenu'+i)){
			with(document.getElementById('ssmenu'+i).style)
			{
    			visibility = 'hidden';
			}
		}
	}
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("mainmenu");
		if (navRoot){
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}
	
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("topmenu");
		if (navRoot){
			for (i=0; i<navRoot.childNodes.length; i++) {
				node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
					node.onmouseover=function() {
						this.className+=" over";
					}
					node.onmouseout=function() {
						this.className=this.className.replace(" over", "");
					}
				}
			}
		}
	}

}

window.onload=startList;
