if (window.event)
{
    if (document.captureEvents)
    {
        document.captureEvents(Event.MOUSEMOVE);
    } else
    {
        window.captureEvents(Event.MOUSEMOVE);
    };
};
document.onmousemove = actionOnMouseMove;

function actionOnMouseMove(event)
{
    if (!event) event = window.event;
    var body = null;
    if ( window.document.compatMode && window.document.compatMode == "CSS1Compat" )
    {
        body = window.document.documentElement;
    } else if (window.document.body)
    {
        body = window.document.body;
    };
    x = event.pageX ? event.pageX : event.clientX + body.scrollLeft;
    y = event.pageY ? event.pageY : event.clientY + body.scrollTop;
}

function hide(who) {
who = document.getElementById(who);
who.style.visibility = "hidden";
document.getElementById("popup_bg").style.visibility = "hidden";
}

function show(who) {
who = document.getElementById(who);
who.style.visibility = "visible";
document.getElementById("popup_bg").style.visibility = "visible";
document.getElementById("popup_bg").style.left = (x-10)+"px";
document.getElementById("popup_bg").style.top = (y-170)+"px";
who.style.left = x+"px";
var yPos = y-160;
who.style.top = yPos+"px";
}
