document.onmousemove = mouse_pos;

function mouse_pos(evt)
{
    if(!evt) evt = window.event;
    x = evt.clientX
	y = evt.clientY

   if (window.document.compatMode && window.document.compatMode == "CSS1Compat")
    {
		y1 = window.document.documentElement.scrollTop;
		y2 = window.document.body.scrollTop;
		x1 = window.document.documentElement.scrollLeft;
		x2 = window.document.body.scrollLeft;
		
		y += (y1 > y2) ? y1 : y2;
        x += (x1 > x2) ? x1 : x2;
    }
}   

function hovBox(text) {
	var box = $('hovBox');
	box.innerHTML = text;
	box.style.top = y - 20 + 'px';
	box.style.left = x + 10 + 'px';
	box.show();
}

function hovBoxOff() {
	$('hovBox').hide();
}