// JavaScript Document

/* Function show_hint
exemplo de aplicação:
<div onmouseover="show_hint(event, 'mensagem de texto', 'divHint', -480);"
		 onmouseout="hide_hint('divHint');"></div>
*/
function show_hint(e, msg, div, pos) {
	var hint   = document.getElementById(div);
	var posx = 0;
	var posy = 0;
	if (!e) 
		var e = window.event;
	if (e.pageX || e.pageY) {
		posx = e.pageX;
		posy = e.pageY;
	}	else if (e.clientX || e.clientY) {
		posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
	}
	if (msg){
	  hint.innerHTML = msg;
	}
	hint.style.top = posy + "px";
	hint.style.left = posx + pos + "px";
	hint.style.display = 'block';						
}
function hide_hint(div) {
	var hint = document.getElementById(div);
	hint.style.top = 0 + "px";
	hint.style.left = 0 + "px";
	hint.style.display = 'none';
}	

