6/* This notice must be untouched at all times.
wz_tooltip.js    v. 3.38
The latest version is available at
http://www.walterzorn.com
or http://www.devira.com
or http://www.walterzorn.de
Copyright (c) 2002-2005 Walter Zorn. All rights reserved.
Created 1. 12. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
Last modified: 9. 12. 2005
Cross-browser tooltips working even in Opera 5 and 6,
as well as in NN 4, Gecko-Browsers, IE4+, Opera 7+and Konqueror.
No onmouseouts required.
Appearance of tooltips can be individually configured
via commands within the onmouseovers.
LICENSE: LGPL
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
For more details on the GNU Lesser General Public License,
see http://www.gnu.org/copyleft/lesser.html*/
var ttAbove       = false;        // tooltip above mousepointer? Alternative: true
var ttBgColor     = "#dfe6f1";
var ttBgImg       = "";           // path to background image;
var ttBorderColor = "#00679c";
var ttBorderWidth = 1;
var ttDelay       = 500;          // time span until tooltip shows up [milliseconds]
var ttFontColor   = "#000066";
var ttFontFace    = "Arial";
var ttFontSize    = "11px";
var ttFontWeight  = "normal";     // alternative: "bold";
var ttLeft        = false;        // tooltip on the left of the mouse? Alternative: true
var ttOffsetX     = 12;           // horizontal offset of left-top corner from mousepointer
var ttOffsetY     = 15;           // vertical offset                   "
var ttOpacity     = 100;          // opacity of tooltip in percent (must be integer between 0 and 100)
var ttPadding     = 3;            // spacing between border and content
var ttShadowColor = "";
var ttShadowWidth = 0;
var ttStatic      = false;        // tooltip NOT move with the mouse? Alternative: true
var ttSticky      = false;        // do NOT hide tooltip on mouseout? Alternative: true
var ttTemp        = 0;            // time span after which the tooltip disappears; 0 (zero) means "infinite timespan"
var ttTextAlign   = "left";
var ttTitleColor  = "#ffffff";    // color of caption text
var ttWidth       = 300;
var ttip_tags = new Array("a","area","b","big","caption","center","code","dd","div","dl","dt","em","h1","h2","h3","h4","h5","h6","i","img","input","li","map","ol","p","pre","s", "select", "small","span","strike","strong","sub","sup","table","td","th","tr","tt","u","var","ul","layer");
var ttip_obj = null,         // current tooltip
ttip_ifrm = null,            // iframe to cover windowed controls in IE
ttip_objW = 0, ttip_objH = 0,  // width and height of ttip_obj
ttip_objX = 0, ttip_objY = 0,
ttip_offX = 0, ttip_offY = 0,
xlim = 0, ylim = 0,        // right and bottom borders of visible client area
ttip_sup = false,            // true if T_ABOVE cmd
ttip_sticky = false,         // ttip_obj sticky?
ttip_wait = false,
ttip_act = false,            // tooltip visibility flag
ttip_sub = false,            // true while tooltip below mousepointer
ttip_u = "undefined",
ttip_mf = null,              // stores previous mousemove evthandler
ttip_tag = null;             // stores hovered dom node, href and previous statusbar txt
var ttip_db = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null,
ttip_n = navigator.userAgent.toLowerCase(),
ttip_nv = navigator.appVersion;
var ttip_op = !!(window.opera && document.getElementById),
ttip_op6 = ttip_op && !document.defaultView,
ttip_op7 = ttip_op && !ttip_op6,
ttip_ie = ttip_n.indexOf("msie") !=-1 && document.all && ttip_db && !ttip_op,
ttip_ie6 = ttip_ie && parseFloat(ttip_nv.substring(ttip_nv.indexOf("MSIE")+5)) >= 5.5,
ttip_n4 = (document.layers && typeof document.classes != ttip_u),
ttip_n6 = (!ttip_op && document.defaultView && typeof document.defaultView.getComputedStyle != ttip_u),
ttip_w3c = !ttip_ie && !ttip_n6 && !ttip_op && document.getElementById;
function ttip_Int(t_x){
var t_y;
return isNaN(t_y = parseInt(t_x))? 0 : t_y;}
function wzReplace(t_x, t_y){
var t_ret = "",
t_str = this,
t_xI;
while((t_xI = t_str.indexOf(t_x)) !=-1){
t_ret+= t_str.substring(0, t_xI)+t_y;
t_str = t_str.substring(t_xI+t_x.length);}
return t_ret+t_str;}
String.prototype.wzReplace = wzReplace;
function ttip_N4Tags(tagtyp, t_d, t_y){
t_d = t_d || document;
t_y = t_y || new Array();
var t_x = (tagtyp=="a")? t_d.links : t_d.layers;
for(var z = t_x.length; z--;) t_y[t_y.length] = t_x[z];
for(z = t_d.layers.length; z--;) t_y = ttip_N4Tags(tagtyp, t_d.layers[z].document, t_y);
return t_y;}
function ttip_Htm(tt, t_id, txt){
var t_bgc = (typeof tt.T_BGCOLOR != ttip_u)? tt.T_BGCOLOR : ttBgColor,
t_bgimg   = (typeof tt.T_BGIMG != ttip_u)? tt.T_BGIMG : ttBgImg,
t_bc      = (typeof tt.T_BORDERCOLOR != ttip_u)? tt.T_BORDERCOLOR : ttBorderColor,
t_bw      = (typeof tt.T_BORDERWIDTH != ttip_u)? tt.T_BORDERWIDTH : ttBorderWidth,
t_ff      = (typeof tt.T_FONTFACE != ttip_u)? tt.T_FONTFACE : ttFontFace,
t_fc      = (typeof tt.T_FONTCOLOR != ttip_u)? tt.T_FONTCOLOR : ttFontColor,
t_fsz     = (typeof tt.T_FONTSIZE != ttip_u)? tt.T_FONTSIZE : ttFontSize,
t_fwght   = (typeof tt.T_FONTWEIGHT != ttip_u)? tt.T_FONTWEIGHT : ttFontWeight,
t_opa     = (typeof tt.T_OPACITY != ttip_u)? tt.T_OPACITY : ttOpacity,
t_padd    = (typeof tt.T_PADDING != ttip_u)? tt.T_PADDING : ttPadding,
t_shc     = (typeof tt.T_SHADOWCOLOR != ttip_u)? tt.T_SHADOWCOLOR : (ttShadowColor || 0),
t_shw     = (typeof tt.T_SHADOWWIDTH != ttip_u)? tt.T_SHADOWWIDTH : (ttShadowWidth || 0),
t_algn    = (typeof tt.T_TEXTALIGN != ttip_u)? tt.T_TEXTALIGN : ttTextAlign,
t_tit     = (typeof tt.T_TITLE != ttip_u)? tt.T_TITLE : "",
t_titc    = (typeof tt.T_TITLECOLOR != ttip_u)? tt.T_TITLECOLOR : ttTitleColor,
t_w       = (typeof tt.T_WIDTH != ttip_u)? tt.T_WIDTH  : ttWidth;
if(t_shc || t_shw){
t_shc = t_shc || "#cccccc";
t_shw = t_shw || 5;}
if(ttip_n4 && (t_fsz == "10px" || t_fsz == "11px")) t_fsz = "12px";
var t_optx = (ttip_n4? '' : ttip_n6? ('-moz-opacity:'+(t_opa/100.0)) : ttip_ie? ('filter:Alpha(opacity='+t_opa+')') : ('opacity:'+(t_opa/100.0)))+';';
var t_y = '<div id="'+t_id+'" style="position:absolute;z-index:1010;';
t_y+= 'left:0px;top:0px;width:'+(t_w+t_shw)+'px;visibility:'+(ttip_n4? 'hide' : 'hidden')+';'+t_optx+'">'+
'<table border="0" cellpadding="0" cellspacing="0"'+(t_bc? (' bgcolor="'+t_bc+'" style="background:'+t_bc+';"') : '')+' width="'+t_w+'">';
if(t_tit){
t_y+= '<tr><td style="padding-left:3px;padding-right:3px;" align="'+t_algn+'"><font color="'+t_titc+'" face="'+t_ff+'" '+
'style="color:'+t_titc+';font-family:'+t_ff+';font-size:'+t_fsz+';"><b>'+(ttip_n4? '&nbsp;' : '')+t_tit+'</b></font></td></tr>';}
t_y+= '<tr><td><table border="0" cellpadding="'+t_padd+'" cellspacing="'+t_bw+'" width="100%">'+
'<tr><td'+(t_bgc? (' bgcolor="'+t_bgc+'"') : '')+(t_bgimg? ' background="'+t_bgimg+'"' : '')+' style="text-align:'+t_algn+';';
if(ttip_n6) t_y+= 'padding:'+t_padd+'px;';
t_y+= '" align="'+t_algn+'"><font color="'+t_fc+'" face="'+t_ff+'"'+
' style="color:'+t_fc+';font-family:'+t_ff+';font-size:'+t_fsz+';font-weight:'+t_fwght+';">';
if(t_fwght == 'bold') t_y+= '<b>';
t_y+= txt;
if(t_fwght == 'bold') t_y+= '</b>';
t_y+= '</font></td></tr></table></td></tr></table>';
if(t_shw){
var t_spct = Math.round(t_shw*1.3);
if(ttip_n4){
t_y+= '<layer bgcolor="'+t_shc+'" left="'+t_w+'" top="'+t_spct+'" width="'+t_shw+'" height="0"></layer>'+
'<layer bgcolor="'+t_shc+'" left="'+t_spct+'" align="bottom" width="'+(t_w-t_spct)+'" height="'+t_shw+'"></layer>';}
else{
t_optx = ttip_n6? '-moz-opacity:0.85;' : ttip_ie? 'filter:Alpha(opacity=85);' : 'opacity:0.85;';
t_y+= '<div id="'+t_id+'R" style="position:absolute;background:'+t_shc+';left:'+t_w+'px;top:'+t_spct+'px;width:'+t_shw+'px;height:1px;overflow:hidden;'+t_optx+'"></div>'+
'<div style="position:relative;background:'+t_shc+';left:'+t_spct+'px;top:0px;width:'+(t_w-t_spct)+'px;height:'+t_shw+'px;overflow:hidden;'+t_optx+'"></div>';}}
return(t_y+'</div>'+(ttip_ie6 ? '<iframe id="TTiEiFrM" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>' : ''));}
function ttip_EvX(t_e){
var t_y = ttip_Int(t_e.pageX || t_e.clientX || 0)+
ttip_Int(ttip_ie? ttip_db.scrollLeft : 0)+
ttip_offX;
if(t_y > xlim) t_y = xlim;
var t_scr = ttip_Int(window.pageXOffset || (ttip_db? ttip_db.scrollLeft : 0) || 0);
if(t_y < t_scr) t_y = t_scr;
return t_y;}
function ttip_EvY(t_e){
var t_y = ttip_Int(t_e.pageY || t_e.clientY || 0)+
ttip_Int(ttip_ie? ttip_db.scrollTop : 0);
if(ttip_sup) t_y-= (ttip_objH+ttip_offY-15);
else if(t_y > ylim || !ttip_sub && t_y > ylim-24){
t_y-= (ttip_objH+5);
ttip_sub = false;}
else{
t_y+= ttip_offY;
ttip_sub = true;}
return t_y;}
function ttip_ReleasMov(){
if(document.onmousemove == ttip_Move){
if(!ttip_mf && document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);
document.onmousemove = ttip_mf;}}
function ttip_ShowIfrm(t_x){
if(!ttip_obj || !ttip_ifrm) return;
if(t_x){
ttip_ifrm.style.width = ttip_objW+'px';
ttip_ifrm.style.height = ttip_objH+'px';
ttip_ifrm.style.display = "block";}
else ttip_ifrm.style.display = "none";}
function ttip_GetDiv(t_id){
return(
ttip_n4? (document.layers[t_id] || null): ttip_ie? (document.all[t_id] || null): (document.getElementById(t_id) || null));}
function ttip_GetDivW(){
return ttip_Int(
ttip_n4? ttip_obj.clip.width: (ttip_obj.style.pixelWidth || ttip_obj.offsetWidth));}
function ttip_GetDivH(){
return ttip_Int(
ttip_n4? ttip_obj.clip.height: (ttip_obj.style.pixelHeight || ttip_obj.offsetHeight));}
function ttip_SetDivZ(){
var t_i = ttip_obj.style || ttip_obj;
if(t_i){
if(window.dd && dd.z)
t_i.zIndex = Math.max(dd.z+1, t_i.zIndex);
if(ttip_ifrm) ttip_ifrm.style.zIndex = t_i.zIndex-1;}}
function ttip_SetDivPos(t_x, t_y){
var t_i = ttip_obj.style || ttip_obj;
var t_px = (ttip_op6 || ttip_n4)? '' : 'px';
t_i.left = (ttip_objX = t_x)+t_px;
t_i.top = (ttip_objY = t_y)+t_px;
if(ttip_ifrm){
ttip_ifrm.style.left = t_i.left;
ttip_ifrm.style.top = t_i.top;}}
function ttip_ShowDiv(t_x){
ttip_ShowIfrm(t_x);
if(ttip_n4) ttip_obj.visibility = t_x? 'show' : 'hide';
else ttip_obj.style.visibility = t_x? 'visible' : 'hidden';
ttip_act = t_x;}
function ttip_OpDeHref(t_e){
var t_tag;
if(t_e){
t_tag = t_e.target;
while(t_tag){
if(t_tag.hasAttribute("href")){
ttip_tag = t_tag
ttip_tag.t_href = ttip_tag.getAttribute("href");
ttip_tag.removeAttribute("href");
ttip_tag.style.cursor = "hand";
ttip_tag.onmousedown = ttip_OpReHref;
ttip_tag.stats = window.status;
window.status = ttip_tag.t_href;
break;}
t_tag = t_tag.parentElement;}}}
function ttip_OpReHref(){
if(ttip_tag){
ttip_tag.setAttribute("href", ttip_tag.t_href);
window.status = ttip_tag.stats;
ttip_tag = null;}}
function ttip_Show(t_e, t_id, t_sup, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky, t_temp){
if(ttip_obj) ttip_Hide();
ttip_mf = document.onmousemove || null;
if(window.dd && (window.DRAG && ttip_mf == DRAG || window.RESIZE && ttip_mf == RESIZE)) return;
var t_sh, t_h;
ttip_obj = ttip_GetDiv(t_id);
if(ttip_obj){
t_e = t_e || window.event;
ttip_sub = !(ttip_sup = t_sup);
ttip_sticky = t_sticky;
ttip_objW = ttip_GetDivW();
ttip_objH = ttip_GetDivH();
ttip_offX = t_left?-(ttip_objW+t_offx) : t_offx;
ttip_offY = t_offy;
if(ttip_op7) ttip_OpDeHref(t_e);
if(ttip_n4){
if(ttip_obj.document.layers.length){
t_sh = ttip_obj.document.layers[0];
t_sh.clip.height = ttip_objH-Math.round(t_sh.clip.width*1.3);}}
else{
t_sh = ttip_GetDiv(t_id+'R');
if(t_sh){
t_h = ttip_objH-ttip_Int(t_sh.style.pixelTop || t_sh.style.top || 0);
if(typeof t_sh.style.pixelHeight != ttip_u) t_sh.style.pixelHeight = t_h;
else t_sh.style.height = t_h+'px';}}
xlim = ttip_Int((ttip_db && ttip_db.clientWidth)? ttip_db.clientWidth : window.innerWidth)+
ttip_Int(window.pageXOffset || (ttip_db? ttip_db.scrollLeft : 0) || 0)-
ttip_objW-(ttip_n4? 21 : 0);
ylim = ttip_Int(window.innerHeight || ttip_db.clientHeight)+
ttip_Int(window.pageYOffset || (ttip_db? ttip_db.scrollTop : 0) || 0)-
ttip_objH-ttip_offY;
ttip_SetDivZ();
if(t_fix) ttip_SetDivPos(ttip_Int((t_fix = t_fix.split(','))[0]), ttip_Int(t_fix[1]));
else ttip_SetDivPos(ttip_EvX(t_e), ttip_EvY(t_e));
var t_txt = 'ttip_ShowDiv(\'true\');';
if(t_sticky) t_txt+= '{'+
'ttip_ReleasMov();'+
'window.ttip_upFunc = document.onmouseup || null;'+
'if(document.captureEvents) document.captureEvents(Event.MOUSEUP);'+
'document.onmouseup = new Function("window.setTimeout(\'ttip_Hide();\', 10);");'+
'}';
else if(t_static) t_txt+= 'ttip_ReleasMov();';
if(t_temp > 0) t_txt+= 'window.ttip_rtm = window.setTimeout(\'ttip_sticky = false; ttip_Hide();\','+t_temp+');';
window.ttip_rdl = window.setTimeout(t_txt, t_delay);
if(!t_fix){
if(document.captureEvents) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = ttip_Move;}}}
var ttip_area = false;
function ttip_Move(t_ev){
if(!ttip_obj) return;
if(ttip_n6 || ttip_w3c){
if(ttip_wait) return;
ttip_wait = true;
setTimeout('ttip_wait = false;', 5);}
var t_e = t_ev || window.event;
ttip_SetDivPos(ttip_EvX(t_e), ttip_EvY(t_e));
if(ttip_op6){
if(ttip_area && t_e.target.tagName != 'AREA') ttip_Hide();
else if(t_e.target.tagName == 'AREA') ttip_area = true;}}
function ttip_Hide(){
if(window.ttip_obj){
if(window.ttip_rdl) window.clearTimeout(ttip_rdl);
if(!ttip_sticky || !ttip_act){
if(window.ttip_rtm) window.clearTimeout(ttip_rtm);
ttip_ShowDiv(false);
ttip_SetDivPos(-ttip_objW,-ttip_objH);
ttip_obj = null;
if(typeof window.ttip_upFunc != ttip_u) document.onmouseup = window.ttip_upFunc;}
ttip_sticky = false;
if(ttip_op6 && ttip_area) ttip_area = false;
ttip_ReleasMov();
if(ttip_op7) ttip_OpReHref();}}
function ttip_Init(){
if(!(ttip_op || ttip_n4 || ttip_n6 || ttip_ie || ttip_w3c)) return;
var htm = ttip_n4? '<div style="position:absolute;"></div>' : '',
tags,
t_tj,
over,
esc = 'return escape(';
var i = ttip_tags.length; while(i--){
tags = ttip_ie? (document.all.tags(ttip_tags[i]) || 1): document.getElementsByTagName? (document.getElementsByTagName(ttip_tags[i]) || 1): (!ttip_n4 && ttip_tags[i]=="a")? document.links: 1;
if(ttip_n4 && (ttip_tags[i] == "a" || ttip_tags[i] == "layer")) tags = ttip_N4Tags(ttip_tags[i]);
var j = tags.length; while(j--){
if(typeof (t_tj = tags[j]).onmouseover == "function" && t_tj.onmouseover.toString().indexOf(esc) !=-1 && !ttip_n6 || ttip_n6 && (over = t_tj.getAttribute("onmouseover")) && over.indexOf(esc) !=-1){
if(over) t_tj.onmouseover = new Function(over);
var txt = unescape(t_tj.onmouseover());
htm+= ttip_Htm(
t_tj,
"tOoLtIp"+i+""+j,
txt.wzReplace("& ","&"));
t_tj.onmouseover = new Function('e',
'ttip_Show(e,'+
'"tOoLtIp'+i+''+j+'",'+((typeof t_tj.T_ABOVE != ttip_u)? t_tj.T_ABOVE : ttAbove)+','+((typeof t_tj.T_DELAY != ttip_u)? t_tj.T_DELAY : ttDelay)+','+((typeof t_tj.T_FIX != ttip_u)? '"'+t_tj.T_FIX+'"' : '""')+','+((typeof t_tj.T_LEFT != ttip_u)? t_tj.T_LEFT : ttLeft)+','+((typeof t_tj.T_OFFSETX != ttip_u)? t_tj.T_OFFSETX : ttOffsetX)+','+((typeof t_tj.T_OFFSETY != ttip_u)? t_tj.T_OFFSETY : ttOffsetY)+','+((typeof t_tj.T_STATIC != ttip_u)? t_tj.T_STATIC : ttStatic)+','+((typeof t_tj.T_STICKY != ttip_u)? t_tj.T_STICKY : ttSticky)+','+((typeof t_tj.T_TEMP != ttip_u)? t_tj.T_TEMP : ttTemp)+
');');
t_tj.onmouseout = ttip_Hide;
if(t_tj.alt) t_tj.alt = "";
if(t_tj.title) t_tj.title = "";}}}
document.write(htm);
if(document.getElementById) ttip_ifrm = document.getElementById("TTiEiFrM");}
ttip_Init();
