function initnavi(first)
{
	if(navigator.appName.indexOf('Microsoft') > -1)
	{  
    
    var li  = new Array();
		var b   = document.getElementById(first).firstChild;
		var c   = 0;
		var xxx = new Array();
		
		li[c]   = b;
		while(b.nextSibling) { c++; b=b.nextSibling; li[c]=b; }

		// Zuordung der Klassen für die Subnavis 
		for (var i=0;i<li.length;i++)
		{
			if (li[i].lastChild.nodeName == 'UL')
			{
				// sublists
				li[i].lastChild.className = 'sublist_1';
        // subsublists
        var subsublists = new Array();
        subsublists = li[i].lastChild.getElementsByTagName('ul');
        for(var j=0;j<subsublists.length;j++) subsublists[j].className = 'sublist_x';
			}
		}
		
		/* li:hover Verhalten zuweisen */
		var lis = document.getElementById(first).getElementsByTagName('li');
    for (j = 0; j < lis.length; j++)
    {

      if(lis[j].lastChild.tagName == 'UL' || lis[j].lastChild.tagName == 'LI')
      {
         lis[j].onmouseout  = function() {
         				// firstChild: a 
         				this.firstChild.style.color = '#F3584F';
         				// lastChild: ul
        				this.lastChild.style.display = 'none';
        				// this: li
        				this.style.backgroundColor = '#F9F9F9';
        }
        
        lis[j].onmouseover = function() { 
        				this.firstChild.style.color = '#494EBE';
        				this.lastChild.style.display = 'block';
        				this.style.backgroundColor = '#D0D3F8';
        }
      }
    	else 
    	{
    	
    		lis[j].onmouseover = function() { 
        				this.style.backgroundColor = '#D0D3F8';
        			}
        lis[j].onmouseout  = function() { 
        				this.style.backgroundColor = '#F9F9F9';
        			}
    	}
      /* solving IE z-index problem by turning the order */
      lis[j].style.zIndex = lis.length + 100 - j;
    }
	}
	
	// mark the current page

	// extras
	var dlp = document.location.pathname;
	
	if (document.location.pathname == '/' || document.location.pathname == '')
		dlp = '/index.htm';
	else if (document.location.pathname == '/checkorder.htm' || document.location.pathname == '/thankyou.htm')
		dlp = '/catalog.htm';
		
	var page = document.location.protocol + '//' + document.location.host + dlp;
	
	var as = document.getElementById(first).getElementsByTagName('a');
	for (var i=0;i<as.length;i++)
	{
		hrefparts = as[i].href.split('?');
		myhref    = hrefparts[0];
		if (myhref == page) {
			as[i].parentNode.className = 'current';
			as[i].className = 'current';
			if (as[i].parentNode.parentNode.parentNode.tagName == 'LI') 
			{
				as[i].parentNode.parentNode.parentNode.className = 'current';
				as[i].parentNode.parentNode.parentNode.firstChild.className = 'current';
				if (as[i].parentNode.parentNode.parentNode.parentNode.parentNode.tagName == 'LI') 
				{
					as[i].parentNode.parentNode.parentNode.parentNode.parentNode.className = 'current';
					as[i].parentNode.parentNode.parentNode.parentNode.parentNode.firstChild.className = 'current';
				}
			}
			//break;
		}
	}

	if(document.getElementById('subnavigation')) 
	{	
		var as = document.getElementById('subnavigation').getElementsByTagName('a');
		for (var i=0;i<as.length;i++)
		{
			hrefparts = as[i].href.split('?');
			myhref    = hrefparts[0];
			if (myhref == page) {
				as[i].style.color = '#6064C8';
				if(as[i].parentNode.parentNode.parentNode.parentNode.tagName != 'UL')
				{
					if(navigator.appName.indexOf('Microsoft') > -1) as[i].parentNode.style.listStyleImage = "url('../images/bullet_blue_ie.gif')";
					else as[i].parentNode.style.listStyleImage = "url('../images/bullet_blue.gif')";
				}
				break;
			}
		}
	}
	
	if(document.getElementById('subnavigation2')) 
	{	
		var as = document.getElementById('subnavigation2').getElementsByTagName('a');
		for (var i=0;i<as.length;i++)
		{
			hrefparts = as[i].href.split('?');
			myhref    = hrefparts[0];
			if (myhref == page) {
				as[i].style.color = '#6064C8';
				break;
			}
		}
	}
	
	// Main navigation 
}	


function clap() 
{
	if (document.getElementById('subnavigation2').style.display == 'none')
	{
		document.getElementById('subnavigation2').style.display = 'block';
		document.getElementById('clap_arrow').src = '/images/a_opened.gif';
	}
	else {
		document.getElementById('subnavigation2').style.display = 'none';
		document.getElementById('clap_arrow').src = '/images/a_closed.gif';
	}
}
