var IS_IE = (document.all) ? 1:0
var IS_W3C = (document.getElementById) ? 1:0

var iconxoffset = -10;
var iconyoffset = 25;
	
function shiftTo(obj, x, y) {
	theObj = eval("document.getElementById('"+obj+"').style");
	theObj.left = x+"px";
	theObj.top = y+"px";			
}

var mx, my;
		
function mousemoved(evt) {
	if (IS_IE) {
		mousex = window.event.clientX+document.body.scrollLeft;
		mousey = window.event.clientY+document.body.scrollTop;
	}
	else {
		mousex = evt.pageX;
		mousey = evt.pageY;
	}
	wx = mousex + iconxoffset;
	wy = mousey + iconyoffset;
	shiftTo('tooltip',wx,wy);
	return true;
}	
			
document.onmousemove = mousemoved;

function tooltip (text, show) {
	if (show == 1) {
		document.getElementById("tooltip-front").innerHTML = "<p>"+text+"</p>";
		document.getElementById("tooltip-back").innerHTML = "<p>"+text+"</p>";
		document.getElementById("tooltip").style.display = "block";
	}
	else if (show == 0) document.getElementById("tooltip").style.display = "none";
}

