document.onmousemove = getMouse;

var msX = 0;
var msY = 0;
	
	function getMouse(e)
	{
		msX = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
		msY = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	}
	
	function ShowTip(tipName)
	{
		var tip = document.getElementById(tipName);
		
		var testx = tip.style.width.substr(0,(tip.style.width.length - 2));
		if ((msX + 10) > (document.body.offsetWidth - testx - 50)) 
				msX = (document.body.offsetWidth - testx - 50);
			
			tip.style.left = msX + 10 + "px";
			tip.style.top = msY + "px";
		
		tip.style.visibility = 'visible';
		var fader = new Fadomatic(tip, 10);
		fader.show();
		
	}
	
	function HideTip(tipName)
	{
		var tip = document.getElementById(tipName);
		//tip.style.display = 'none';
		var fader = new Fadomatic(tip, 10);
		fader.fadeOut();
	}
