var dom=document.getElementById;

if (dom){
document.write('<style type="text/css">\n');
document.write('#navigation li ul {display: none;}\n');
document.write('</style>\n');
}

var ar = [];

var load = window.onload;
if(typeof load == 'function')
	window.onload = function()
	{
		load();
		initMenu();
	};
else
	window.onload = initMenu;


function initMenu()
{
	ar = document.getElementById("navigation").getElementsByTagName("ul");
	H4 = document.getElementById("navigation").getElementsByTagName("h4");
	if(active = document.getElementById('active_menu'))
		active.style.display = 'block';

	//h4 hover für internet explorer
	if(navigator.appName.toLowerCase().indexOf('explorer') > -1)
	{
		for(var i=0; i<H4.length; i++)
		{
			H4[i].onmouseover = function()
			{
				this.style.background="#DDE5ED url('graphics/icons/note_hover.gif') no-repeat 9px center";
				this.style.color="#1B1B87";
			};
			H4[i].onmouseout = function()
			{
				this.style.background="url('graphics/icons/note.gif') no-repeat 8px center";
				this.style.color="#1B001B";
			};
		}
	}
}

function showhide(n){
	if (dom) {
		if(ar[n].style.display != "block"){
			for (var i=0; i<ar.length; i++)
				ar[i].style.display = "none";
			ar[n].style.display = "block";
		}else{
			ar[n].style.display = "none";
		}
	}
}

function showhide1(n){
    if (dom)
    {
        sub = document.getElementById('sub'+n);
            if(sub.style.display != "block")
	    {
                var ar = document.getElementById("navigation").getElementsByTagName("ul");
                for(var i=0; i<ar.length; i++)
                    ar[i].style.display = "none";
                sub.style.display = "block";
            }
	    else
	    {
                sub.style.display = "none";
            }
    }
}
