var initialisation = 0;
var Ex, Ey, TitelFarbe, TextFarbe, ContentInfo;

function moveToolTip(layerName, FromTop, FromLeft, e)
{
    document.getElementById(layerName).style.top = FromTop + 10;
    document.getElementById(layerName).style.left = FromLeft + 12;
}


function activate()
{
    initialisation = 1;
}


function deactivate()
{
    initialisation = 0;
}


function start(e)
{
    if(initialisation)
    {
        //Ex = document.all ? window.event.x : e.pageX;
        //Ey = document.all ? window.event.y : e.pageY;
        Ex = document.all ? window.event.x + document.body.scrollLeft : e.pageX;
        Ey = document.all ? window.event.y + document.body.scrollTop : e.pageY;
        moveToolTip("ToolTip", Ey, Ex, e);
        document.getElementById('ToolTip').style.visibility = "visible";
    }
    else
    {
        moveToolTip("ToolTip", 0, 0);
        document.getElementById('ToolTip').style.visibility = "hidden";
    }
}


function ToolTip(layerName, tipContent)
{
    ContentInfo = '<table border="0" cellspacing="0" cellpadding="0" width="210"><tr><td class="ttBorder"><table border="0" cellspacing="1" cellpadding="3" width="100%"><tr><td class="ttBackground">'+tipContent+'</td></tr></table></td></tr></table>';
    document.getElementById(layerName).innerHTML = ContentInfo;
}
