/**
 * @author Ralf Schreijer
 */

var timer;
var delay = 150;
var ie50 = false;

function delayAndHide(){
	if(ie50) return;
    timer = window.setTimeout("slideOut()",delay);
}

function slideOut(){
   if(ie50) return;
   for (var i = 0; i < document.getElementsByTagName("div").length; i++){
        if (document.getElementsByTagName("div")[i].id.substring(0,7) == "submenu") {
        	document.getElementsByTagName("div")[i].className = "submenu-off";
        }
    }
    window.clearTimeout(timer);
}

function slideIn(subMenuID){
	if(ie50) return;
    slideOut();
    var item = document.getElementById(subMenuID);
	item.className = "submenu";
}

function hideAlternativeMenu(){
	if(ie50) return;
	var item = document.getElementById('altsubmenu');
	item.className = "altsubmenu-off";
}

function getStyle(el, styleProp){
	var x = document.getElementById(el);
	if (x.currentStyle){
		var y = x.currentStyle[styleProp];
	}else if (window.getComputedStyle){
		var y = document.defaultView.getComputedStyle(x, null).getPropertyValue(styleProp);
	}
	return y;
}

if(navigator.appName.indexOf("Explorer") != -1){
	if(navigator.appVersion.indexOf("MSIE 5.0") != -1){
		ie50 = true;
	}
}

