var mouseCurrentlyOwnsTip=false;
var disabledUntil=null;
var balloonTipFadeTime=180;
var afterHoverBalloonTipBody=null;
var afterHoverBalloonTipLeft=null;
var afterHoverBalloonTipTop=null;
function disableBalloonTips(_1,_2){
if(_2){
hideBalloonTip();
}
var d=new Date().getTime()+_1;
if(disabledUntil==null||disabledUntil<d){
disabledUntil=d;
}
}
function balloonTips(id){
var _5=null;
if(!document.getElementById||!document.getElementsByTagName){
return;
}
if(id==null){
_5=document.getElementsByTagName("a");
}else{
_5=document.getElementById(id).getElementsByTagName("a");
}
for(var i=0;i<_5.length;i++){
createLinkBalloonTip(_5[i]);
}
}
function createLinkBalloonTip(el){
el.onmouseover=showLinkBalloonTipAtCursor;
el.onmouseout=hideLinkBalloonTipAtCursor;
el.onmousemove=balloonTipToMousePosition;
}
function balloonTipToLocation(_8,_9){
getBalloonTipElement(_8,_9);
}
function getBalloonTipElement(){
var _a=document.getElementById("balloonTip");
if(_a==null){
if(typeof pageLoaded!="undefined"&&pageLoaded==true){
_a=document.createElement("div");
_a.id="balloonTip";
_a.className="tooltip-container";
_a.onclick=hideBalloonTip;
_a.style.display="none";
_a.style.position="absolute";
addChildNode(_a,document.body);
}
}
return _a;
}
function balloonTipToRelativePosition(_b,_c){
var _d=ele(_b);
var _e=getBalloonTipElement();
if(_e==null){
return;
}
var _f=0;
var _10=0;
if(_d!=null){
var nx,ny,nw,nh,bh,bw=null;
if(typeof dojo!="undefined"){
var np=dojo.html.getAbsolutePosition(_d,true);
nx=np.x;
ny=np.y;
var nb=dojo.html.getContentBox(_d);
nw=nb.width;
nh=nb.height;
var bb=dojo.html.getContentBox(_e);
bh=bb.height;
bw=bb.width;
}else{
nx=getX(_d);
ny=getY(_d);
nw=getWidth(_d);
nh=getHeight(_d);
bw=getHeight(_e);
bh=getHeight(_e);
}
if(_c==null||_c=="above"||_c=="ur"||_c=="tr"){
_10=nx+nw;
_f=ny-bh;
}else{
if(_c=="ul"||_c=="tl"){
_10=nx;
_f=ny-bh;
}else{
if(_c=="middle"||_c=="um"||_c=="tm"){
_10=Math.round(nx+((nw-bw)/2));
_f=ny-bh+1;
}else{
if(_c=="lm"||_c=="bm"){
_10=Math.round((nx+nw-bw)/2);
_f=ny+bh-27;
}else{
if(_c=="below"||_c=="lr"||_c=="br"){
_10=nx+nw;
_f=ny+nh;
}else{
if(_c=="ll"||_c=="bl"){
_10=nx;
_f=ny+nh;
}
}
}
}
}
}
}
_e.setAttribute("tipPositioningStyle","relative");
_e.style.left=_10+"px";
_e.style.top=_f+"px";
}
function createBalloonTipContents(_1a,_1b,_1c,_1d){
var _1e=_1b;
var _1f=_1c;
if(_1e!=null&&_1f==null){
_1f=_1e;
_1e=null;
}
var _20=null;
if(_1d==null||_1d=="above"||_1d=="ur"||_1d=="tr"||_1d=="tm"||_1d=="um"||_1d=="ul"||_1d=="tl"){
_20="above";
}else{
if(_1d=="below"||_1d=="lr"||_1d=="br"||_1d=="lm"||_1d=="bm"||_1d=="ll"||_1d=="bl"){
_20="below";
}
}
var o=document.createElement("span");
o.className=_1a;
o.style.display="block";
var t=document.createElement("span");
t.className="top-"+_20;
t.style.display="block";
if(_1e!=null){
t.innerHTML=_1e;
}
var b=document.createElement("b");
b.className="bottom-"+_20;
b.style.display="block";
if(_1f!=null){
b.innerHTML=_1f;
}
o.appendChild(t);
o.appendChild(b);
setOpacity(o,95);
return o;
}
function showLinkBalloonTipAtCursor(e){
if(disabledUntil!=null&&disabledUntil>new Date().getTime()){
return;
}
mouseCurrentlyOwnsTip=true;
var el=this;
el.setAttribute("balloonTip",el.getAttribute("title"));
var _26=el.getAttribute("balloonTip");
var _27=el.getAttribute("href");
var js=(_27!=null&&_27.substr(0,11)=="javascript:");
if((_26==null||_26.length==0)&&js){
hideBalloonTip();
return;
}
var _29=getBalloonTipElement();
if(_29==null){
return;
}
if(_29.style.display=="block"&&afterHoverBalloonTipBody==null&&_29.getAttribute("tipPositioningStyle")=="relative"){
afterHoverBalloonTipBody=_29.innerHTML;
afterHoverBalloonTipTop=_29.style.top;
afterHoverBalloonTipLeft=_29.style.left;
}
hideBalloonTip();
el.setAttribute("title","");
el.setAttribute("tipForId",null);
if(_26==null||_26.length==0){
_26="link:";
}
if(_27!=null){
if(_27.length>30){
_27=_27.substr(0,27)+"...";
}
if(js){
_27=null;
}
}
var vw,vh,nx,ny,nw,nh=null;
if(typeof dojo!="undefined"){
var vb=dojo.html.getViewport();
vw=vp.width;
vh=vp.height;
var np=dojo.html.getAbsolutePosition(_29,true);
nx=np.x;
ny=np.y;
var nb=dojo.html.getContentBox(_29);
nw=nb.width;
nh=nb.height;
}else{
vw=getAvailableWidth();
vh=getAvailableHeight();
nx=getX(_29);
ny=getY(_29);
nw=getWidth(_29);
nh=getHeight(_29);
}
var _33=null;
if(((nx+nw)>(vw-200))||((nx-nw)>200)){
_33="Left";
}else{
_33="Right";
}
var _34=createBalloonTipContents("tooltip-float"+_33,_26,_27,"below");
balloonTipToMousePosition(e);
removeChildNodes(_29);
_29.appendChild(_34);
_29.style.display="block";
}
function hideLinkBalloonTipAtCursor(e){
if(disabledUntil!=null&&disabledUntil>new Date().getTime()){
return;
}
var el=this;
var _37=el.getAttribute("balloonTip");
el.setAttribute("title",_37);
el.setAttribute("balloonTip",null);
hideBalloonTip();
var _38=getBalloonTipElement();
if(_38==null){
return;
}
if(afterHoverBalloonTipBody!=null){
_38.style.left=afterHoverBalloonTipLeft;
_38.style.top=afterHoverBalloonTipTop;
_38.innerHTML=afterHoverBalloonTipBody;
afterHoverBalloonTipLeft=null;
afterHoverBalloonTipTop=null;
afterHoverBalloonTipBody=null;
_38.setAttribute("tipPositioningStyle","relative");
_38.style.display="block";
}
mouseCurrentlyOwnsTip=false;
}
function showBalloonTip(_39,_3a,_3b,_3c){
if(disabledUntil!=null&&disabledUntil>new Date().getTime()){
return;
}
var _3d=getBalloonTipElement();
if(_3d==null){
return;
}
var _3e=ele(_39);
var _3f=_3c;
if(_3f==null){
_3f=bestBalloonPosition(_3e);
}
var _40=null;
if(_3f!=null&&(_3f=="ll"||_3f=="bl"||_3f=="ul"||_3f=="tl")){
_40="Left";
}else{
_40="Right";
}
var _41=createBalloonTipContents("tooltip-fixed"+_40,_3a,_3b,_3f);
removeChildNodes(_3d);
_3d.appendChild(_41);
_3d.style.left="-1000px";
_3d.style.top="-1000px";
dojo.html.setOpacity(_3d,0.0001);
_3d.style.display="block";
dojo.lfx.html.fadeShow(_3d,balloonTipFadeTime,dojo.lfx.easeIn).play();
balloonTipToRelativePosition(_3e,_3f);
if(_3e!=null){
_3d.setAttribute("tipForId",_3e.id);
}
}
function hideBalloonTip(){
if(disabledUntil!=null&&disabledUntil>new Date().getTime()){
return;
}
var _42=getBalloonTipElement();
if(_42!=null){
_42.style.left="-1000px";
_42.style.top="-1000px";
_42.style.display="none";
}
}
function balloonTipToMousePosition(e){
if(mouseCurrentlyOwnsTip){
var _44=getBalloonTipElement();
if(_44==null){
return;
}
if(_44.style.display=="block"&&afterHoverBalloonTipBody==null&&_44.getAttribute("tipPositioningStyle")=="relative"){
afterHoverBalloonTipBody=_44.innerHTML;
afterHoverBalloonTipTop=_44.style.top;
afterHoverBalloonTipLeft=_44.style.left;
}
var _45=0,_46=0;
if(e==null){
e=window.event;
}
if(e.pageX||e.pageY){
_45=e.pageX;
_46=e.pageY;
}else{
if(e.clientX||e.clientY){
if(document.documentElement.scrollTop){
_45=e.clientX+document.documentElement.scrollLeft;
_46=e.clientY+document.documentElement.scrollTop;
}else{
_45=e.clientX+document.body.scrollLeft;
_46=e.clientY+document.body.scrollTop;
}
}
}
_44.setAttribute("tipPositioningStyle","cursor");
_44.style.top=(_46+10)+"px";
_44.style.left=(_45-20)+"px";
}
}
function bestBalloonPosition(_47){
var vw,vh,nx,ny,nw,nh,sy,sx=null;
if(typeof dojo!="undefined"){
var sc=dojo.html.getScroll(_47);
sx=sc.top;
sy=sc.left;
var vp=dojo.html.getViewport();
vw=vp.width;
vh=vp.height;
var np=dojo.html.getAbsolutePosition(_47,true);
nx=np.x;
ny=np.y;
var nb=dojo.html.getContentBox(_47);
nw=nb.width;
nh=nb.height;
}else{
sx=getScrollLeft();
sy=getScrollTop();
vw=getAvailableWidth();
vh=getAvailableHeight();
nx=getX(_47);
ny=getY(_47);
nw=getWidth(_47);
nh=getHeight(_47);
}
if(nx>200&&(((nx+nw)>(vw-200))||((nx-nw)>200))){
position="l";
}else{
if(((vw-nw)<200)&&(nx+nw)>(vw-200)){
position="m";
}else{
position="r";
}
}
var pos=dojo.html.getAbsolutePosition(_47);
var sz=dojo.html.getContentBox(_47);
var vp=dojo.html.getViewport();
var scr=dojo.html.getScroll(_47);
var _57=pos.top+scr.top;
var _58=_57+sz.height;
var _59=scr.top;
var _5a=_59+vp.height;
if(_57-200<_59){
position=("l"+position);
}else{
position=("u"+position);
}
return position;
}

