startList = function() {
	if (document.getElementById) {
		navRoot = document.getElementById("menuUL").getElementsByTagName("LI");
		for (i=0; i<navRoot.length; i++) {
			navRoot[i].onmouseout=function() {
				if (document.all&&document.getElementById) {// ONLY for IE
					this.className=this.className.replace(" over", "");
				}
			}
			navRoot[i].onmouseover=function() {
				var pa='px',sh=0,hh=0,lt=0;
				if (document.all&&document.getElementById) {// ONLY for IE
					this.className+=" over";
				}
				if(document.layers||window.opera){
					pa='';
				}
				if(window.innerWidth){
					sh=window.innerHeight; 
				}else{
					sh=document.body.clientHeight; 
				}
				chULs = this.getElementsByTagName("UL");
				for (j=0;j<chULs.length;j++) {
					coors = findPos(chULs[j]);
					ULtop = coors[1];
					lt = 20 + ULtop;
					if(document.all||document.getElementById){
						hh=parseInt(chULs[j].offsetHeight); 
						if(!hh){
							hh=parseInt(chULs[j].style.pixelHeight);
						}
					}else if(document.layers){ 
						hh=parseInt(chULs[j].clip.height);
					}
					bt=lt+hh;
					if(bt>sh){
						lt=sh-hh;
						diff = bt-sh;
						chULs[j].style.top="-"+diff+pa;
					}
				}
			}
		}
	}
	if(document.getElementById) {
		document.getElementById("leftMenuList").style.display = "block";
	}
}

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
		}
	}
	curtop = curtop - f_scrollTop();
	
	return [curleft,curtop];
}


function f_scrollTop() {
	return f_filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


window.onload=startList;

