var idArray = new Array() ;

function setup()
{
	listArray = document.getElementsByTagName("li") ;
	for( i=0; i<listArray.length; i++ )
	{
		if( navigator.appName == "Microsoft Internet Explorer" )
		{ getAt = listArray[i].getAttribute( "className" ) }
		else{ getAt = listArray[i].getAttribute( "class" ) }
		if( getAt == "l_cat" )
		{
			tagA = listArray[i].getElementsByTagName( "a" ) ;
			idArray.push( tagA[0].getAttribute( "id" ) ) ;
		}
	}
	
	hideAll() ;
	
	ltx = location.href.slice( 0 , location.href.lastIndexOf( "/" ) ) ;
	ltx = ltx.slice( ltx.lastIndexOf( "/" )+1 ) ;
	if( ltx != undefined ){ shMenu( ltx ) }
	
	showHere();
}

function shMenu( itemId )
{
	dObj = document.getElementById( "ul_" + itemId ) ;
	
	if( dObj.style.display == "block" ){ dObj.style.display = "none" ; }
	else if( dObj.style.display == "none" )
	{
		hideAll() ;
		dObj.style.display = "block" ;
	}

}

function hideAll()
{
	for( i=0; i<idArray.length; i++ )
	{ document.getElementById( "ul_" + idArray[i] ).style.display = "none" }
	
	/*hArray = document.getElementByTagName( "span" ) ;
	for( i=0; i<hArray.length; i++ )
	{ if( hArray[i].innerHTML == "Бе" ){ hArray[i].innerHTML = "<img src=\"linkbit.gif\" width=\"\" height=\"\" />" }*/
}

function showHere()
{
	anc = document.getElementById( location.href ) ;
	anc.style.fontWeight = "bold" ;
}