var posX = 0, posY = 0;

if (document.captureEvents && Event.MOUSEMOVE) {
    document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = captureCoordinates;

function captureCoordinates(e)
{
    if (!e) var e = window.event;
    
    var x = 0, y =0;
    
    if (e.pageX || e.pageY)
    {
        x = e.pageX;
        y = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
        x = e.clientX + document.body.scrollLeft;
        y = e.clientY + document.body.scrollTop;
    }
    
    if (x < 0) x = 0;
    if (y < 0) y = 0;
    
    posX = x;
    posY = y;
}


function show(md5hash)
{
    var obj = document.getElementById('additional-info');
    
    if (!obj) return false;
    
    move_to(obj, posX, posY);

    obj.style.display = 'block';
    obj.style.visibility = 'visible';
    
    return true;
}

function move_to(obj, x, y)
{
    obj.style.position = 'absolute';
    obj.style.left = x + 10 + 'px';
    obj.style.top = y + 10 + 'px';
    
    return;
}

function close_popup(id)
{
    var obj = document.getElementById(id);
    
    if (!obj) return false;
    
    obj.style.display = 'none';
    obj.style.visibility = 'hidden';
    
    return true;
}