var t;
function showSubnavi(z)
{
	clearTimeout(t);
	for(var i=0;i<=6;i++)
	{
		document.getElementById("sub"+i).style.display = "none";
		document.getElementById("navBut"+i).style.backgroundColor = "#FFB27F";
	}
	currentNavBut = z;
	document.getElementById("sub"+z).style.display = "block";
	document.getElementById("navBut"+z).style.backgroundColor = "#FF6600";

	document.getElementById("tile_active").style.top= (109+z*15)+"px";
	
}

function highlightSubnavi(y,z,total)
{
	clearTimeout(t);
	for(var i=0;i<total;i++)
	{
		document.getElementById("subBut"+y+"_"+i).style.backgroundColor = "#FFD1B3";
	}
	document.getElementById("subBut"+y+"_"+z).style.backgroundColor = "#FF8734";
	currentSubBut = y+"_"+z;
}
var currentSubBut = "1_0";
var currentNavBut = "0";

function resetAll(activeNavBut,activeSubBut)
{

	document.getElementById("subBut"+currentSubBut).style.backgroundColor = "#FFD1B3";
	document.getElementById("navBut"+currentNavBut).style.backgroundColor = "#FFB27F";
	document.getElementById("sub"+currentNavBut).style.display = "none";
	
	//reset navigation
	document.getElementById("navBut"+activeNavBut).style.backgroundColor = "#FF6600";
	document.getElementById("sub"+activeNavBut).style.display = "block";

	if(activeNavBut<6)
	{
		document.getElementById("tile_active").style.top= (109+activeNavBut*15)+"px";
	}
	else
	{
		document.getElementById("tile_active").style.top= "-100px";
	}
	
	if(activeSubBut!="") document.getElementById("subBut"+activeSubBut).style.backgroundColor = "#FF8734";
	
}

function resetNavi(activeNavBut,activeSubBut)
{
	t = setTimeout("resetAll('"+activeNavBut+"','"+activeSubBut+"')",1000);

}

