var ToolTips={attachBehavior:function(){$$("a").each(function(A){this.attach(A)}.bind(this))},attach:function(B){var A=B.getAttribute("title");if(!A){return }B.setAttribute("nicetitle",A);B.removeAttribute("title");Event.observe(B,"mouseover",this.onMouseover.bindAsEventListener(this));Event.observe(B,"mouseout",this.out.bind(this));Event.observe(B,"focus",this.onFocus.bindAsEventListener(this));Event.observe(B,"blur",this.out.bind(this))},onMouseover:function(A){this.onOver(A,[Event.pointerX(A),Event.pointerY(A)])},onFocus:function(A){this.onOver(A,Position.cumulativeOffset(Event.element(A)))},onOver:function(B,A){if(this.timeout){clearTimeout(this.timeout)}this.element=Event.element(B);this.timeout=setTimeout(function(){this.show(A)}.bind(this),300)},out:function(){if(this.timeout){clearTimeout(this.timeout)}if(this.current){this.current.remove();this.current=null;var A=$("iframe_tt");if(A){A.hide()}}},show:function(L){try{if(this.current){this.out()}var M=this.element;while(!M.getAttribute("nicetitle")&&M.nodeName.toLowerCase()!="body"){M=M.parentNode}var A=M.getAttribute("nicetitle");if(!A){return }var J=$(document.createElement("DIV"));J.id="toolTip";J.addClassName("nicetitle");J.update(A);var I=100,E=600;if(window.innerWidth){E=Math.min(E,window.innerWidth-20)}if(document.body&&document.body.scrollWidth){E=Math.min(E,document.body.scrollWidth-20)}var B=0;A.replace(/<br ?\/>/g,"\n").split("\n").each(function(P){B=Math.max(B,P.stripTags().length)});var D=B*7,O=B*10,N;if(D>I){N=D}else{if(I>O){N=O}else{N=I}}var C=L[0]+20,K=window.innerWidth||document.documentElement.clientWidth||document.body.offsetWidth,F=window.pageXOffset||document.documentElement.scrollLeft;if(K&&((C+N)>(K+F))){C=K-N-40+F}if(document.body.scrollWidth&&((C+N)>(document.body.scrollWidth+F))){C=document.body.scrollWidth-N-25+F}J.setStyle({left:Math.max(C,5)+"px",width:Math.min(N,E)+"px",top:(L[1]+10)+"px"});J.show();document.body.appendChild(J);this.current=J;if(typeof ToolTips_Option_Windowed_Controls!="undefined"){var G=$("iframe_tt");if(!G){G=$(document.createElement("IFRAME"));G.src="javascript:false;";G.name=G.id="iframe_tt";G.setAttribute("scrolling","no");G.setAttribute("frameborder",0);G.hide();document.body.appendChild(G)}G.setStyle({width:J.offsetWidth,height:J.offsetHeight,top:J.style.top,left:J.style.left,position:"absolute",display:"block",zIndex:99});J.setStyle({zIndex:100})}}catch(H){}}};Event.observe(window,"load",ToolTips.attachBehavior.bind(ToolTips));Event.observe(window,"unload",ToolTips.out.bind(ToolTips));