function _e4ie(first)
{
	if(navigator.appName.indexOf('Microsoft') > -1)
	{  
    var li  = new Array();
		var b   = document.getElementById(first).firstChild;
		var c   = 0;
		
		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].onmouseover = function() { 
        				this.lastChild.style.display = 'block';
        				this.firstChild.style.color  = '#F77400';
        			}
        lis[j].onmouseout  = function() { 
        				this.lastChild.style.display = 'none'; 
        				this.firstChild.style.color  = '#FFFFFF';
        			}
      }
      /* solving IE z-index problem by turning the order */
      lis[j].style.zIndex = lis.length + 100 - j;
    }
	}
}	

function e4ie(first)
{
	if(navigator.appName.indexOf('Microsoft') > -1)
	{  
    var li  = new Array();
		var b   = document.getElementById(first).firstChild;
		var c   = 0;
		
		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');
    var k=-1;
    for (j = 0; j < lis.length; j++)
    {       
      if(lis[j].lastChild.tagName == 'UL')
      {
        lis[j].onmouseover = function() { 
        				this.lastChild.style.display = 'block';
        				this.firstChild.style.textDecoration  = 'underline';
        				//document.getElementById('info').innerHTML = this.lastChild.className;
        				chkpos_ie(this);
        			}
        lis[j].onmouseout  = function() { 
        				this.lastChild.style.display = 'none'; 
        				this.firstChild.style.textDecoration  = 'none';
        				//document.getElementById('info').innerHTML = '';
        			}
      }      
      
      /* solving IE z-index problem by turning the order */
      lis[j].style.zIndex = lis.length + 100 - j;
    }
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop  = obj.offsetTop
		while (obj = obj.offsetParent) 
		{
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}


function chkpos(obj) {
	// pos of main_container
	var mcpos = findPos(document.getElementById('main_container'));
	
	var myas = obj.getElementsByTagName('A');
	for (var i=0; i<myas.length; i++)
	{
		var test1  = findPos(myas[i]);
		var bgxpos = -test1[0] + mcpos[0];
		var bgypos = -test1[1] + mcpos[1];
		var bgpos  = bgxpos + 'px ' + bgypos + 'px';
		//alert (bgpos);
		myas[i].style.backgroundPosition = bgpos;

	}
}

function chkpos_ie(obj) {
	// pos of main_container
	var mcpos = findPos(document.getElementById('main_container'));
	
	var myas = obj.getElementsByTagName('A');
	for (var i=0; i<myas.length; i++)
	{
		var test1  = findPos(myas[i]);
		var bgxpos = -test1[0] + mcpos[0] + 60;
		var bgypos = -test1[1] + mcpos[1];
		var bgpos  = bgxpos + 'px ' + bgypos + 'px';
		//alert (bgpos);
		myas[i].style.backgroundPosition = bgpos;

	}
}