wmtt=null; document.onmousemove=updateWMTT; wmtt_width=0; wmtt_height=0; wmtt_left=0; wmtt_top=0; function updateWMTT(e) { x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX; y = (document.all) ? window.event.y + document.body.scrollTop : e.pageY; x_cursor= (document.all) ? window.event.x : e.pageX; y_cursor= (document.all) ? window.event.y : e.pageY; x_win = (document.all) ? document.body.offsetWidth : window.outerWidth; y_win = (document.all) ? document.body.offsetHeight : window.outerHeight; if((x_cursor + 7 + 25 + wmtt_width) < x_win){ x_div = x + 7; }else { x_div = x_win - wmtt_width - 25; } if((y_cursor + 18 + wmtt_height) < y_win){ y_div = y + 18; }else{ y_div = y - wmtt_height - 5; } wmtt_left = x_div + "px"; wmtt_top = y_div + "px"; if (wmtt != null){ wmtt.style.left = wmtt_left; wmtt.style.top = wmtt_top; wmtt.style.display = "block"; } } function showWMTT(id){ wmtt = document.getElementById(id); wmtt.style.display = "block"; wmtt_width=wmtt.offsetWidth; wmtt_height=wmtt.offsetHeight; wmtt.style.left = wmtt_left; wmtt.style.top = wmtt_top; } function hideWMTT(){ wmtt.style.display = "none"; wmtt = null; }