function opToolTip(d){var a=this;a.conDiv="";a.ie=document.all;a.toolDiv=d?d:"toolTip";a.customContainer=d?d:!1;a.cursorOffset=9;this.$ID=function(a){return document.getElementById(a)};this.stopEvent=function(a){if(!a)a=window.event;a.cancelBubble=!0;if(a.cancelBubble!=null)a.cancelBubble=!0;a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();if(window.event)a.returnValue=!1;if(a.cancel!=null)a.cancel=!0;return!1};this.getPosition=function(a){for(var b=y=0;a;)b+=a.offsetLeft,
y+=a.offsetTop,a=a.offsetParent;return{x:b,y:y}};this.getMouseCoor=function(a){var a=a||window.event,b=y=0;document.attachEvent!=null&&(b=a.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,y=a.clientY+document.documentElement.scrollTop+document.body.scrollTop);!document.attachEvent&&document.addEventListener&&(b=a.clientX+window.scrollX,y=a.clientY+window.scrollY);return{x:b,y:y}};this.getOffset=function(){var a=b=0;if(window.document.documentElement&&window.document.documentElement.scrollTop)var b=
window.document.documentElement.scrollTop;else if(window.document.body&&window.document.body.scrollTop)b=window.document.body.scrollTop;return{x:a,y:b}};this.show=function(c,b,f){(typeof $ID(a.toolDiv)=="undefined"||!$ID(a.toolDiv))&&a.createBox(a.toolDiv);if(a.ie7&&!a.$ID((a.customContainer?a.customContainer:"")+"toolTipTable"))a.$ID(a.toolDiv).innerHTML='<table id="'+(a.customContainer?a.customContainer:"")+'toolTipTable"><tr><td>'+a.$ID(a.toolDiv).innerHTML+"</td></tr></table>";var e=a.$ID(c).innerHTML;
a.$ID(a.toolDiv+"Con").innerHTML=e;a.$ID(a.toolDiv).style.display="block";a.$ID(a.toolDiv+"Close").style.display="block";a.$ID(c)&&this.addEvent(window,"resize",this.winOnResize);var c=a.$ID(a.toolDiv).offsetWidth,e=a.$ID(a.toolDiv).offsetHeight,h=a.getPosition(f).x,d=a.getPosition(f).y,g=y=0,i=a.$ID(a.toolDiv+"Arow").className.replace(/ topArrow/,"").replace(/ bottomArrow/,"").replace(/ leftArrow/,"").replace(/ rightArrow/,"");switch(b){case "top":y=d-(e+a.cursorOffset);g=h+a.cursorOffset-c/2;a.$ID(a.toolDiv+
"Arow").className=i+" topArrow";break;case "right":y=d+f.offsetHeight/2-e/2;g=h+f.offsetWidth+a.cursorOffset;a.$ID(a.toolDiv+"Arow").className=i+" rightArrow";break;case "left":g=h-a.cursorOffset-c;y=d-e/2;a.$ID(a.toolDiv+"Arow").className=i+" leftArrow";break;case "bottom":y=d+f.offsetHeight+a.cursorOffset,g=h+f.offsetWidth/2-c/2,a.$ID(a.toolDiv+"Arow").className=i+" bottomArrow"}a.$ID(a.toolDiv).style.left=g+"px";a.$ID(a.toolDiv).style.top=y+"px";if(a.$ID(a.toolDiv+"Close"))a.$ID(a.toolDiv+"Close").onclick=
function(){a.hide()}};this.hide=function(){if(a.$ID(a.toolDiv))a.$ID(a.toolDiv).style.display="none"};this.winOnResize=function(){a.hide()};this.createBox=function(c){var b=document.createElement("div");b.innerHTML='<div class="'+(a.customContainer?"toolTip":c)+' round5  shadow" id="'+c+'"><div id="'+c+'Arow" class=" bottomArrow">&nbsp;</div><div id="'+c+'Close" class="icon close">&nbsp;</div><div id="'+c+'Con" class="'+(a.customContainer?"toolTip":c)+'Con"></div></div>';window.document.body.appendChild(b)};
this.addEvent=function(a,b,d){var e=function(a){return d(a||window.event)};a.addEventListener?a.addEventListener(b,e,!1):a.attachEvent&&a.attachEvent("on"+b,e)}}var tooltip=new opToolTip;

