function showEstimatesSumary(obj,x)
{
	
	var pos=getPosition(obj);
	
	var s=document.all(x).innerHTML;

 	showHint(pos.x,pos.y+20,s);
}
function hideEstimatesSumary(obj)
{
	hideHint();
}

function hideHint()
{
	var hint=document.all.hint;
	if(hint.filters[0]){hint.filters[0].apply()}
	
	document.all.hint.style.visibility='hidden';
	if(hint.filters[0]){hint.filters[0].play()}
}

function showHint(x,y,s)
{
	var hint=document.all.hint;
	var xBody=document.body.clientWidth+document.body.scrollLeft-hint.offsetWidth-30;
	x=(x>xBody)?xBody:x;
	
	var yBody=document.body.clientHeight+document.body.scrollTop-hint.offsetHeight;
	y=(y>yBody)?yBody:y;
	
	hint.style.left=x;
	hint.style.top=y;
	if(hint.filters[0]){hint.filters[0].apply()}
	hint.innerHTML=s;
	hint.style.visibility='visible';
	if(hint.filters[0]){hint.filters[0].play()}
}


function getPosition(obj)
{
	var x,y;
	var coordinates=new Object();
	var tmp_obj=obj;
	x=0;
	y=0;
	while(tmp_obj.nodeName!="BODY")
	{
	  x+=tmp_obj.offsetLeft;
	  y+=tmp_obj.offsetTop;
	  if (tmp_obj.nodeName=="DIV")
	  {
		x-=tmp_obj.scrollLeft;
		y-=tmp_obj.scrollTop;
	  }
	  tmp_obj=tmp_obj.offsetParent;
	}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
}

function hintFollowMouse()
{
	var hint=document.all.hint;
	var x=event.x
	var xBody=document.body.clientWidth+document.body.scrollLeft-hint.offsetWidth
	x=(x>xBody)?xBody:x
	
	var y=event.y+document.body.scrollTop
	var yBody=document.body.clientHeight+document.body.scrollTop-hint.offsetHeight
	y=(y>yBody)?yBody:y
	
	hint.style.left=x;
	hint.style.top=y+20;
}









