
document.onmouseover=makeCool;
document.onmouseout=makeNormal;

function makeCool(event) 
{
    if (!event) var event = window.event;
    var src = event.srcElement;
    if (src.tip != null) {
        tttext = src.tip
        theY = src.offsetTop + src.offsetHeight;
        nextSrc = src.offsetParent;
        for (i=0; nextSrc.tagName!="BODY" && nextSrc.tagName!="HTML"; i++) {                               
                theY = theY + nextSrc.offsetTop;
                nextSrc = nextSrc.offsetParent;
        }
        document.ttip = window.setTimeout("Tool(" + window.event.x + "," + theY + ",'" + tttext + "');", 750);
    }
    if (src.tagName == "A") {
        if (src.mousetext != null) {
            intext = src.mousetext;
        } else {
            intext = src.innerText;
        }
        window.status = intext;
        document.scrollOld = document.scrollGo;
        document.scrollGo = 0;
    } else if (src.tagName == "IMG") {
        onImg = src;
        if (onImg.newimg != null) {
            onImg.oldSrc = onImg.src;
            onImg.src = onImg.newimg;
        }
    }

	return true;
}
function makeNormal(event) {
    if (!event) var event = window.event;
    var src = event.srcElement;
    if (src.tip != null) {
        window.clearTimeout(document.ttip);
		if (document.all.ToolTip == null) {
            document.body.insertAdjacentHTML('beforeEnd', '<span id=ToolTip style="visibility: hidden; z-index: 300; background-color: white; position: absolute; font-size: 8pt; width: 0; height: 15; border: 1 solid black"></span>');
        }
        ToolTip.style.visibility = "hidden";
    }
    if (src.tagName == "A") {
        window.status = "";
        document.scrollGo = document.scrollOld;
    } else if (src.tagName == "IMG") {
        onImg = src;
        if (onImg.newimg != null) {
                onImg.src = onImg.oldSrc;
        }
    }
}

function Tool(x, y, t) {
    if (document.all.ToolTip == null) {
        document.body.insertAdjacentHTML('beforeEnd', '<span id=ToolTip style="visibility: hidden; z-index: 300; background-color: white; position: absolute; font-size: 8pt; width: 100; height: 15; border: 1 solid black"></span>');
    }
    ToolTip.style.width = 50;
    ToolTip.style.posTop = y;
    ToolTip.style.posLeft = x + 10;
    ToolTip.innerHTML = "<nobr>" + t + "<nobr>";
    if (ToolTip.scrollWidth < 40) {
        ToolTip.innerHTML = t;
        ToolTip.style.width = 100;                  
    } else {
        ToolTip.style.width = ToolTip.scrollWidth+10;
    }           
    ToolTip.style.visibility = "visible";
}

