var instatus = false; //determines if tooltip will also be displayed in the status bar
var ttname = "tooltip"; //name of the tooltip div tag (used on next line)
var ttnameTD = "tooltipTD"
var ttnameTITLE = "tooltipTITLE"
var bcolor = "#e5e5ff"; //background color of tooltip
var fcolor = "#000000"; 	//color of tooltip text
var opacity = 95; 	//translucency of tooltip
var borderstyle = "outset"; //tooltip border style
var borderwidth = "1px"; 	//tooltip border width
var bordercolor = "#333333"; //tooltip border color
var font = "Verdana"; //font family
var fontsize = 11; 	//font size this is the div tag that holds the tooltip

document.write('<div style="z-index: 2000; position: absolute; filter: alpha(opacity=85); visibility: hidden;" id="' + ttname + '">');
document.write('<table style="width:246px" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td style="width:12px; height:23px;"><img src="/images/modal/topleft.jpg" alt="*" style="width:12px; height:23px;"></td>');
document.write('<td style="width:222px; height:23px;" class="modalheader" id="' + ttnameTITLE + '"></td>');
document.write('<td style="width:12px; height:23px;"><img src="/images/modal/topright.jpg" alt="*" style="width:12px; height:23px;"></td>');
document.write('</tr>');
document.write('</table>');
document.write('<table style="width:246px" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td style="width:1px; background-color:#617689;"><img src="/images/spacer.gif" alt="*" style="height:10px; width:1px;" /></td>');
document.write('<td class="modalcontent" id="' + ttnameTD + '"></td>');
document.write('<td style="width:1px; background-color:#617689;"><img src="/images/spacer.gif" alt="*" style="height:10px; width:1px;" /></td>');
document.write('</tr>');
document.write('</table>');
document.write('<table style="width:246px" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td style="width:246px; height:11px;"><img src="/images/modal/bottom.gif" alt="*" style="width:246px; height:11px;"></td>');
document.write('</tr>');
document.write('</table>');
document.write('</div>');

function funToolTip() {

    e = event;
    es = event.srcElement;
    if (es.tooltip != "" && es.tooltip != undefined) {

        var posx = 0;
        var posy = 0;
        if (!e) var e = window.event;
        if (e.pageX || e.pageY) {
            posx = e.pageX;
            posy = e.pageY;
        }
        else if (e.clientX || e.clientY) {
            posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
            posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
        }


        document.getElementById(ttname).style.visibility = "visible";
        document.getElementById(ttname).style.left = posx - 242;
        document.getElementById(ttname).style.top = posy + 1.5;
        document.getElementById(ttname).style.position = "absolute";
        document.getElementById(ttnameTD).innerHTML = es.tooltip;
        document.getElementById(ttnameTITLE).innerHTML = es.tooltip2;
        if (instatus) {
            window.status = es.tooltip;
        }
    }
}

function funHideToolTip() {

    var c = setTimeout("document.getElementById(ttname).style.visibility ='hidden'", 1000);
    //if (instatus) {
    //    window.status = "";
    //}
}

document.onmousemove = funToolTip;

    
    
