
function addLoadEvent(func)
{ var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } }
addLoadEvent(ApplyTip); 
function NiftyCheck2() {
    if (!document.getElementById || !document.createElement) { return false; }
    var b = navigator.userAgent.toLowerCase(); if (b.indexOf("msie 5") > 0 && b.indexOf("opera") == -1) { return false; }
    return true;
}
function NiftyCheck3() {
    if (!document.getElementById || !document.createElement)
        return (false); isXHTML = /html\:/.test(document.getElementsByTagName('body')[0].nodeName); if (Array.prototype.push == null) { Array.prototype.push = function() { this[this.length] = arguments[0]; return (this.length); } }
    return (true);
}
function ApplyTip() {
    var relParameter; var tipdivIDs; var tipdivID; var ParentEle1;
    if (!NiftyCheck2()) return; var v = getElements("Tipme"); var l = v.length;
    for (var i = 0; i < l; i++) {
        relParameter = v[i].getAttribute("rel"); tipdivIDs = relParameter.substr(0, relParameter.indexOf("|"));
        v[i].onmouseover = function() {
            relParameters = this.getAttribute("rel"); tipdivID = relParameters.substr(0, relParameters.indexOf("|"));
            if (tipdivID == "MashupDeedaTip") {
                if (this.nodeName == "DIV") { ParentEle1 = getNextSibling(this); }
                tipdivID = ParentEle1.id;
            }
            tipDivWidth_Param = relParameters.substr(relParameters.indexOf("|") + 1, relParameters.length); tipDivWidth = tipDivWidth_Param.substr(0, tipDivWidth_Param.indexOf("|")); tipDivStckness = tipDivWidth_Param.substr(tipDivWidth_Param.indexOf("|") + 1, tipDivWidth_Param.length); 
            tt_DivToTip(tipdivID, tipDivWidth, tipDivStckness);
        }
        v[i].onmouseout = function()
        { UnTip(); } 
    } 
}
function InActiveToolTip() {
    if (!NiftyCheck2()) return; var v = getElements("Tipme"); var l = v.length; for (var i = 0; i < l; i++) { v[i].onmouseout = ""; v[i].onmouseover = ""; v[i].onclick = ""; }
    //document.body.onmousemove = UnTip();
    //document.body.onmouseover = Untip();
}
function InActiveTopMenu() { if (!NiftyCheck2()) return; var z = document.getElementsByTagName('TD'); var l = z.length; for (var i = 0; i < l; i++) { z[i].onmouseover = ""; z[i].onmouseout = ""; } }
function getNextSibling(startBrother) {
    endBrother = startBrother.nextSibling; while (endBrother.nodeType != 1) { endBrother = endBrother.nextSibling; }
    return endBrother;
}
function tt_DivToTip(divToTip, widthOfDiv, stickness) {
    var WidthAttribute; var SticknessAttribute; if (widthOfDiv == 'auto' || widthOfDiv == "")
        WidthAttribute = ""; else
        WidthAttribute = "WIDTH, " + widthOfDiv; if (stickness == 'true')
        SticknessAttribute = "STICKY, true, DURATION, 2500"; else
        SticknessAttribute = ""; if (WidthAttribute == '' && SticknessAttribute == '') { TagToTip(divToTip, BALLOON, true, JUMPHORZ, true, OFFSETX, -17, TEXTALIGN, 'justify'); }
    else if (WidthAttribute != '' && SticknessAttribute == '') { TagToTip(divToTip, BALLOON, true, JUMPHORZ, true, OFFSETX, -17, WIDTH, widthOfDiv, TEXTALIGN, 'justify'); }
    else if (WidthAttribute != '' && SticknessAttribute != '') { TagToTip(divToTip, BALLOON, true, JUMPHORZ, true, OFFSETX, -17, WIDTH, widthOfDiv, STICKY, true, DURATION, 3500); }
    else if (WidthAttribute == '' && SticknessAttribute != '') { TagToTip(divToTip, BALLOON, true, JUMPHORZ, true, OFFSETX, -17, STICKY, true, DURATION, 3500); }
    else { TagToTip(divToTip, BALLOON, true, JUMPHORZ, true, OFFSETX, -17, TEXTALIGN, 'justify'); } 
}
function getElements(className) {
    var elements = []; var el = document.getElementsByTagName('DIV'); var regexp = new RegExp("\\b" + className + "\\b"); for (var i = 0; i < el.length; i++) { if (regexp.test(el[i].className)) { elements.push(el[i]); } }
    return elements;
}
function getHTMLElements(className) {
    var elements = []; var el = document.getElementsByTagName('DIV'); var regexp = new RegExp("\\b" + className + "\\b"); for (var i = 0; i < el.length; i++) {
        if (regexp.test(el[i].className))
            elements.push(el[i]);
    }
    return elements;
}
if (typeof config == "undefined")
    alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!"); config.Balloon = false
config.BalloonImgPath = "Images/etls/tip_balloon/"
config.BalloonEdgeSize = 6
config.BalloonStemWidth = 15
config.BalloonStemHeight = 19
config.BalloonStemOffset = -7
var balloon = new tt_Extension(); balloon.OnLoadConfig = function() {
    if (tt_aV[BALLOON]) {
        balloon.padding = Math.max(tt_aV[PADDING] - tt_aV[BALLOONEDGESIZE], 0); balloon.width = tt_aV[WIDTH]; tt_aV[BORDERWIDTH] = 0; tt_aV[WIDTH] = 0; tt_aV[PADDING] = 0; tt_aV[BGCOLOR] = ""; tt_aV[BGIMG] = ""; tt_aV[SHADOW] = false; if (tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length - 1) != '/')
            tt_aV[BALLOONIMGPATH] += "/"; return true;
    }
    return false;
}; balloon.OnCreateContentString = function() {
    if (!tt_aV[BALLOON])
        return false; var aImg, sImgZ, sCssCrn, sVaT, sVaB, sCssImg, sCssStem; if (tt_aV[BALLOONIMGPATH] == config.BalloonImgPath)
        aImg = balloon.aDefImg; else
        aImg = Balloon_CacheImgs(tt_aV[BALLOONIMGPATH]); sCssCrn = ' style="position:relative;width:' + tt_aV[BALLOONEDGESIZE] + 'px;padding:0px;margin:0px;overflow:hidden;line-height:0px;'; sVaT = 'vertical-align:top;" valign="top"'; sVaB = 'vertical-align:bottom;" valign="bottom"'; sCssImg = 'padding:0px;margin:0px;border:0px;'; sImgZ = '" style="' + sCssImg + '" />'; sCssStem = 'vertical-align:bottom;'; tt_sContent = '<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0px;margin:0px;left:0px;top:0px;"><tr>'
+ '<td' + sCssCrn + sVaB + '>'
+ '<img src="' + aImg[1].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ '</td>'
+ '<td valign="bottom" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ '<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;' + sCssImg + sCssStem + '" src="' + aImg[9].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ '<div style="position:relative;z-index:0;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[2].src + ');">'
+ '</div>'
+ '</td>'
+ '<td' + sCssCrn + sVaB + '>'
+ '<img src="' + aImg[3].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ '</td>'
+ '</tr><tr>'
+ '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[8].src + ');">'
+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[8].src + sImgZ
+ '</td>'
+ '<td id="bALlO0nBdY" style="position:relative;line-height:normal;'
+ ';background-image:url(' + aImg[0].src + ')'
+ ';color:' + tt_aV[FONTCOLOR]
+ ';font-family:' + tt_aV[FONTFACE]
+ ';font-size:' + tt_aV[FONTSIZE]
+ ';font-weight:' + tt_aV[FONTWEIGHT]
+ ';text-align:' + tt_aV[TEXTALIGN]
+ ';padding:' + balloon.padding + 'px'
+ ';width:' + ((balloon.width > 0) ? (balloon.width + 'px') : 'auto')
+ ';">' + tt_sContent + '</td>'
+ '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[4].src + ');">'
+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[4].src + sImgZ
+ '</td>'
+ '</tr><tr>'
+ '<td' + sCssCrn + sVaT + '>'
+ '<img src="' + aImg[7].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ '</td>'
+ '<td valign="top" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+ '<div style="position:relative;left:0px;top:0px;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[6].src + ');"></div>'
+ '<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;' + sCssImg + sCssStem + '" src="' + aImg[10].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+ '</td>'
+ '<td' + sCssCrn + sVaT + '>'
+ '<img src="' + aImg[5].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+ '</td>'
+ '</tr></table>'; return true;
}; balloon.OnSubDivsCreated = function() {
    if (tt_aV[BALLOON]) {
        var bdy = tt_GetElt("bALlO0nBdY"); if (tt_t2t && !tt_aV[COPYCONTENT] && bdy)
            tt_MovDomNode(tt_t2t, tt_GetDad(tt_t2t), bdy); balloon.iStem = tt_aV[ABOVE] * 1; balloon.aStem = [tt_GetElt("bALlOOnT"), tt_GetElt("bALlOOnB")]; balloon.aStem[balloon.iStem].style.display = "inline"; if (balloon.width < -1)
            Balloon_MaxW(bdy); return true;
    }
    return false;
}; balloon.OnMoveAfter = function() {
    if (tt_aV[BALLOON]) {
        var iStem = (tt_aV[ABOVE] != tt_bJmpVert) * 1; if (iStem != balloon.iStem)
        { balloon.aStem[balloon.iStem].style.display = "none"; balloon.aStem[iStem].style.display = "inline"; balloon.iStem = iStem; }
        balloon.aStem[iStem].style.left = Balloon_CalcStemX() + "px"; return true;
    }
    return false;
}; function Balloon_CalcStemX()
{ var x = tt_musX - tt_x + tt_aV[BALLOONSTEMOFFSET] - tt_aV[BALLOONEDGESIZE]; return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), 2); }
function Balloon_CacheImgs(sPath) {
    var asImg = ["background", "lt", "t", "rt", "r", "rb", "b", "lb", "l", "stemt", "stemb"], n = asImg.length, aImg = new Array(n), img; while (n)
    { --n; img = aImg[n] = new Image(); img.src = sPath + asImg[n] + ".gif"; }
    return aImg;
}
function Balloon_MaxW(bdy) {
    if (bdy) {
        var iAdd = tt_bBoxOld ? (balloon.padding << 1) : 0, w = tt_GetDivW(bdy); if (w > -balloon.width + iAdd)
            bdy.style.width = (-balloon.width + iAdd) + "px";
    } 
}
function Balloon_PreCacheDefImgs() {
    if (config.BalloonImgPath.charAt(config.BalloonImgPath.length - 1) != '/')
        config.BalloonImgPath += "/"; balloon.aDefImg = Balloon_CacheImgs(config.BalloonImgPath);
}
Balloon_PreCacheDefImgs();