
	var chapters		= new Array('home', 'ueberuns', 'firmenvortraege', 'seminare', 'wissen', 'shop', 'presse', 'kontakt' );
		
	function leaveMainNavi(  )
	{
		naviActive( currentChapter, true );
	}
	
	function showSub( chapter )
	{
		naviActive( chapter, false );
		
		var imgName		= document.getElementById( 'img_' + chapter )
		onOverNav(imgName, chapter, false);
		
		var subNavi		= document.getElementById( 'sub_' + chapter );
		if (subNavi)
			subNavi.style.display	= 'block';

		if (chapter != currentChapter) 	
		{
		if (document.getElementById( 'sub_' + currentChapter ))
				document.getElementById( 'sub_' + currentChapter ).style.display	= 'none';
		}
	}
	
	function hideSub( chapter )
	{
		var subNavi		= document.getElementById( 'sub_' + chapter );
		if (subNavi)
			subNavi.style.display	= 'none';
			
		if (document.getElementById( 'sub_' + currentChapter ))
			document.getElementById( 'sub_' + currentChapter ).style.display	= 'block';
	}

	function onOverNav( img, chapter, topic )
	{
		var imgName		= getImageName( chapter, topic );
		var current		= (img.className == 'active');
		
		if (current)
			img.src		= imgName + '_hl.gif';
		else
			img.src		= imgName + '_ro.gif';
	}
	
	function onOutNav( img, chapter, topic )
	{
		var imgName		= getImageName( chapter, topic );
		var current		= (img.className == 'active');
		
		if (current)
			img.src		= imgName + '_hl.gif';
		else
			img.src		= imgName + '_no.gif';
	}
	
	function itemActive( chapter, active )
	{
		var imgName		= getImageName( chapter, false );
		var img			= document.getElementById( 'img_' + chapter );
		var current		= (img.className == 'active');
		
		if ( active )
		{
			if ( current ) 
			{
				img.src		= imgName + '_hl.gif';
			} else {
				img.src		= imgName + '_no.gif';
			}
		} else {
			if ( current ) 
			{
				img.src		= imgName + '_hl.gif';
			} else {
				img.src		= imgName + '_no.gif';
			}
		}
	}
	
	function naviActive( chapter, active )
	{	
		for ( var i in chapters )
		{
			itemActive( chapters[i], active );
		}
	}
	
	function getImageName( chapter, topic ) {
		var imgPath	= '/images/nav/';
		if ( topic ) {
			return imgPath + chapter + '/' + topic;
		}
		return imgPath + chapter;
	}