
var oLastMenuBtn, oLastMenuObj, oMenuBtn, oMenuObj, oLastSubMenuBtn, oLastSubMenuObj;

function fMainMenu(oMenuBtn){
	if(oLastSubMenuObj){
//		oLastMenuBtn.style.fontWeight="500";
		oLastSubMenuBtn=null;
		oLastSubMenuObj=null;
	}
	if(oLastMenuBtn || oLastMenuBtn==oMenuBtn){
//		oLastMenuBtn.style.fontWeight="500";
		if(oLastMenuObj) oLastMenuObj.style.display="none";
		if(oLastMenuBtn==oMenuBtn){
			oLastMenuBtn=null;
			oLastMenuObj=null;
			return;
		}
	}
//	oMenuBtn.style.fontWeight="800";

	if(document.all){
		oMenuObj=oMenuBtn.parentElement.children(1);
	}
	else{
		oMenuObj=oMenuBtn.parentNode.childNodes[1];
	}

	if(oMenuObj) oMenuObj.style.display="block";

	oLastMenuBtn=oMenuBtn;
	oLastMenuObj=oMenuObj;
}



function fSubMenu(oSubMenuBtn){
	if(oLastSubMenuBtn || oLastSubMenuBtn==oSubMenuBtn){
		if(oLastSubMenuObj) oLastSubMenuObj.style.display="none";
		if(oLastSubMenuBtn==oSubMenuBtn) {oLastSubMenuBtn=null; oLastSubMenuObj=null; return;}
	}

	if(document.all)
		oSubMenuObj=oSubMenuBtn.parentElement.children(1)
	else
		oSubMenuObj=oSubMenuBtn.parentNode.childNodes[2];

	if(oSubMenuObj) oSubMenuObj.style.display="block";

	oLastSubMenuBtn=oSubMenuBtn;
	oLastSubMenuObj=oSubMenuObj;
}





function fRightMenuFloat(){
	var nFirstMenuPoz=0;
	nFirstMenuPoz=(location.href.indexOf('today')>0 ? 250 : 200);

	var oMenu=document.getElementById("oRightMenuFloat");
	oMenu.sP=function(y){this.style.top=y+'px';}
	oMenu.y=0;

	window.fStickTop=function(){
		var pY=document.all ? document.documentElement.scrollTop : window.pageYOffset;
		oMenu.y+=(pY-oMenu.y)/8;
		if(oMenu.y>=nFirstMenuPoz) oMenu.sP(oMenu.y);
		setTimeout("fStickTop()", 10);
	}

	fStickTop();
}
