function absPosition(obj) {
      var x = y = 0;
      while(obj) {
            x += obj.offsetLeft;
            y += obj.offsetTop;
            obj = obj.offsetParent;
      }
      return {x:x, y:y};
}

function showmenu() {
	cancelhide();
	var m = document.getElementById("rmenu");
	if(m)
	{
		var d = document.getElementById("flymenu");
		d.style.left=(absPosition(m).x-50)+"px";
		d.style.top=(absPosition(m).y+25)+"px";
		d.style.display="block";
		d.style.width="150px";
		//alert(absPosition(m).x);
	}
}

var mark=0;
var timerl;

function cancelhide() {
	if(mark==1)
	{	clearTimeout(timer1);
		mark=0;
	}
}

function hide()
{	
	var d = document.getElementById("flymenu");
	d.style.display="none";
	d.style.left="0px";
		d.style.top="0px";
}

function hidemenu() {
	timer1=setTimeout("hide()",250);
	mark=1;
}