function gOfs(obj){
	var x=0,y=0;
	if(window.opera)
	{
		if(obj.style.position=='absolute')
		{
			x=obj.style.posLeft;
			y=obj.style.posTop;
		}else{
			while (obj.offsetParent)
			{
				x+=obj.offsetLeft;
				y+=obj.offsetTop;
				obj=obj.offsetParent;
			}
		}
	}else if(obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			x+=obj.offsetLeft;
			y+=obj.offsetTop;
			obj=obj.offsetParent;
		}
	}else if (obj.x)
	{
		x += obj.x;
		y += obj.y;
	}
	//alert(x+' '+y);
	return {x: x, y: y}
}

var t=null;
var em=null;
function hide()
{
	em.style.display='none';
}
function move(id,a)
{
	if(em==null)
	{
		em=document.getElementById('m'+id);
	}else{
		hide();
		em=document.getElementById('m'+id);
	}
	ofs = gOfs(document.getElementById('mm'+id));
	em.style.display='inline';
	em.style.left=ofs.x;
	em.style.top=ofs.y-10;
}
function out()
{
	t=setTimeout("hide()",100);
}
function clrT()
{
	clearTimeout(t);
}
function move_up_m(id)
{
	document.getElementById('up_ma'+id).className='menu_sel';
	document.getElementById('up_m'+id).style.backgroundColor='#FF9801';
}
function out_up_m(id)
{
	document.getElementById('up_ma'+id).className='menu';
	document.getElementById('up_m'+id).style.backgroundColor='#000000';
}
