function setClassCurrent( whichLayer )
{
  var elem;

	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( whichLayer );

	else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];

	else if( document.layers ) // this is the way nn4 works
		elem = document.layers[whichLayer];

	//Firefox
	elem.setAttribute("class","current");

	//IE
	elem.setAttribute("className","current");
}


function unsetClassCurrent( whichLayer )
{
	//Firefox
	document.getElementById(whichLayer).setAttribute("class","");
	//IE
	document.getElementById(whichLayer).setAttribute("className","");
}

function getCurrentItem( whichLayer )
{
	/*
  var elem;

	if( document.getElementById ) // this is the way the standards work
		elem = document.getElementById( whichLayer );

	else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];

	else if( document.layers ) // this is the way nn4 works
		elem = document.layers[whichLayer];
		
	//Firefox
	var elemNodes = elem.getElementsByTagName("li"); 
	for( var i = 0; i < elemNodes.length; i++ )
	{
		// get the child nodes of the LI
		var elemChildren = elemNodes.item(i).childNodes;
		// Iterate through the child nodes of the LI
		for( var j = 0; j < elemChildren.length; j++ )
		{
			// Look for currently active list item
			if( elemChildren.item(j).className == 'current' )
			{ 
			alert(elemChildren.item(j).id + 'is current');
			var currentlyActiveLayer = elemChildren.item(j).id;
			alert(currentlyActiveLayer);
			//unsetClassCurrent("'" + currentlyActiveLayer + "'");
			}

			// Look for currently active list item
			if( elemChildren.item(j).className == 'current' )
			{ 
			alert(elemChildren.item(j).id + 'is current');
			var currentlyActiveLayer = elemChildren.item(j).id;
			alert(currentlyActiveLayer);
			//unsetClassCurrent("'" + currentlyActiveLayer + "'");
			}

		}
	}*/

}
