qfMouseOver = function( el ) {
	if ( el && "qfactivetab" != el.parentNode.firstChild.getAttribute("id") ) {
		el.parentNode.firstChild.setAttribute("id", "qfactivetab");
	}
}

qfMouseOut = function( el ) {
	if ( el && "qfactivetab" == el.parentNode.firstChild.getAttribute("id") ) {
		el.parentNode.firstChild.removeAttribute("id");
	}
}

activateMenu = function( nav )
{
    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) 
	{  
        var navroot = document.getElementById(nav);
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) 
        {
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL")
            {
                /* assign the function to the LI */
             	lis[i].onmouseover=function() 
             	{	
                   /* display the inner menu */
                   this.lastChild.style.display="block";
                }
                lis[i].onmouseout=function() 
                {                       
                   this.lastChild.style.display="none";
                }
            }
        }
    }
}

function showItem(element){
	$(element).addClassName("hover");

	var mouse_out_event_name = Prototype.Browser.IE?'mouseleave':'mouseout';

	$(element).observe(mouse_out_event_name, function() {
		$(element).removeClassName("hover");
	});
}		


window.onload = function()
{
	activateMenu('qf'); 
}


/* Funktionen um den Footer immer am Browser Ende auszurichten. fix= footerhöhe(165px)+headerhöhe(96px)+content_bootomhöhe(170px) */

function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}

			return windowHeight;
			
			
		}
		function setFooter(node, fix) {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentElem = document.getElementById(node);
					var contentHeight = contentElem.offsetHeight;
					var heightDiff = windowHeight - (contentHeight + fix);
					var newHeight = heightDiff + contentHeight;
					if (heightDiff > 0) {
						contentElem.style.height = newHeight+'px';
						/*footerElement.style.position = 'relative';
						footerElement.style.top = ((windowHeight - (contentHeight + 165 + 96))) + 'px';*/
						
						//alert(footerElement.style.top);
					}
/*					else {
						/*footerElement.style.position = 'static';*/
/*						footerElement.style.position = 'relative';
						footerElement.style.top = 0;
						alert(footerElement.style.top);
					}*/
				}
			}
		}

