function setMenu(){
	if(document.all){
		sy = document.body.scrollTop;
	}else{
		sy = self.pageYOffset;
	}
	sx = positionX;
	positionX = YAHOO.util.Dom.getX("LEFT-MENU");
	if ( sy <= positionY ) sy = positionY;
	if ( sy >= bottomOffset ) sy = bottomOffset;
	//moveLayer("LEFT-MENU",sx,sy);
	moveLayer("LEFT-MENU",sx,sy);
}



function moveLayer(objId,x,y){
	if(document.getElementById){
			myAnim = new YAHOO.util.Motion(
				objId,{points : {to:[x,y]}},0.5,YAHOO.util.Easing.easeOutStrong
			);
			myAnim.animate();
		//document.getElementById(objId).style.marginTop=y+"px";
	}else if(document.all){
		document.all(objId).style.pixelLeft=x;
		document.all(objId).style.pixelTop=y;
	}else if(document.layers){
		document.layers[objId].moveTo(x,y);
	}
}


window.onscroll = function() {
	setMenu();
};

window.onload = function() {
	positionX = YAHOO.util.Dom.getX("LEFT-MENU");
	positionY = YAHOO.util.Dom.getY("LEFT-MENU");
	positionLIMITY = YAHOO.util.Dom.getY("FOOT");
	footObj = document.getElementById("FOOT");
	stageObj = document.getElementById("BOX760");
	leftObj = document.getElementById("LEFT-MENU");
	footHeight=footObj.clientHeight;
	stageHeight=stageObj.clientHeight;
	leftHeight=leftObj.clientHeight;
	bottomOffset=stageHeight-leftHeight-footHeight-15;
};
var fixHeight = function() {
	var leftObj = document.getElementById("LMAIN");
	var rightObj = document.getElementById("RMAIN");
	if(leftObj.clientHeight<rightObj.clientHeight){
		leftObj.style.height = rightObj.clientHeight + "px";
	}
};

