var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
var offsetX = 0;
var offsetY = 20;
var toolTipSTYLE="";
var CAPTION='cap';
var FG='fg';
var BG='bg';
var TEXTCOLOR='tc';
var CAPTIONCOLOR='cc';
var WIDTH='tw';
var HEIGHT='th';
var FONT='font';
var POSITIONY='posy';
var cap, fg, bg, tc, cc, tw, th, font, posy = 0;
function initToolTips() {
if(ns4||ns6||ie4) {
if(ns4) toolTipSTYLE = document.toolTipLayer;
else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
if(ns4) document.captureEvents(Event.MOUSEMOVE);
else {
toolTipSTYLE.visibility = "visible";
toolTipSTYLE.display = "none";
}
document.onmousemove = moveToMouseLoc;
}
}
function toolTip() {
if(arguments.length < 1) { // hide
if(ns4) {toolTipSTYLE.visibility = "hidden";
}else {
toolTipSTYLE.display = "none";
var IfrRef = document.getElementById('DivShim');
IfrRef.style.display = "none";
}
} else { // show
var msg = arguments[0];
fg = "#000000";
bg = "#EAEAFF";
    tc = "#000000";
    cc= "#FFFFFF";
    font = "Verdana,Arial,Helvetica";
    tw = '';
    th = '';
    cap = '';
    posy = 0;
for(var i = 1; i < arguments.length; i+=2) {
    switch (arguments[i]) {
    case "cap": cap = arguments[i+1]; break;
        case "font": font = arguments[i+1]; break;
        case "fg": fg = arguments[i+1]; break;
        case "bg": bg = arguments[i+1]; break;
        case "tc": tc = arguments[i+1]; break;
        case "cc": cc = arguments[i+1]; break;
        case "tw": tw = arguments[i+1]; break;
        case "th": th = arguments[i+1]; break;
        case "posy": posy = arguments[i+1]; break;
    }
    }
var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '" width="' + tw + '" height="' + th + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + '" width="' + tw + '" height="' + th + '">';
    if(cap) content += '<tr><td bgcolor=' + fg + '><font face="' + font + '" color="' + cc + '" size="-2"><b>' + cap + '</b></font></td></tr><tr>';
    content += '<td><font face="' + font + '" color="' + tc + '" size="-2">' + msg + '</font></td>';
    if(cap) content += '</tr>';
    content += '</table></td></table>';
if(ns4) {
toolTipSTYLE.document.write(content);
toolTipSTYLE.document.close();
toolTipSTYLE.visibility = "visible";
}
else if(ns6) {
moveToMouseLoc(document);
document.getElementById("toolTipLayer").innerHTML = content;
toolTipSTYLE.display='block';
}
else if(ie4) {
moveToMouseLoc();
document.all("toolTipLayer").innerHTML=content;
toolTipSTYLE.display='block';
var IfrRef = document.getElementById('DivShim');
var DivRef = document.getElementById('toolTipLayer');
IfrRef.style.width = DivRef.offsetWidth;
IfrRef.style.height = DivRef.offsetHeight;
IfrRef.style.top = DivRef.style.top;
IfrRef.style.left = DivRef.style.left;
IfrRef.style.zIndex = DivRef.style.zIndex - 1;
IfrRef.style.display = "block";
}
}
}
function moveToMouseLoc(e) {
if(ns4||ns6) {
x = e.pageX;
y = e.pageY;
    if (tw && (x + offsetX + Number(tw) + 10 > window.innerWidth)) x = window.innerWidth - offsetX - Number(tw) - 10;
} else {
x = event.x + document.body.scrollLeft;
y = event.y + document.body.scrollTop;
    if (tw && (x + offsetX + Number(tw) + 30 > document.body.offsetWidth)) x = document.body.offsetWidth - offsetX - Number(tw) - 30;
}
toolTipSTYLE.left = x + offsetX;
toolTipSTYLE.top = y + offsetY + Number(posy);
return true;
}
initToolTips();