/* ==================================================================== */
/*  MapTipOut(e, contents, values)                                      */
/*  hides the maptips div                                               */
/* ==================================================================== */
function MapTipsOut(e, contents, values)
{
    e = (e)?e:((event)?event:null);
    e = (e)?window.event:e;
    var d = document.getElementById('TheMaptipsLayer');
    if (d)
    {
        d.style.visibility = "hidden";
    }    
}

/* ==================================================================== */
/*  MapTipsContent( event, contents, values )                            */
/*  Writes the content to the MapTip DIV                                */
/* ==================================================================== */
function MapTipsOver( e, contents, values )
{
    e = (e)?e:((event)?event:null);
    var d = document.getElementById('TheMaptipsLayer');
    if (d == null)
    {
        d = document.createElement( 'div' );
        d.id = 'TheMaptipsLayer';
        d.setAttribute( 'style', 'position:absolute; top:-1000px; left:-1000px; width:150px; height: 14px; background-color:#ffffcf; font-family:arial; font-size:11px; z-index:100; border: 1px solid #000000;' );
        d.style.position = 'absolute';
        d.style.top = "-1000px";
        d.style.left = "-1000px";
        d.style.width = "";
        d.style.height = "14px";
        d.style.backgroundColor = "#ffffcf";
        d.style.border = "1px solid #000000";
        d.style.fontFamily = "arial";
        d.style.fontSize = "11px";
        d.style.zIndex = 100;
        document.body.appendChild(d);
    }
    d.style.top = (e.clientY + 20) + "px";
    d.style.left = (e.clientX - 80) + "px";
    d.style.height = (14 * contents.length)+"px";
    d.style.width = "";
    d.style.visibility = "visible";
    var sep = "";
    var result = "";
    for (var i=0;i<contents.length; i++)
    {
        result = result + sep + "&nbsp;<b>"+values[i]+":</b> " + contents[i] + "&nbsp;";
        sep = "<br>";
    }
    d.innerHTML = result;

    return true;

}
