tooltipp = null;
var marginX = 90;
var marginY = 10;

function updateToolTipp(e) {
    //x = (document.all || e==null) ? window.event.x + document.body.scrollLeft : e.pageX;
    //y = (document.all || e==null) ? window.event.y + document.body.scrollTop  : e.pageY;
    if (window != null && window.event != null)
    {
        // IE
        if (document != null && document.body != null)
        {
            var scrollY;
            var scrollX;
            
            if (typeof window.pageYOffset != 'undefined') 
            {
               scrollY = window.pageYOffset;
               scrollX = window.pageXOffset;
            }
            else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') 
            {
               scrollY = document.documentElement.scrollTop;
               scrollX = document.documentElement.scrollLeft;
            }
            else if (typeof document.body != 'undefined') 
            {
               scrollY = document.body.scrollTop;
               scrollX = document.body.scrollLeft;
            }
        
            x = window.event.x + scrollX;
            y = window.event.y + scrollY;
        }
        else
        {
            x = 0;
            y = 0;
        }
    }
    else
    {
        // FF
        if (e != null)
        {
            x = e.pageX;
            y = e.pageY;
        }
        else
        {
            x = 0;
            y = 0;
        }
    }
    if (tooltipp != null) 
    {
        tooltipp.style.left = (x + marginX) + "px";
        tooltipp.style.top = (y + marginY) + "px";
    }
}

function showToolTipp(id) 
{
	tooltipp = document.getElementById(id);
	tooltipp.style.display = "block";
}

function showToolTipp(id, MarginX, MarginY) 
{
    marginX = MarginX;
    marginY = MarginY;

    tooltipp = document.getElementById(id);
    tooltipp.style.display = "block";
 }

function hideToolTipp() 
{
    if (tooltipp != null) 
	    tooltipp.style.display = "none";
}

document.onmousemove = updateToolTipp;