var xFromMouse = 0;
var yFromMouse = 0;

tip = null;
document.onmousemove = moveTip;

function moveTip(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft: e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop: e.pageY;
	if (tip != null) {
		if (x<500)
		    {
			   var verschiebx = - 100;
			}
		else
			{
			 var verschiebx =- 600;	
			}
		tip.style.left = (x + xFromMouse + verschiebx) + "px";
		//document.write(tip.style.left);
		
		tip.style.top  = (y + yFromMouse - 300) + "px";
	}
}

function showTip(id) {
	tip = document.getElementById(id);
	tip.style.display = "block";
}

function hideTip() {
	tip.style.display = "none";
}