'
+ ''
+ tt_PDFTubeaV[TITLE]
+ ''
+ (tt_PDFTubeaV[CLOSEBTN] ?
('| '
+ ''
+ tt_PDFTubeaV[CLOSEBTNTEXT]
+ ' | ')
: '')
+ ' ')
: '')
+ ''
+ ' '
+ tt_PDFTubesContent
+ ' '
+ (tt_PDFTubeaV[SHADOW]
? (''
+ '')
: '')
);
tt_PDFTubeGetSubDivRefs();
// Convert DOM node to tip
if(tt_PDFTubet2t && !tt_PDFTubeaV[COPYCONTENT])
{
// Store the tag's parent element so we can restore that DOM branch
// once the tooltip is hidden
tt_PDFTubet2tDad = tt_PDFTubet2t.parentNode || tt_PDFTubet2t.parentElement || tt_PDFTubet2t.offsetParent || null;
if(tt_PDFTubet2tDad)
{
tt_PDFTubeMovDomNode(tt_PDFTubet2t, tt_PDFTubet2tDad, tt_PDFTubeaElt[6]);
tt_PDFTubet2t.style.display = "block";
}
}
tt_PDFTubeExtCallFncs(0, "SubDivsCreated");
}
function tt_PDFTubeGetSubDivRefs()
{
var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR");
for(var i = aId.length; i; --i)
tt_PDFTubeaElt[i] = tt_PDFTubeGetElt(aId[i - 1]);
}
function tt_PDFTubeFormatTip()
{
var css, w, iOffY, iOffSh;
//--------- Title DIV ----------
if(tt_PDFTubeaV[TITLE].length)
{
css = tt_PDFTubeaElt[1].style;
css.background = tt_PDFTubeaV[TITLEBGCOLOR];
css.paddingTop = (tt_PDFTubeaV[CLOSEBTN] ? 2 : 0) + "px";
css.paddingBottom = "1px";
css.paddingLeft = css.paddingRight = tt_PDFTubeaV[PADDING] + "px";
css = tt_PDFTubeaElt[3].style;
css.color = tt_PDFTubeaV[TITLEFONTCOLOR];
css.fontFamily = tt_PDFTubeaV[TITLEFONTFACE];
css.fontSize = tt_PDFTubeaV[TITLEFONTSIZE];
css.fontWeight = "bold";
css.textAlign = tt_PDFTubeaV[TITLEALIGN];
// Close button DIV
if(tt_PDFTubeaElt[4])
{
css.paddingRight = (tt_PDFTubeaV[PADDING] << 1) + "px";
css = tt_PDFTubeaElt[4].style;
css.background = tt_PDFTubeaV[CLOSEBTNCOLORS][0];
css.color = tt_PDFTubeaV[CLOSEBTNCOLORS][1];
css.fontFamily = tt_PDFTubeaV[TITLEFONTFACE];
css.fontSize = tt_PDFTubeaV[TITLEFONTSIZE];
css.fontWeight = "bold";
}
if(tt_PDFTubeaV[WIDTH] > 0)
tt_PDFTubew = tt_PDFTubeaV[WIDTH] + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1);
else
{
tt_PDFTubew = tt_PDFTubeGetDivW(tt_PDFTubeaElt[3]) + tt_PDFTubeGetDivW(tt_PDFTubeaElt[4]);
// Some spacing between title DIV and closebutton
if(tt_PDFTubeaElt[4])
tt_PDFTubew += tt_PDFTubeaV[PADDING];
}
// Ensure the top border of the body DIV be covered by the title DIV
iOffY = -tt_PDFTubeaV[BORDERWIDTH];
}
else
{
tt_PDFTubew = 0;
iOffY = 0;
}
//-------- Body DIV ------------
css = tt_PDFTubeaElt[5].style;
css.top = iOffY + "px";
if(tt_PDFTubeaV[BORDERWIDTH])
{
css.borderColor = tt_PDFTubeaV[BORDERCOLOR];
css.borderStyle = tt_PDFTubeaV[BORDERSTYLE];
css.borderWidth = tt_PDFTubeaV[BORDERWIDTH] + "px";
}
if(tt_PDFTubeaV[BGCOLOR].length)
css.background = tt_PDFTubeaV[BGCOLOR];
if(tt_PDFTubeaV[BGIMG].length)
css.backgroundImage = "url(" + tt_PDFTubeaV[BGIMG] + ")";
css.padding = tt_PDFTubeaV[PADDING] + "px";
css.textAlign = tt_PDFTubeaV[TEXTALIGN];
// TD inside body DIV
css = tt_PDFTubeaElt[6].style;
css.color = tt_PDFTubeaV[FONTCOLOR];
css.fontFamily = tt_PDFTubeaV[FONTFACE];
css.fontSize = tt_PDFTubeaV[FONTSIZE];
css.fontWeight = tt_PDFTubeaV[FONTWEIGHT];
css.background = "";
css.textAlign = tt_PDFTubeaV[TEXTALIGN];
if(tt_PDFTubeaV[WIDTH] > 0)
w = tt_PDFTubeaV[WIDTH] + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1);
else
// We measure the width of the body's inner TD, because some browsers
// expand the width of the container and outer body DIV to 100%
w = tt_PDFTubeGetDivW(tt_PDFTubeaElt[6]) + ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1);
if(w > tt_PDFTubew)
tt_PDFTubew = w;
//--------- Shadow DIVs ------------
if(tt_PDFTubeaV[SHADOW])
{
tt_PDFTubew += tt_PDFTubeaV[SHADOWWIDTH];
iOffSh = Math.floor((tt_PDFTubeaV[SHADOWWIDTH] * 4) / 3);
// Bottom shadow
css = tt_PDFTubeaElt[7].style;
css.top = iOffY + "px";
css.left = iOffSh + "px";
css.width = (tt_PDFTubew - iOffSh - tt_PDFTubeaV[SHADOWWIDTH]) + "px";
css.height = tt_PDFTubeaV[SHADOWWIDTH] + "px";
css.background = tt_PDFTubeaV[SHADOWCOLOR];
// Right shadow
css = tt_PDFTubeaElt[8].style;
css.top = iOffSh + "px";
css.left = (tt_PDFTubew - tt_PDFTubeaV[SHADOWWIDTH]) + "px";
css.width = tt_PDFTubeaV[SHADOWWIDTH] + "px";
css.background = tt_PDFTubeaV[SHADOWCOLOR];
}
else
iOffSh = 0;
//-------- Container DIV -------
tt_PDFTubeSetTipOpa(tt_PDFTubeaV[FADEIN] ? 0 : tt_PDFTubeaV[OPACITY]);
tt_PDFTubeFixSize(iOffY, iOffSh);
}
// Fixate the size so it can't dynamically change while the tooltip is moving.
function tt_PDFTubeFixSize(iOffY, iOffSh)
{
var wIn, wOut, i;
tt_PDFTubeaElt[0].style.width = tt_PDFTubew + "px";
tt_PDFTubeaElt[0].style.pixelWidth = tt_PDFTubew;
wOut = tt_PDFTubew - ((tt_PDFTubeaV[SHADOW]) ? tt_PDFTubeaV[SHADOWWIDTH] : 0);
// Body
wIn = wOut;
if(!tt_PDFTubebBoxOld)
wIn -= ((tt_PDFTubeaV[PADDING] + tt_PDFTubeaV[BORDERWIDTH]) << 1);
tt_PDFTubeaElt[5].style.width = wIn + "px";
// Title
if(tt_PDFTubeaElt[1])
{
wIn = wOut - (tt_PDFTubeaV[PADDING] << 1);
if(!tt_PDFTubebBoxOld)
wOut = wIn;
tt_PDFTubeaElt[1].style.width = wOut + "px";
tt_PDFTubeaElt[2].style.width = wIn + "px";
}
tt_PDFTubeh = tt_PDFTubeGetDivH(tt_PDFTubeaElt[0]) + iOffY;
// Right shadow
if(tt_PDFTubeaElt[8])
tt_PDFTubeaElt[8].style.height = (tt_PDFTubeh - iOffSh) + "px";
i = tt_PDFTubeaElt.length - 1;
if(tt_PDFTubeaElt[i])
{
tt_PDFTubeaElt[i].style.width = tt_PDFTubew + "px";
tt_PDFTubeaElt[i].style.height = tt_PDFTubeh + "px";
}
}
function tt_PDFTubeDeAlt(el)
{
var aKid;
if(el.alt)
el.alt = "";
if(el.title)
el.title = "";
aKid = el.childNodes || el.children || null;
if(aKid)
{
for(var i = aKid.length; i;)
tt_PDFTubeDeAlt(aKid[--i]);
}
}
// This hack removes the annoying native tooltips over links in Opera
function tt_PDFTubeOpDeHref(el)
{
if(!tt_PDFTubeop)
return;
if(tt_PDFTubeelDeHref)
tt_PDFTubeOpReHref();
while(el)
{
if(el.hasAttribute("href"))
{
el.t_href = el.getAttribute("href");
el.t_stats = window.status;
el.removeAttribute("href");
el.style.cursor = "hand";
tt_PDFTubeAddEvtFnc(el, "mousedown", tt_PDFTubeOpReHref);
window.status = el.t_href;
tt_PDFTubeelDeHref = el;
break;
}
el = el.parentElement;
}
}
function tt_PDFTubeShowInit()
{
tt_PDFTubetShow.Timer("tt_PDFTubeShow()", tt_PDFTubeaV[DELAY], true);
if(tt_PDFTubeaV[CLICKCLOSE])
tt_PDFTubeAddEvtFnc(document, "mouseup", tt_PDFTubeHideInit);
}
function tt_PDFTubeOverInit(e)
{
tt_PDFTubeover = e.target || e.srcElement;
tt_PDFTubeDeAlt(tt_PDFTubeover);
tt_PDFTubeOpDeHref(tt_PDFTubeover);
tt_PDFTubeAddRemOutFnc(true);
}
function tt_PDFTubeShow()
{
var css = tt_PDFTubeaElt[0].style;
// Override the z-index of the topmost wz_dragdrop.js D&D item
css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010);
if(tt_PDFTubeaV[STICKY] || !tt_PDFTubeaV[FOLLOWMOUSE])
tt_PDFTubeiState &= ~0x4;
if(tt_PDFTubeaV[DURATION] > 0)
tt_PDFTubetDurt.Timer("tt_PDFTubeHideInit()", tt_PDFTubeaV[DURATION], true);
tt_PDFTubeExtCallFncs(0, "Show")
css.visibility = "visible";
tt_PDFTubeiState |= 0x2;
if(tt_PDFTubeaV[FADEIN])
tt_PDFTubeFade(0, 0, tt_PDFTubeaV[OPACITY], Math.round(tt_PDFTubeaV[FADEIN] / tt_PDFTubeaV[FADEINTERVAL]));
tt_PDFTubeShowIfrm();
}
function tt_PDFTubeShowIfrm()
{
if(tt_PDFTubeie56)
{
var ifrm = tt_PDFTubeaElt[tt_PDFTubeaElt.length - 1];
if(ifrm)
{
var css = ifrm.style;
css.zIndex = tt_PDFTubeaElt[0].style.zIndex - 1;
css.display = "block";
}
}
}
function tt_PDFTubeMove(e)
{
e = window.event || e;
if(e)
{
tt_PDFTubemusX = tt_PDFTubeGetEvtX(e);
tt_PDFTubemusY = tt_PDFTubeGetEvtY(e);
}
if(tt_PDFTubeiState)
{
if(!tt_PDFTubeover && e)
tt_PDFTubeOverInit(e);
if(tt_PDFTubeiState & 0x4)
{
// Protect some browsers against jam of mousemove events
if(!tt_PDFTubeop && !tt_PDFTubeie)
{
if(tt_PDFTubebWait)
return;
tt_PDFTubebWait = true;
tt_PDFTubetWaitMov.Timer("tt_PDFTubebWait = false;", 1, true);
}
if(tt_PDFTubeaV[FIX])
{
tt_PDFTubeiState &= ~0x4;
tt_PDFTubeSetTipPos(tt_PDFTubeaV[FIX][0], tt_PDFTubeaV[FIX][1]);
}
else if(!tt_PDFTubeExtCallFncs(e, "MoveBefore"))
tt_PDFTubeSetTipPos(tt_PDFTubePosX(), tt_PDFTubePosY());
tt_PDFTubeExtCallFncs([tt_PDFTubemusX, tt_PDFTubemusY], "MoveAfter")
}
}
}
function tt_PDFTubePosX()
{
var x;
x = tt_PDFTubemusX;
if(tt_PDFTubeaV[LEFT])
x -= tt_PDFTubew + tt_PDFTubeaV[OFFSETX] - (tt_PDFTubeaV[SHADOW] ? tt_PDFTubeaV[SHADOWWIDTH] : 0);
else
x += tt_PDFTubeaV[OFFSETX];
// Prevent tip from extending past right/left clientarea boundary
if(x > tt_PDFTubemaxPosX)
x = tt_PDFTubemaxPosX;
return((x < tt_PDFTubescrlX) ? tt_PDFTubescrlX : x);
}
function tt_PDFTubePosY()
{
var y;
// Apply some hysteresis after the tip has snapped to the other side of the
// mouse. In case of insufficient space above and below the mouse, we place
// the tip below.
if(tt_PDFTubeaV[ABOVE] && (!tt_PDFTubebJmpVert || tt_PDFTubeCalcPosYAbove() >= tt_PDFTubescrlY + 16))
y = tt_PDFTubeDoPosYAbove();
else if(!tt_PDFTubeaV[ABOVE] && tt_PDFTubebJmpVert && tt_PDFTubeCalcPosYBelow() > tt_PDFTubemaxPosY - 16)
y = tt_PDFTubeDoPosYAbove();
else
y = tt_PDFTubeDoPosYBelow();
// Snap to other side of mouse if tip would extend past window boundary
if(y > tt_PDFTubemaxPosY)
y = tt_PDFTubeDoPosYAbove();
if(y < tt_PDFTubescrlY)
y = tt_PDFTubeDoPosYBelow();
return y;
}
function tt_PDFTubeDoPosYBelow()
{
tt_PDFTubebJmpVert = tt_PDFTubeaV[ABOVE];
return tt_PDFTubeCalcPosYBelow();
}
function tt_PDFTubeDoPosYAbove()
{
tt_PDFTubebJmpVert = !tt_PDFTubeaV[ABOVE];
return tt_PDFTubeCalcPosYAbove();
}
function tt_PDFTubeCalcPosYBelow()
{
return(tt_PDFTubemusY + tt_PDFTubeaV[OFFSETY]);
}
function tt_PDFTubeCalcPosYAbove()
{
var dy = tt_PDFTubeaV[OFFSETY] - (tt_PDFTubeaV[SHADOW] ? tt_PDFTubeaV[SHADOWWIDTH] : 0);
if(tt_PDFTubeaV[OFFSETY] > 0 && dy <= 0)
dy = 1;
return(tt_PDFTubemusY - tt_PDFTubeh - dy);
}
function tt_PDFTubeOnOut()
{
tt_PDFTubeAddRemOutFnc(false);
if(!(tt_PDFTubeaV[STICKY] && (tt_PDFTubeiState & 0x2)))
tt_PDFTubeHideInit();
}
function tt_PDFTubeHideInit()
{
tt_PDFTubeExtCallFncs(0, "HideInit");
tt_PDFTubeiState &= ~0x4;
if(tt_PDFTubeflagOpa && tt_PDFTubeaV[FADEOUT])
{
tt_PDFTubetFade.EndTimer();
if(tt_PDFTubeopa)
{
var n = Math.round(tt_PDFTubeaV[FADEOUT] / (tt_PDFTubeaV[FADEINTERVAL] * (tt_PDFTubeaV[OPACITY] / tt_PDFTubeopa)));
tt_PDFTubeFade(tt_PDFTubeopa, tt_PDFTubeopa, 0, n);
return;
}
}
tt_PDFTubetHide.Timer("tt_PDFTubeHide();", 1, false);
}
function tt_PDFTubeOpReHref()
{
if(tt_PDFTubeelDeHref)
{
tt_PDFTubeelDeHref.setAttribute("href", tt_PDFTubeelDeHref.t_href);
tt_PDFTubeRemEvtFnc(tt_PDFTubeelDeHref, "mousedown", tt_PDFTubeOpReHref);
window.status = tt_PDFTubeelDeHref.t_stats;
tt_PDFTubeelDeHref = null;
}
}
function tt_PDFTubeFade(a, now, z, n)
{
if(n)
{
now += Math.round((z - now) / n);
if((z > a) ? (now >= z) : (now <= z))
now = z;
else
tt_PDFTubetFade.Timer("tt_PDFTubeFade("
+ a + "," + now + "," + z + "," + (n - 1)
+ ")",
tt_PDFTubeaV[FADEINTERVAL],
true);
}
now ? tt_PDFTubeSetTipOpa(now) : tt_PDFTubeHide();
}
// To circumvent the opacity nesting flaws of IE, we set the opacity
// for each sub-DIV separately, rather than for the container DIV.
function tt_PDFTubeSetTipOpa(opa)
{
tt_PDFTubeSetOpa(tt_PDFTubeaElt[5].style, opa);
if(tt_PDFTubeaElt[1])
tt_PDFTubeSetOpa(tt_PDFTubeaElt[1].style, opa);
if(tt_PDFTubeaV[SHADOW])
{
opa = Math.round(opa * 0.8);
tt_PDFTubeSetOpa(tt_PDFTubeaElt[7].style, opa);
tt_PDFTubeSetOpa(tt_PDFTubeaElt[8].style, opa);
}
}
function tt_PDFTubeOnCloseBtnOver(iOver)
{
var css = tt_PDFTubeaElt[4].style;
iOver <<= 1;
css.background = tt_PDFTubeaV[CLOSEBTNCOLORS][iOver];
css.color = tt_PDFTubeaV[CLOSEBTNCOLORS][iOver + 1];
}
function tt_PDFTubeInt(x)
{
var y;
return(isNaN(y = parseInt(x)) ? 0 : y);
}
// Adds or removes the document.mousemove or HoveredElem.mouseout handler
// conveniently. Keeps track of those handlers to prevent them from being
// set or removed redundantly.
function tt_PDFTubeAddRemOutFnc(bAdd)
{
var PSet = bAdd ? tt_PDFTubeAddEvtFnc : tt_PDFTubeRemEvtFnc;
if(bAdd != tt_PDFTubeAddRemOutFnc.bOn)
{
PSet(tt_PDFTubeover, "mouseout", tt_PDFTubeOnOut);
tt_PDFTubeAddRemOutFnc.bOn = bAdd;
if(!bAdd)
tt_PDFTubeOpReHref();
}
}
tt_PDFTubeAddRemOutFnc.bOn = false;
Number.prototype.Timer = function(s, iT, bUrge)
{
if(!this.value || bUrge)
this.value = window.setTimeout(s, iT);
}
Number.prototype.EndTimer = function()
{
if(this.value)
{
window.clearTimeout(this.value);
this.value = 0;
}
}
function tt_PDFTubeSetOpa(css, opa)
{
tt_PDFTubeopa = opa;
if(tt_PDFTubeflagOpa == 1)
{
// Hack for bugs of IE:
// A DIV cannot be made visible in a single step if an opacity < 100
// has been applied while the DIV was hidden.
// Moreover, in IE6, applying an opacity < 100 has no effect if the
// concerned element has no layout (position, size, zoom, ...).
if(opa < 100)
{
var bVis = css.visibility != "hidden";
css.zoom = "100%";
if(!bVis)
css.visibility = "visible";
css.filter = "alpha(opacity=" + opa + ")";
if(!bVis)
css.visibility = "hidden";
}
else
css.filter = "";
}
else
{
opa /= 100.0;
switch(tt_PDFTubeflagOpa)
{
case 2:
css.KhtmlOpacity = opa; break;
case 3:
css.KHTMLOpacity = opa; break;
case 4:
css.MozOpacity = opa; break;
case 5:
css.opacity = opa; break;
}
}
}
function tt_PDFTubeMovDomNode(el, dadFrom, dadTo)
{
if(dadFrom)
dadFrom.removeChild(el);
if(dadTo)
dadTo.appendChild(el);
}
function tt_PDFTubeErr(sErr)
{
if(tt_PDFTubeDebug)
alert("Tooltip Script Error Message:\n\n" + sErr);
}
//=========== DEALING WITH EXTENSIONS ==============//
function tt_PDFTubeExtCmdEnum()
{
var s;
// Add new command(s) to the commands enum
for(var i in configPDFTube)
{
s = "window." + i.toString().toUpperCase();
if(eval("typeof(" + s + ") == tt_PDFTubeu"))
{
eval(s + " = " + tt_PDFTubeaV.length);
tt_PDFTubeaV[tt_PDFTubeaV.length] = null;
}
}
}
function tt_PDFTubeExtCallFncs(arg, sFnc)
{
var b = false;
for(var i = tt_PDFTubeaExt.length; i;)
{--i;
var fnc = tt_PDFTubeaExt[i]["On" + sFnc];
// Call the method the extension has defined for this event
if(fnc && fnc(arg))
b = true;
}
return b;
}
tt_PDFTubeInit();
|