window.onload=function(){
	if(location.hash){
		$num=(location.hash); $startFrom=2;
		if($num.substr(2,1)=="0")$startFrom=3;
		$newnum=$num.substr($startFrom); toggleLayer(parseInt($newnum));
		}
	} 
//-------------------------------------------
function setupLayers(totalNum)
{
	for(id=1;id<=totalNum;id++)
	{
		//alert("layers : "+id);
		
		if (document.getElementById)
		{
			// this is the way the standards work
			var id1 = document.getElementById("layer_"+id);
			var id2 = document.getElementById("content_"+id).style;
		}
		else if (document.all)
		{
			// this is the way old msie versions work
			
			var id1 = document.all["layer_"+id];
			var id2 = document.all["content_"+id].style;
		}
		else if (document.layers)
		{
			// this is the way nn4 works
			
			var id1 = document.layers["layer_"+id];
			var id2 = document.layers["content_"+id].style;
		}
		
		id1.className = "collapsed";
		id2.display = "none";
	}
}
//------------------------------------------------------------
function toggleLayer(id)
{
/*toggleLayer(2)*/
	//alert("id : "+id);
	
	if (document.getElementById)
	{
		// this is the way the standards work
		var id1 = document.getElementById("layer_"+id);
		var id2 = document.getElementById("content_"+id).style;
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var id1 = document.all["layer_"+id];
		var id2 = document.all["content_"+id].style;
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var id1 = document.layers["layer_"+id];
		var id2 = document.layers["content_"+id].style;
	}
	
	var isToOpen = id1.className == "collapsed";
	
	//-------------------------------------------
	
	if(isToOpen)
	{
		id1.className = "revealed";
		id2.display = "block";
	}
	else
	{
		id1.className = "collapsed";
		id2.display = "none";
	}
	
}

//--------------------------------------------------