var hideTimeout = null;

function setHideTimeout()
{
  hideTimeout = setTimeout( "hideAll();", 50000 );
}

function stopHideTimeout()
{
  if( hideTimeout != null )
  {
    clearTimeout( hideTimeout );
    hideTimeout = null;
  }
}

function hideAll() 
{
  if( hideTimeout != null )
  {
    clearTimeout( hideTimeout );
    hideTimeout = null;
	}

  for( var i=1; i<7; i++ )
  {
	if( document.all )  //for MSIE >=4.0
	{
	document.all["menu"+i].style.visibility="hidden";
	}

	else if( document.getElementById ) //for Netscape >=6.0
		{
    		document.getElementById("menu"+i).style.visibility="hidden";
		}
	else {document.getElementById("menu"+i).visibility="hidden";}

  for( var j=1; j<20; j++ )
  {
	if( document.all )  //for MSIE >=4.0
	{
	if (document.all[i+"menu"+j]) document.all[i+"menu"+j].style.visibility="hidden";
	}

	else if( document.getElementById ) //for Netscape >=6.0
		{
    		if( document.getElementById(i+"menu"+j) ) document.getElementById(i+"menu"+j).style.visibility="hidden";
		}
	else {if (document.getElementById(i+"menu"+j)) document.getElementById(i+"menu"+j).visibility="hidden";}

	}//for j
	menus2 (i);
}//for i


 }

function hideAll2m(n) 
{
  for( var j=1; j<20; j++ )
  {
	if( document.all )  //for MSIE >=4.0
	{
	if (document.all[n+"menu"+j]) document.all[n+"menu"+j].style.visibility="hidden";
	}

	else if( document.getElementById ) //for Netscape >=6.0
		{
    		if( document.getElementById(n+"menu"+j) ) document.getElementById(n+"menu"+j).style.visibility="hidden";
		}
	else {if (document.getElementById(n+"menu"+j)) document.getElementById(n+"menu"+j).visibility="hidden";}

	}//for
 }


function show(n) 
{
hideAll();
	if( document.all )  //for MSIE >=4.0
	{	
		document.all["menu"+n].style.left=109*(n-1)+3*(n-1);
		document.all["menu"+n].style.visibility="visible";
		//document.all["tb"+n].style.background = "#F55608";
	}
	else if( document.getElementById ) //for Netscape >=6.0
		{
			document.getElementById("menu"+n).style.left=109*(n-1)+3*(n-1);
			document.getElementById("menu"+n).style.visibility="visible";
			//document.getElementById("tb"+n).style.background = "#F55608";
		}
}


function menus2 (id1)
{
for (k=0;k<50;k++)
{
	if( document.all )  //for MSIE >=4.0
	{
		if( document.all["t"+id1+"t"+k] )
		{
		document.all["t"+id1+"t"+k].style.background = "#FCC4A4";
		document.all["a"+id1+"a"+k].style.color = "#000000";
		}
	}
	else if( document.getElementById ) //for Netscape >=6.0
	{
		if( document.getElementById("t"+id1+"t"+k) )
		{
		document.getElementById("t"+id1+"t"+k).style.background = "#FCC4A4";
		document.getElementById("a"+id1+"a"+k).style.color = "#000000";
		}
	}

}//for
}

function menu2show(id1,id2)
{
for (k=0;k<50;k++)
{
	if( document.all )  //for MSIE >=4.0
	{
		if( document.all["t"+id1+"t"+k] )
		{
		document.all["t"+id1+"t"+k].style.background = "#FCC4A4";
		document.all["a"+id1+"a"+k].style.color = "#000000";
		}
	}
	else if( document.getElementById ) //for Netscape >=6.0
	{
		if( document.getElementById("t"+id1+"t"+k) )
		{
		document.getElementById("t"+id1+"t"+k).style.background = "#FCC4A4";
		document.getElementById("a"+id1+"a"+k).style.color = "#000000";
		}
	}

}

	if( document.all )  //for MSIE >=4.0
	{
		document.all["t"+id1+"t"+id2].style.background = "#F55608";
		document.all["a"+id1+"a"+id2].style.color = "#FFFFFF";
//		document.all["tb"+id1].style.background = "#F55608";
	}
	else if( document.getElementById ) //for Netscape >=6.0
	{
	document.getElementById("t"+id1+"t"+id2).style.background = "#F55608";
	document.getElementById("a"+id1+"a"+id2).style.color = "#FFFFFF";
//	document.getElementById("tb"+id1).style.background = "#F55608";
	}
}

