
/*
startList = function(){
	if (document.all&&document.getElementById){
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++){
			node = navRoot.childNodes[i];
			if (node.nodeName=="UL" || node.nodeName=="LI"){
				node.onmouseover=function(){
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;
*/




function Over(nappi, Id, Y, nappi2, Id2){
	
	Id2=Id+"_"+Id2;
	
	if(window.innerHeight){
		var ikkuna = window.innerHeight;
	} else if(document.body.offsetHeight){
		var ikkuna = document.getElementById('ie_nav_fix').value;
	}
	

	nappi.className = "over";

//nappi.className = "over2";
	
	
	//document.getElementById('ie').innerHTML=Y+" "+nappi.id+" "+nappi2.id+" "+Id+" "+Id2+" "+nappi.className;
			/*
			if(nappi.id=="eka"){
			
			} else {
				nappi.className = "over2";
			}
		*/
	var nappiY = Y;
	var tilaa = ikkuna-nappiY;
	var lohkon_korkeus = document.getElementById("lohko_"+Id).clientHeight;
	var nosto = tilaa-lohkon_korkeus;


//nosto2 = lohkon_korkeus2-nappiY+nosto2;



if(nappi2){	
	
	var lohkon_korkeus2 = document.getElementById("lohko_"+Id2).clientHeight;
	var nosto2 = tilaa-lohkon_korkeus2;


	if(lohkon_korkeus2>tilaa){
		document.getElementById("lohko_"+Id2).style.marginTop=nosto2+"px";
		var toka = true;
	}
}
//if(!){	
	if((ikkuna-148)<lohkon_korkeus){	
		if(Y>(ikkuna/2)){
		

			nosto = lohkon_korkeus-nappiY+nosto;

			if(lohkon_korkeus>tilaa){
				document.getElementById("lohko_"+Id).style.marginTop=nosto+"px";
			}
			

		} else {
			document.getElementById("lohko_"+Id).style.marginTop=0;
		}
	}
//}
}



function Out(nappi, Id){	
	nappi.className = "";
}

