initNav = function() {
	if (typeof document.body.style.maxHeight == 'undefined') {
		var nav = document.getElementById("main-nav");
		var lis = nav.getElementsByTagName("li");
		for (var i=0; i<lis.length; i++)
		{
			lis[i].onmouseover = function()
			{
				this.className += " hover";
			}
			lis[i].onmouseout = function()
			{
				this.className = this.className.replace(" hover", "");
			}
		}
	}
}
function initAccordion()
{
	var accordion_block = document.getElementById('accordion');
	if(accordion_block)
	{
		
		var accordion = new Accordion('div.click', 'div.drop-down', {
			alwaysHide: true,
			opacity: false,
			show:0,
			onActive: function(toggler, element){
				if(toggler.className.indexOf("active") == -1)
					toggler.className += ' active';
			},
		 
			onBackground: function(toggler, element){
				toggler.className = toggler.className.replace('active','');
			}
		}, accordion_block);
		
		var kartenbereich = document.getElementById('karte');
		if(kartenbereich) {
		
		 $('show1').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(0); //will open section 4 and hide all others, remember the first section is '0'.
		});		

				 $('show2').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(1); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show3').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(2); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show4').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(3); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show5').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(4); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show6').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(5); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show7').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(6); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		
				 $('show8').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(7); //will open section 4 and hide all others, remember the first section is '0'.
		});	
				 $('show9').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(8); //will open section 4 and hide all others, remember the first section is '0'.
		});	
		$('show10').addEvent('click', function(e){
			e = new Event(e).stop();
			accordion.display(9); //will open section 4 and hide all others, remember the first section is '0'.
		});	}	}
}
if (window.addEventListener)
{
	window.addEventListener("load", initNav, false);
	window.addEventListener("load", initAccordion, false);
}
else if (window.attachEvent)
{
	window.attachEvent("onload", initNav, false);
	window.attachEvent("onload", initAccordion, false);
}


