 ASPxClientSchedulerToolTip=_aspxCreateClass(ASPxClientControl,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.isVisible=false;this.maxContentWidth=300;this.widthBeforeArrow=20;this.offsetX=28;},Initialize:function(){this.constructor.prototype.Initialize.call(this);this.mainDiv=this.GetElementById("mainDiv");this.topLeftImage=this.GetElementById("topLeftImage");this.topMiddleImage=this.GetElementById("topMiddleImage");this.topRightImage=this.GetElementById("topRightImage");this.leftMiddleImage=this.GetElementById("leftMiddleImage");this.rightMiddleImage=this.GetElementById("rightMiddleImage");this.bottomLeftImage=this.GetElementById("bottomLeftImage");this.bottomLeftMiddleImage=this.GetElementById("bottomLeftMiddleImage");this.bottomRightMiddleImage=this.GetElementById("bottomRightMiddleImage");this.bottomRightImage=this.GetElementById("bottomRightImage");this.bottomArrowImage=this.GetElementById("bottomArrowImage");this.topLeftDiv=this.GetElementById("topLeftDiv");this.topMiddleDiv=this.GetElementById("topMiddleDiv");this.topRightDiv=this.GetElementById("topRightDiv");this.leftMiddleDiv=this.GetElementById("leftMiddleDiv");this.contentDiv=this.GetElementById("contentDiv");this.rightMiddleDiv=this.GetElementById("rightMiddleDiv");this.bottomLeftDiv=this.GetElementById("bottomLeftDiv");this.bottomRightDiv=this.GetElementById("bottomRightDiv");this.bottomLeftMiddleDiv=this.GetElementById("bottomLeftMiddleDiv");this.bottomArrowDiv=this.GetElementById("bottomArrowDiv");this.bottomRightMiddleDiv=this.GetElementById("bottomRightMiddleDiv");this.toolTipParent=_aspxGetParentNode(this.mainDiv);this.mainDiv.isToolTip=true;if(this.isVisible)this.ShowToolTip();},HideToolTip:function(){if(!this.isVisible)return;this.isVisible=false;_aspxSetElementDisplay(this.mainDiv,false);},ShowToolTip:function(documentX,documentY){this.isVisible=true;_aspxSetElementVisibility(this.mainDiv,false);_aspxSetElementDisplay(this.mainDiv,true);this.contentDiv.style.width="";this.contentDiv.style.height="";var topHeight=this.topLeftImage.offsetHeight;var bottomHeight=this.bottomLeftImage.offsetHeight;var bottomArrowHeight=this.bottomArrowImage.offsetHeight;var leftWidth=this.topLeftImage.offsetWidth;var rightWidth=this.topRightImage.offsetWidth;var bottomArrowWidth=this.bottomArrowImage.offsetWidth;var contentWidth=this.contentDiv.offsetWidth;if(contentWidth<bottomArrowWidth+this.widthBeforeArrow*2)this.contentDiv.style.width=bottomArrowWidth+this.widthBeforeArrow*2+"px";else if(this.contentDiv.offsetWidth>this.maxContentWidth)this.contentDiv.style.width=this.maxContentWidth+"px";var contentWidth=this.contentDiv.offsetWidth;var contentHeight=this.contentDiv.offsetHeight;this.SetDivPosition(this.topLeftDiv,0,0);this.SetDivPosition(this.topMiddleDiv,leftWidth,0);this.SetDivPosition(this.topRightDiv,leftWidth+contentWidth,0);this.SetDivPosition(this.leftMiddleDiv,0,topHeight);this.SetDivPosition(this.rightMiddleDiv,leftWidth+contentWidth,topHeight);this.SetDivPosition(this.bottomLeftDiv,0,topHeight+contentHeight);this.SetDivPosition(this.bottomLeftMiddleDiv,leftWidth,topHeight+contentHeight);this.SetDivPosition(this.bottomArrowDiv,leftWidth+this.widthBeforeArrow,topHeight+contentHeight);this.SetDivPosition(this.bottomRightMiddleDiv,leftWidth+this.widthBeforeArrow+bottomArrowWidth,topHeight+contentHeight);this.SetDivPosition(this.bottomRightDiv,leftWidth+contentWidth,topHeight+contentHeight);this.SetDivPosition(this.contentDiv,leftWidth,topHeight);this.topMiddleDiv.style.width=contentWidth+"px";this.bottomLeftMiddleDiv.style.width=this.widthBeforeArrow+"px";this.bottomRightMiddleDiv.style.width=Math.max(contentWidth-this.widthBeforeArrow-bottomArrowWidth,0)+"px";this.leftMiddleDiv.style.height=contentHeight+"px";this.rightMiddleDiv.style.height=contentHeight+"px";this.leftMiddleDiv.style.width=leftWidth+"px";this.rightMiddleDiv.style.width=rightWidth+"px";this.bottomArrowDiv.style.width=bottomArrowWidth;this.topMiddleDiv.style.height=topHeight;var positionX=documentX-this.offsetX-_aspxGetAbsoluteX(this.toolTipParent);var positionY=documentY-topHeight-contentHeight-bottomArrowHeight-_aspxGetAbsoluteY(this.toolTipParent);this.SetDivPosition(this.mainDiv,positionX,positionY);_aspxSetElementVisibility(this.mainDiv,true);},SetDivPosition:function(element,left,dxtop){element.style.left=left+"px";element.style.top=dxtop+"px";},AdjustImageWidth:function(element){},AdjustCellSize:function(cell,image){},GetElementById:function(id){return _aspxGetElementById(this.name+"_"+id);},SetContent:function(content){this.contentDiv.innerHTML=content;}}); 