/*
tip_balloon.js  v. 1.81

The latest version is available at
http://www.walterzorn.com
or http://www.devira.com
or http://www.walterzorn.de

Initial author: Walter Zorn
Last modified: 2.2.2009

Extension for the tooltip library wz_tooltip.js.
Implements balloon tooltips.
*/
// Make sure that the core file wz_tooltip.js is included first
function Balloon_CalcStemX(){var a=tt_musX-tt_x+tt_aV[BALLOONSTEMOFFSET]-tt_aV[BALLOONEDGESIZE];return Math.max(Math.min(a,tt_w-tt_aV[BALLOONSTEMWIDTH]-(tt_aV[BALLOONEDGESIZE]<<1)-2),2)}function Balloon_CacheImgs(a,b){var c=["background","lt","t","rt","r","rb","b","lb","l","stemt","stemb"],d=c.length,e=new Array(d),f;while(d)--d,f=e[d]=new Image,f.src=a+c[d]+"."+b;return e}function Balloon_MaxW(a){if(a){var b=tt_bBoxOld?balloon.padding<<1:0,c=tt_GetDivW(a);c>-balloon.width+b&&(a.style.width=-balloon.width+b+"px")}}function Balloon_PreCacheDefImgs(){config.BalloonImgPath.charAt(config.BalloonImgPath.length-1)!="/"&&(config.BalloonImgPath+="/"),balloon.aDefImg=Balloon_CacheImgs(config.BalloonImgPath,config.BalloonImgExt)}typeof config=="undefined"&&alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!"),config.Balloon=!1,config.BalloonImgPath="/assets/wz_tooltip",config.BalloonEdgeSize=6,config.BalloonStemWidth=15,config.BalloonStemHeight=19,config.BalloonStemOffset=-7,config.BalloonImgExt="gif";var balloon=new tt_Extension;balloon.OnLoadConfig=function(){return 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]=!1,tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length-1)!="/"&&(tt_aV[BALLOONIMGPATH]+="/"),!0):!1},balloon.OnCreateContentString=function(){if(!tt_aV[BALLOON])return!1;var a,b,c,d,e,f;return tt_aV[BALLOONIMGPATH]==config.BalloonImgPath?a=balloon.aDefImg:a=Balloon_CacheImgs(tt_aV[BALLOONIMGPATH],tt_aV[BALLOONIMGEXT]),f="padding:0;margin:0;border:0;line-height:0;overflow:hidden;",c=' style="position:relative;width:'+tt_aV[BALLOONEDGESIZE]+"px;"+f+"overflow:hidden;",d='vertical-align:top;" valign="top"',e='vertical-align:bottom;" valign="bottom"',b='" style="'+f+'" />',tt_sContent='<table border="0" cellpadding="0" cellspacing="0" class="tooltip_balloon" style="width:auto;padding:0;margin:0;left:0;top:0;"><tr><td'+c+e+">"+'<img src="'+a[1].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+b+"</td>"+'<td valign="bottom" style="position:relative;'+f+'">'+'<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;'+f+'" src="'+a[9].src+'" width="'+tt_aV[BALLOONSTEMWIDTH]+'" height="'+tt_aV[BALLOONSTEMHEIGHT]+'" />'+'<div style="position:relative;z-index:0;top:0;'+f+"width:auto;height:"+tt_aV[BALLOONEDGESIZE]+"px;background-image:url("+a[2].src+');">'+"</div>"+"</td>"+"<td"+c+e+">"+'<img src="'+a[3].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+b+"</td>"+"</tr><tr>"+'<td style="position:relative;background-repeat:repeat;'+f+"width:"+tt_aV[BALLOONEDGESIZE]+"px;background-image:url("+a[8].src+');">'+'<img width="'+tt_aV[BALLOONEDGESIZE]+'" height="100%" src="'+a[8].src+b+"</td>"+'<td id="bALlO0nBdY" style="position:relative;line-height:normal;background-repeat:repeat;'+";background-image:url("+a[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;background-repeat:repeat;'+f+"width:"+tt_aV[BALLOONEDGESIZE]+"px;background-image:url("+a[4].src+');">'+'<img width="'+tt_aV[BALLOONEDGESIZE]+'" height="100%" src="'+a[4].src+b+"</td>"+"</tr><tr>"+"<td"+c+d+">"+'<img src="'+a[7].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+b+"</td>"+'<td valign="top" style="position:relative;'+f+'">'+'<div style="position:relative;left:0;top:0;'+f+"width:auto;height:"+tt_aV[BALLOONEDGESIZE]+"px;background-image:url("+a[6].src+');"></div>'+'<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;'+f+'" src="'+a[10].src+'" width="'+tt_aV[BALLOONSTEMWIDTH]+'" height="'+tt_aV[BALLOONSTEMHEIGHT]+'" />'+"</td>"+"<td"+c+d+">"+'<img src="'+a[5].src+'" width="'+tt_aV[BALLOONEDGESIZE]+'" height="'+tt_aV[BALLOONEDGESIZE]+b+"</td>"+"</tr></table>",!0},balloon.OnSubDivsCreated=function(){if(tt_aV[BALLOON]){var a=tt_GetElt("bALlO0nBdY");return tt_t2t&&!tt_aV[COPYCONTENT]&&a&&tt_MovDomNode(tt_t2t,tt_GetDad(tt_t2t),a),balloon.iStem=tt_aV[ABOVE]*1,balloon.aStem=[tt_GetElt("bALlOOnT"),tt_GetElt("bALlOOnB")],balloon.aStem[balloon.iStem].style.display="inline",balloon.width<-1&&Balloon_MaxW(a),!0}return!1},balloon.OnMoveAfter=function(){if(tt_aV[BALLOON]){var a=(tt_aV[ABOVE]!=tt_bJmpVert)*1;return a!=balloon.iStem&&(balloon.aStem[balloon.iStem].style.display="none",balloon.aStem[a].style.display="inline",balloon.iStem=a),balloon.aStem[a].style.left=Balloon_CalcStemX()+"px",!0}return!1},Balloon_PreCacheDefImgs()
