﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadToolTipControllerClass=function(){
this._tooltipToShow=null;
this._activeToolTip=null;
this._registerGlobalBodyEventHandlers();
};
Telerik.Web.UI.RadToolTipControllerClass.prototype={_registerGlobalBodyEventHandlers:function(){
var _1=Function.createDelegate(this,function(e){
if(e.keyCode==27){
if(this._activeToolTip&&!this._activeToolTip.isModal()){
this._hideCurrentToolTipNoAnimation();
}
}
});
var _3=Function.createDelegate(this,function(e){
this._hideOnBodyClick(e);
});
Sys.Application.add_init(function(){
$addHandler(document.body,"keydown",_1);
$addHandler(document.body,"click",_3);
});
Sys.Application.add_unload(function(){
$removeHandler(document.body,"keydown",_1);
$removeHandler(document.body,"click",_3);
});
},_hideOnBodyClick:function(e){
var _6=false;
if(this._activeToolTip!=null&&!this._activeToolTip.isModal()){
var _7=this._activeToolTip;
if($telerik.isMouseOverElementEx(_7._tableElement,e)){
return;
}
_6=this._activeToolTip._hideIfNotManualCloseOrFromCode();
}
if(_6){
this._activeToolTip=null;
}
},_cancelLastShowRequest:function(){
if(this._tooltipToShow){
var _8=this._tooltipToShow;
this._tooltipToShow=null;
_8.cancelShowDelay();
}
},_hideCurrentToolTipNoAnimation:function(){
this._cancelLastShowRequest();
if(this._activeToolTip!=null){
this._activeToolTip._hideNoAnimation();
}
this._activeToolTip=null;
},requestShow:function(_9){
this._cancelLastShowRequest();
var _a=this._activeToolTip;
if(_a==_9){
return;
}else{
if(_a){
_a._hideIfNotManualCloseOrFromCode();
}
}
this._tooltipToShow=_9;
},cancelSpecificShowRequest:function(_b){
if(this._tooltipToShow==_b){
this._cancelLastShowRequest();
}
},showTooltip:function(_c){
if(!_c||_c.isVisible()){
return;
}
this._cancelLastShowRequest();
this.set_activeToolTip(_c);
_c.show();
},notifyToolTipClosed:function(_d){
if(this._activeToolTip==_d){
this._activeToolTip=null;
}
},set_activeToolTip:function(_e){
if(_e!=this._activeToolTip){
this._hideCurrentToolTipNoAnimation();
}
this._activeToolTip=_e;
},get_activeToolTip:function(){
return this._activeToolTip;
},getInstance:function(){
return this;
}};
Telerik.Web.UI.RadToolTipControllerClass.registerClass("Telerik.Web.UI.RadToolTipControllerClass",null);
if(!Telerik.Web.UI.RadToolTipController){
Telerik.Web.UI.RadToolTipController=new Telerik.Web.UI.RadToolTipControllerClass();
}
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadToolTip=function(_f){
Telerik.Web.UI.RadToolTip.initializeBase(this,[_f]);
this._offsetX=0;
this._offsetY=6;
this._position=Telerik.Web.UI.ToolTipPosition.BottomCenter;
this._horizontalPosition=null;
this._verticalPosition=null;
this._targetControlID=null;
this._serverTargetControlID=null;
this._serverValue="";
this._formID=null;
this._targetControl=null;
this._popupElement=null;
this._tableElement=null;
this._contentCell=null;
this._titleElement=null;
this._contentElement=null;
this._calloutElement=null;
this._closeLink=null;
this._popupBehavior=null;
this._modal=false;
this._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._skin="Default";
this._title="";
this._text="";
this._width="";
this._height="";
this._relativeTo=Telerik.Web.UI.ToolTipRelativeDisplay.Mouse;
this._contentScrolling=Telerik.Web.UI.ToolTipScrolling.Default;
this._showEvent=Telerik.Web.UI.ToolTipShowEvent.OnMouseOver;
this._hideEvent=Telerik.Web.UI.ToolTipHideEvent.Default;
this._visibleOnPageLoad=false;
this._sticky=false;
this._manualClose=false;
this._mouseTrailing=false;
this._showCallout=true;
this._renderInPageRoot=false;
this._showDelayRef=null;
this._autoCloseRef=null;
this._showDelay=400;
this._autoCloseDelay=3000;
this._hideDelay=300;
this._animation=Telerik.Web.UI.ToolTipAnimation.None;
this._tooltipAnimation=null;
this._zIndex=8000;
};
Telerik.Web.UI.RadToolTip.getCurrent=function(){
var _10=Telerik.Web.UI.RadToolTipController.getInstance();
if(!_10){
return null;
}
return _10.get_activeToolTip();
};
Telerik.Web.UI.RadToolTip.prototype={get_zIndex:function(){
return this._zIndex;
},set_zIndex:function(_11){
var _12=parseInt(_11);
if(isNaN(_11)){
return;
}
if(this._zIndex!=_11){
this._zIndex=_11;
}
},initialize:function(){
Telerik.Web.UI.RadToolTip.callBaseMethod(this,"initialize");
this.set_position(this._position);
var _13=this.get_targetControl();
if(_13!=null){
var _14=_13.getAttribute("_rfddecoratedID");
if(_14){
this.set_targetControl($get(_14));
}
}
var _15=this.get_targetControlID();
var _16=$get(_15+"_text");
if(_16&&_15){
var _17=$find(_15);
if(_17&&Object.getType(_17).inheritsFrom(Telerik.Web.UI.RadInputControl)){
this.set_targetControlID(_15+"_text");
}
}
var _18=this.get_text();
if(this._targetControl&&!_18){
_18=this._targetControl.getAttribute("title");
if(_18){
this._targetControl.removeAttribute("title");
}
this._text=_18;
}
var _19=$telerik.getCurrentStyle(this.get_element(),"zIndex");
if(null!=_19){
this.set_zIndex(_19);
}
if(this._visibleOnPageLoad){
setTimeout(Function.createDelegate(this,function(){
this.show();
}),0);
}
},dispose:function(){
if(this._tooltipAnimation){
this._tooltipAnimation.dispose();
}
if(this._popupBehavior){
this._popupBehavior.dispose();
this._popupBehavior=null;
}
this._registerPopupHandlers(false);
this._registerMouseHandlers(this._targetControl,false);
this._makeModal(false);
if(this._closeLinkHandler&&this._closeLink){
$clearHandlers(this._closeLink);
this._closeLinkHandler=null;
}
if(this._popupElement){
var _1a=this.get_id();
if(_1a){
var _1b=$get(_1a);
if(_1b){
_1b.appendChild(this._popupElement);
}
}
}
Telerik.Web.UI.RadToolTip.callBaseMethod(this,"dispose");
},isCreated:function(){
return this._popupElement!=null;
},get_leaveTargetAndToolTip:function(){
return this.isHideEventEnabled(Telerik.Web.UI.ToolTipHideEvent.LeaveTargetAndToolTip);
},isHideEventEnabled:function(_1c){
return _1c&this._hideEvent;
},hide:function(){
this._hideUnconditionally();
},_hideIfNotManualCloseOrFromCode:function(){
var _1d=this.isHideEventEnabled(Telerik.Web.UI.ToolTipHideEvent.FromCode);
var _1e=this.get_manualClose();
if(_1e||_1d){
return false;
}
this._hideUnconditionally();
return true;
},_hideUnconditionally:function(){
if(!this.isVisible()){
return;
}
this._hide();
},_hideNoAnimation:function(){
this._hide(false);
},_hide:function(_1f){
if(this._animation!=Telerik.Web.UI.ToolTipAnimation.None){
$telerik.$(this._popupElement).stop();
}
this.cancelHideDelay();
this.cancelShowDelay();
this.cancelAutoCloseDelay();
var _20=new Sys.CancelEventArgs();
this.raiseEvent("beforeHide",_20);
if(_20.get_cancel()){
return;
}
if(this._animation!=Telerik.Web.UI.ToolTipAnimation.None){
this._calloutElement.style.display="none";
var fnc=Function.createDelegate(this,this._afterHide);
$telerik.$(this._popupElement).fadeOut(500,fnc);
}else{
this._afterHide();
}
},_afterHide:function(){
try{
if(this._popupBehavior){
this._popupBehavior.hide();
this._popupBehavior.pin(false);
}
}
catch(ex){
}
this._getToolTipController().notifyToolTipClosed(this);
this.raiseEvent("hide");
this._registerPopupHandlers(false);
},clone:function(_22,_23){
if(!_22){
alert("clone error: No target element specified");
return;
}
var evs=this._getEventsParameter();
var _25=this._getPropertiesParameter();
_25["targetControlID"]=_22.getAttribute("id");
if(!_25["targetControlID"]){
_25["targetControl"]=_22;
}
var _26=document.createElement("SPAN");
if(_23){
_26.setAttribute("id",_23);
}
var _27=$create(Telerik.Web.UI.RadToolTip,_25,evs,null,_26);
return _27;
},show:function(){
this._createUI();
var _28=new Sys.CancelEventArgs();
this.raiseEvent("beforeShow",_28);
if(_28.get_cancel()){
return;
}
this._popupBehavior.pin(false);
window.setTimeout(Function.createDelegate(this,function(){
this._getToolTipController().set_activeToolTip(this);
if(this._animation==Telerik.Web.UI.ToolTipAnimation.None){
this._show();
this._afterShow();
}else{
this._playAnimation();
}
}),0);
},updateLocation:function(){
this._show();
},showLoadingMessage:function(_29){
var _2a=this._getFullSkinName();
var _2b="rtLoading";
if(_29){
Sys.UI.DomElement.addCssClass(this._contentCell,_2a);
Sys.UI.DomElement.addCssClass(this._contentCell,_2b);
}else{
Sys.UI.DomElement.removeCssClass(this._contentCell,_2a);
Sys.UI.DomElement.removeCssClass(this._contentCell,_2b);
}
},isModal:function(){
return this._modal;
},set_contentElement:function(_2c){
this._contentCell.innerHTML="";
if(_2c.parentNode&&_2c.parentNode.removeChild){
_2c.parentNode.removeChild(_2c);
}
this._contentCell.appendChild(_2c);
_2c.style.display="";
this._contentElement=_2c;
this._setOverflow();
this.showLoadingMessage(false);
},get_contentElement:function(){
return this._contentElement;
},set_content:function(_2d){
this._text=_2d;
if(this.isCreated()){
var _2e=document.createElement("DIV");
_2e.innerHTML=_2d;
this.set_contentElement(_2e);
}
},get_content:function(){
return this._contentElement?this._contentElement.innerHTML:"";
},cancelHideDelay:function(){
if(this._hideDelayRef){
window.clearTimeout(this._hideDelayRef);
this._hideDelayRef=0;
}
},cancelAutoCloseDelay:function(){
if(this._autoCloseRef){
window.clearTimeout(this._autoCloseRef);
this._autoCloseRef=0;
}
},cancelShowDelay:function(){
if(this._showDelayRef){
window.clearTimeout(this._showDelayRef);
this._showDelayRef=null;
}
this._getToolTipController().cancelSpecificShowRequest(this);
},_getToolTipController:function(){
return Telerik.Web.UI.RadToolTipController.getInstance();
},_resetAutoCloseDelay:function(){
this.cancelAutoCloseDelay();
if(this.get_manualClose()||this.get_sticky()){
return;
}
if(this._autoCloseDelay){
this._autoCloseRef=window.setTimeout(Function.createDelegate(this,function(){
this._hideIfNotManualCloseOrFromCode();
}),this._autoCloseDelay);
}
},_resetShowDelay:function(){
this.cancelShowDelay();
var _2f=Function.createDelegate(this,function(){
this._getToolTipController().showTooltip(this);
this.cancelShowDelay();
});
this._showDelayRef=window.setTimeout(_2f,this._showDelay);
},_resetHideDelay:function(){
this.cancelHideDelay();
if(this._hideDelay>0){
this._hideDelayRef=window.setTimeout(Function.createDelegate(this,function(){
this._hideIfNotManualCloseOrFromCode();
}),this._hideDelay);
}else{
this._hideIfNotManualCloseOrFromCode();
}
},_show:function(){
var _30=null;
try{
_30=this.getToolTipBounds();
}
catch(e){
var _31=this;
window.setTimeout(function(){
_31._addToolTipToDocument();
},10);
return;
}
this._setPopupVisible(_30.x,_30.y);
},_afterShow:function(){
this._registerPopupHandlers(true);
this._popupBehavior.pin(this._isRelativeToBrowserWindow());
this._resetAutoCloseDelay();
this._adjustCallout();
this.raiseEvent("show");
},_isRelativeToBrowserWindow:function(){
if(!this._targetControl||this._relativeTo==Telerik.Web.UI.ToolTipRelativeDisplay.BrowserWindow){
return true;
}
return false;
},_playAnimation:function(){
var _32=Function.createDelegate(this,function(){
var _33=this.getToolTipBounds();
this._setPopupVisible(_33.x,_33.y);
var _34=$telerik.getBounds(this._tableElement);
$telerik.$(this._popupElement).hide();
return _34;
});
var _35=_32();
var _36=Function.createDelegate(this,function(){
if(this._isRelativeToBrowserWindow()){
this._documentOverflowX=document.documentElement.style.overflowX;
document.documentElement.style.overflowX="hidden";
}
if(this.get_showCallout()&&this._calloutElement){
this._calloutElement.style.display="none";
}
});
var _37=Function.createDelegate(this,function(){
this._popupElement.style.filter="";
this.get_popupElement().style.opacity="";
if(this.get_showCallout()&&this._calloutElement){
this._calloutElement.style.display="";
}
this._show();
if(null!=this._documentOverflowX){
document.documentElement.style.overflowX=this._documentOverflowX;
this._documentOverflowX=null;
}
this._afterShow();
});
var _38=this._popupElement;
var _39=this._animation;
var _3a=""+this._position;
var _3b=this._isRelativeToBrowserWindow();
if(_3b&&this._verticalPosition!=2){
vp=(this._verticalPosition==1?3:1);
_3a=parseInt(vp+""+this._horizontalPosition);
}
var _3c=_3b?document.documentElement:this._targetControl;
var _3d=_3c?$telerik.getBounds(_3c):new Sys.UI.Bounds(1,1,1,1);
window.setTimeout(function(){
Telerik.Web.UI.Animations.playJQueryAnimation(_38,_39,_3d,_35,_3a,_36,_37);
},0);
},_makeModal:function(_3e){
if(this._onModalShowHandler){
this.remove_show(this._onModalShowHandler);
this._onModalShowHandler=null;
}
if(this._onModalCloseHandler){
this.remove_hide(this._onModalCloseHandler);
this._onModalCloseHandler=null;
}
if(this._modalExtender){
this._modalExtender.dispose();
this._modalExtender=null;
}
if(!_3e){
return;
}
this._onModalShowHandler=function(_3f){
if(!_3f._modalExtender){
_3f._modalExtender=new Telerik.Web.UI.ModalExtender(_3f._popupElement);
}
_3f._modalExtender.show();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(_40){
if(_40._modalExtender){
_40._modalExtender.hide();
}
};
this.add_hide(this._onModalCloseHandler);
},_onMouseOver:function(e){
this._logMousePosition(e);
this._resetShowDelay();
this.cancelHideDelay();
this.cancelAutoCloseDelay();
this._getToolTipController().requestShow(this);
},_onMouseMove:function(e){
this._logMousePosition(e);
this._resetAutoCloseDelay();
if(this._mouseTrailing&&this.isVisible()){
this._show();
}
},_onMouseOut:function(e){
if(!this.isVisible()){
this.cancelShowDelay();
return;
}
var _44=$telerik.isMouseOverElementEx(this._targetControl,e);
if(!_44){
this.cancelShowDelay();
if(!this.get_sticky()){
this._resetHideDelay();
}
}
},_onClick:function(e){
this._onMouseOver(e);
return $telerik.cancelRawEvent(e);
},_onRightClick:function(e){
this._onMouseOver(e);
return $telerik.cancelRawEvent(e);
},_registerMouseHandlers:function(_47,_48){
if(true==_48){
var _49={};
var _4a=Telerik.Web.UI.ToolTipShowEvent;
if(this._showEvent==_4a.OnMouseOver){
this._onMouseOverDelegate=Function.createDelegate(this,this._onMouseOver);
this._onMouseMoveDelegate=Function.createDelegate(this,this._onMouseMove);
this._onMouseOutDelegate=Function.createDelegate(this,this._onMouseOut);
$telerik.addExternalHandler(_47,"mouseover",this._onMouseOverDelegate);
$telerik.addExternalHandler(_47,"mousemove",this._onMouseMoveDelegate);
$telerik.addExternalHandler(_47,"mouseout",this._onMouseOutDelegate);
}
if(this._showEvent==_4a.OnClick){
this._onClickDelegate=Function.createDelegate(this,this._onClick);
$telerik.addExternalHandler(_47,"click",this._onClickDelegate);
}
if(this._showEvent==_4a.OnRightClick){
this._onRightClickDelegate=Function.createDelegate(this,this._onRightClick);
$telerik.addExternalHandler(_47,"contextmenu",this._onRightClickDelegate);
}
if(this._showEvent==_4a.OnFocus){
this._onFocusDelegate=Function.createDelegate(this,this._onMouseOver);
this._onBlurDelegate=Function.createDelegate(this,this._onMouseOut);
$telerik.addExternalHandler(_47,"focus",this._onFocusDelegate);
$telerik.addExternalHandler(_47,"blur",this._onBlurDelegate);
}
}else{
if(_47){
var _4b=[["mouseover",this._onMouseOverDelegate],["mousemove",this._onMouseMoveDelegate],["mouseout",this._onMouseOutDelegate],["click",this._onClickDelegate],["contextmenu",this._onRightClickDelegate],["focus",this._onFocusDelegate],["blur",this._onBlurDelegate]];
for(var i=0;i<_4b.length;i++){
var _4d=_4b[i];
try{
if(null!=_4d[1]){
$telerik.removeExternalHandler(_47,_4d[0],_4d[1]);
}
}
catch(e){
}
}
this._onMouseOverDelegate=null;
this._onMouseMoveDelegate=null;
this._onMouseOutDelegate=null;
this._onClickDelegate=null;
this._onRightClickDelegate=null;
this._onFocusDelegate=null;
this._onBlurDelegate=null;
}
}
},_registerPopupHandlers:function(_4e){
if(true==_4e){
if(this.get_sticky()){
this._popupStickyHandler=Function.createDelegate(this,this._onPopupStickyMouseOut);
$addHandler(this._tableElement,"mouseout",this._popupStickyHandler);
}else{
if(this.get_leaveTargetAndToolTip()){
this._popupEnterHandler=Function.createDelegate(this,this._onPopupEnterToolTip);
$addHandler(this._tableElement,"mouseover",this._popupEnterHandler);
this._popupLeaveHandler=Function.createDelegate(this,this._onPopupLeaveToolTip);
$addHandler(this._tableElement,"mouseout",this._popupLeaveHandler);
}
}
}else{
if(this._popupStickyHandler||this._popupEnterHandler||this._popupLeaveHandler){
$clearHandlers(this._tableElement);
this._popupStickyHandler=null;
this._popupEnterHandler=null;
this._popupLeaveHandler=null;
}
}
},_onPopupStickyMouseOut:function(e){
var _50=$telerik.isMouseOverElementEx(this._tableElement,e);
if(!_50){
this._hideIfNotManualCloseOrFromCode();
}
},_onPopupEnterToolTip:function(e){
var _52=$telerik.isMouseOverElementEx(this._tableElement,e);
if(_52){
this.cancelHideDelay();
this.cancelAutoCloseDelay();
}
},_onPopupLeaveToolTip:function(e){
var _54=$telerik.isMouseOverElementEx(this._tableElement,e);
if(!_54){
this._resetHideDelay();
this._resetAutoCloseDelay();
}
},_getPropertiesParameter:function(){
if(!this._propertiesParameter){
var _55={};
var _56=Telerik.Web.UI.RadToolTip.prototype;
for(var _57 in _56){
var _58=this[_57];
if(typeof (_58)=="function"&&_57.indexOf("get_")==0){
var _59=_57.substring(4);
if(null==this["set_"+_59]){
continue;
}
var _5a=_58.call(this);
if(null==_5a){
continue;
}
_55[_59]=_5a;
if(_59=="skin"){
break;
}
}
}
this._propertiesParameter=_55;
}
var _5b=this._cloneObject(this._propertiesParameter);
return _5b;
},_cloneObject:function(_5c){
var _5d={};
for(var _5e in _5c){
_5d[_5e]=_5c[_5e];
}
return _5d;
},_getEventsParameter:function(){
if(!this._eventsParameter){
var _5f={};
var _60=this.get_events();
var _61=["beforeShow","show","beforeHide","hide"];
for(var i=0;i<_61.length;i++){
var _63=_61[i];
var _64=_60.getHandler(_63);
if(_64&&typeof (eval(_64))=="function"){
_5f[_63]=eval(_64);
}
}
this._eventsParameter=_5f;
}
return this._eventsParameter;
},_getPosRelativeToMouse:function(_65){
var _66=_65.x;
var _67=_65.y;
var pos=this._getMousePosition();
var _69=pos.clientX;
var _6a=pos.clientY;
var _6b=$telerik.standardsMode;
if(!$telerik.isIE&&document.compatMode!="CSS1Compat"){
_6b=false;
}else{
if($telerik.isSafari){
_6b=false;
}
}
if(_6b){
_66-=$telerik.getCorrectScrollLeft(document.documentElement);
_67-=document.documentElement.scrollTop;
}else{
_66-=$telerik.getCorrectScrollLeft(document.body);
_67-=document.body.scrollTop;
}
var _6c=_69-_66;
var _6d=_6a-_67;
return {x:_6c,y:_6d};
},_logMousePosition:function(e){
if(!e){
return;
}
this._mouseX=e.clientX;
this._mouseY=e.clientY;
},_getMousePosition:function(){
var obj={};
obj.clientX=this._mouseX;
obj.clientY=this._mouseY;
return obj;
},_getCalloutBounds:function(){
var _70={width:0,height:0,marginLeft:0,marginTop:0};
if(this._showCallout&&this._calloutElement){
_70.marginLeft=parseInt($telerik.getCurrentStyle(this._calloutElement,"marginLeft"));
_70.marginTop=parseInt($telerik.getCurrentStyle(this._calloutElement,"marginTop"));
if(isNaN(_70.marginLeft)){
_70.marginLeft=0;
}
if(isNaN(_70.marginTop)){
_70.marginTop=0;
}
var _71=$telerik.getBounds(this._calloutElement);
if(_71){
if(_71.width){
_70.width=_71.width;
}
if(_71.height){
_70.height=_71.height;
}
}
}
return _70;
},_getBoundsRelativeToBrowser:function(_72,_73,_74){
var _75=this._horizontalPosition;
var _76=this._verticalPosition;
var x=0;
var y=0;
if(!_74){
_74=$telerik.getClientBounds();
}
var _79=$telerik.getScrollOffset(document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body);
if("fixed"!=this._popupElement.style.position){
x+=_79.x;
y+=_79.y;
}
switch(_75){
case 2:
x+=-parseInt(_72.width/2-_74.width/2);
x+=this._offsetX;
break;
case 3:
x+=_74.width;
x-=_72.width;
x-=this._offsetX;
break;
case 1:
default:
x+=-_72.width;
x+=(-_73.width-_73.marginLeft);
x+=this._offsetX;
break;
}
switch(_76){
case 2:
y+=-parseInt((_72.height-_74.height)/2);
break;
case 1:
y+=this._offsetY;
break;
case 3:
default:
y+=_74.height;
y-=this._offsetY;
y-=_72.height;
break;
}
return new Sys.UI.Bounds(x,y,_72.width,_72.height);
},_getBoundsRelativeToElement:function(_7a,_7b,_7c){
var _7d=this._horizontalPosition;
var _7e=this._verticalPosition;
var x=0;
var y=0;
if(!_7c){
_7c=$telerik.getBounds(this._targetControl);
}
switch(_7d){
case 2:
x+=-parseInt(_7a.width/2-_7c.width/2);
x+=this._offsetX;
break;
case 3:
x+=_7c.width;
x-=_7b.marginLeft;
x+=this._offsetX;
break;
case 1:
default:
x+=-_7a.width;
x+=(-_7b.width-_7b.marginLeft);
x-=this._offsetX;
break;
}
switch(_7e){
case 2:
y+=-parseInt(_7a.height/2-_7c.height/2);
y+=this._offsetY;
break;
case 1:
y-=_7a.height;
y-=_7b.height+_7b.marginTop;
y-=this._offsetY;
break;
case 3:
default:
y+=_7c.height;
y-=_7b.marginTop;
y+=this._offsetY;
break;
}
return new Sys.UI.Bounds(x,y,_7a.width,_7a.height);
},_getBoundsRelativeToMouse:function(_81,_82,_83){
var _83=this._targetControl?$telerik.getBounds(this._targetControl):$telerik.getClientBounds();
var pos=this._getPosRelativeToMouse(_83);
if(isNaN(pos.x)){
pos.x=0;
pos.y=0;
}else{
_83.width=0;
_83.height=0;
}
var _85=this._getBoundsRelativeToElement(_81,_82,_83);
var _86=new Sys.UI.Bounds(pos.x+_85.x,pos.y+_85.y,_81.width,_81.height);
return _86;
},getToolTipBounds:function(){
var _87=this._popupElement;
var _88=(_87.style.display=="none")?true:false;
if(_88){
_87.style.visibility="hidden";
}
_87.style.display="";
this._setOverflow();
if(this._firstShow!=true){
this._fixIeHeight(this._tableElement,this._height);
this._firstShow=true;
}
var _89=this._isRelativeToBrowserWindow()?document.documentElement:this._targetControl;
this._popupBehavior.set_parentElement(_89);
var _8a=$telerik.getBounds(this._tableElement);
var _8b=this._getCalloutBounds();
if(_88){
this._popupElement.style.display="none";
_87.style.visibility="";
}
var _8c=Telerik.Web.UI.ToolTipRelativeDisplay;
var _8d=Telerik.Web.UI.ToolTipShowEvent;
var _8e=null;
if(this._relativeTo==_8c.BrowserWindow){
_8e=this._getBoundsRelativeToBrowser(_8a,_8b);
}else{
if(!this._targetControl&&this._showEvent==_8d.FromCode){
_8e=this._getBoundsRelativeToBrowser(_8a,_8b);
}else{
if(this._targetControl&&this._showEvent==_8d.FromCode){
_8e=this._getBoundsRelativeToElement(_8a,_8b);
}else{
if((this._mouseTrailing||this._relativeTo==_8c.Mouse)){
_8e=this._getBoundsRelativeToMouse(_8a,_8b);
}else{
if(this._relativeTo==_8c.Element){
_8e=this._getBoundsRelativeToElement(_8a,_8b);
}
}
}
}
}
return _8e;
},_fixIeHeight:function(_8f,_90){
if("CSS1Compat"==document.compatMode){
var _91=(_8f.offsetHeight-parseInt(_90));
if(_91>0){
var _92=(parseInt(_8f.style.height)-_91);
if(_92>0){
_8f.style.height=_92+"px";
}
}
}
},_refreshTitle:function(){
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._titleElement.style.display=(this._title)?"":"none";
},_createManualCloseButton:function(_93){
if(this.get_manualClose()){
var _94=document.createElement("A");
_94.href="javascript: void(0);";
_94.className="rtCloseButton";
this._closeLinkHandler=Function.createDelegate(this,function(e){
this._hideUnconditionally();
return $telerik.cancelRawEvent(e);
});
$addHandler(_94,"click",this._closeLinkHandler);
this._closeLink=_94;
var _96=document.createElement("SPAN");
_96.innerHTML="Close";
_94.title="Close";
_94.appendChild(_96);
_93.appendChild(_94);
}
},_createUI:function(){
if(!this._popupElement){
var _97=this.get_id();
var _98="RadToolTipWrapper_"+_97;
var _99=document.createElement("DIV");
_99.id=_98;
var _9a=this.get_element();
var _9b=_9a.parentNode?_9a:this._getDefaultParent();
var _9c=$telerik.isRightToLeft(_9b);
_99.className=this._getFullSkinName()+(this.get_showCallout()?" rtVisibleCallout":"")+(_9c?" RadToolTip_"+this._skin+"_rtl":"");
_99.setAttribute("unselectable","on");
this._popupElement=_99;
var _9d=document.createElement("DIV");
_9d.className="rtCallout "+this._getCalloutPosition(this._position);
_9d.innerHTML="&nbsp;";
this._calloutElement=_9d;
var _9e=document.createElement("TABLE");
_9e.className="rtWrapper";
_9e.style.width=this._width;
_9e.style.height=this._height;
this._tableElement=_9e;
var _9f=[];
if(_9c){
_9f=["rtWrapperTopRight","rtWrapperTopCenter","rtWrapperTopLeft","rtWrapperRightMiddle","rtWrapperContent","rtWrapperLeftMiddle","rtWrapperBottomRight","rtWrapperBottomCenter","rtWrapperBottomLeft"];
}else{
_9f=["rtWrapperTopLeft","rtWrapperTopCenter","rtWrapperTopRight","rtWrapperLeftMiddle","rtWrapperContent","rtWrapperRightMiddle","rtWrapperBottomLeft","rtWrapperBottomCenter","rtWrapperBottomRight"];
}
var _a0=0;
for(var i=1;i<=3;i++){
var _a2=_9e.insertRow(-1);
for(var j=1;j<=3;j++){
var _a4=_a2.insertCell(-1);
_a4.innerHTML="&nbsp;";
_a4.className=_9f[_a0];
_a0++;
}
}
var _a5=_9e.rows[0].cells[1];
_a5.innerHTML="";
if(_9c){
this._createManualCloseButton(_a5);
}
var _a6=document.createElement("DIV");
_a6.className="rtTitlebar";
_a6.style.display="none";
this._titleElement=_a6;
this._refreshTitle();
_a5.appendChild(_a6);
if(!_9c){
this._createManualCloseButton(_a5);
}
var _a7=_9e.rows[1].cells[1];
_a7.vAlign="top";
_a7.innerHTML="";
this._contentCell=_a7;
var _a8=null;
var _a8=null;
if(this._text){
this.set_content(this._text);
}else{
var _a9=this.get_id();
if(_a9){
_a8=$get(_a9);
}
if(_a8&&_a8.innerHTML){
var _aa=this._transferNodeChildren(_a8);
this.set_contentElement(_aa);
}
}
_99.appendChild(_9d);
_99.appendChild(_9e);
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
this._addToolTipToDocument(_a8);
}
if(!this._popupBehavior){
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{"id":(new Date()-100)+"PopupBehavior","parentElement":this._targetControl},null,null,this._popupElement);
}
},_transferNodeChildren:function(_ab){
if(!_ab){
return null;
}
var _ac=_ab.ownerDocument.createElement(_ab.tagName);
var _ad=0;
while(_ab.childNodes&&_ab.childNodes.length>_ad){
var _ae=_ab.childNodes[_ad];
if(this._clientStateFieldID&&_ae.id==this._clientStateFieldID){
_ad=1;
continue;
}
_ab.removeChild(_ae);
_ac.appendChild(_ae);
}
return _ac;
},_getDefaultParent:function(){
var _af=this._formID?document.getElementById(this._formID):null;
if(!_af){
if(document.forms&&document.forms.length>0){
_af=document.forms[0];
}else{
_af=document.body;
}
}
return _af;
},_addToolTipToDocument:function(_b0){
if(null!=_b0&&!this.get_renderInPageRoot()){
_b0.parentNode.insertBefore(this._popupElement,_b0);
return;
}
var _b1=this._getDefaultParent();
_b1.appendChild(this._popupElement);
},_getParentByTagName:function(_b2,_b3){
var _b4=_b2;
_b3=_b3.toUpperCase();
while(_b4.tagName.toUpperCase()!=_b3){
_b4=_b4.parentNode;
if(!_b4){
break;
}
}
return _b4;
},_getFullSkinName:function(){
return "RadToolTip_"+this._skin;
},_getUniqueString:function(){
return ""+(new Date()-100);
},_getCalloutPosition:function(_b5){
with(Telerik.Web.UI.ToolTipPosition){
switch(_b5){
case TopLeft:
return "rtCalloutBottomRight";
case TopCenter:
return "rtCalloutBottomCenter";
case TopRight:
return "rtCalloutBottomLeft";
case MiddleLeft:
return "rtCalloutMiddleRight";
case Center:
return "rtCalloutCenter";
case MiddleRight:
return "rtCalloutMiddleLeft";
case BottomLeft:
return "rtCalloutTopRight";
case BottomCenter:
return "rtCalloutTopCenter";
case BottomRight:
return "rtCalloutTopLeft";
}
}
return "";
},_getHorizontalSide:function(_b6){
return parseInt((_b6+"").charAt(1));
},_getVerticalSide:function(_b7){
return parseInt((_b7+"").charAt(0));
},_setPopupVisible:function(x,y){
this._popupElement.style.zIndex=this._zIndex;
this._popupBehavior.set_x(x);
this._popupBehavior.set_y(y);
this._popupBehavior.show();
if(!this.get_width()){
this._popupElement.style.width="";
}
},_setOverflow:function(){
var _ba=this._contentScrolling;
if(_ba==Telerik.Web.UI.ToolTipScrolling.Default){
return;
}
var el=this._contentElement;
if(!el||el.parentNode!=this._contentCell||((!el.document||!el.document.documentElement)&&$telerik.isIE)){
return;
}
var _bc="";
with(Telerik.Web.UI.ToolTipScrolling){
switch(_ba){
case Auto:
_bc="auto";
break;
case None:
_bc="hidden";
break;
case X:
_bc="";
el.style.overflowX="scroll";
el.style.overflowY="hidden";
break;
case Y:
_bc="";
el.style.overflowY="scroll";
el.style.overflowX="hidden";
break;
case Both:
_bc="scroll";
}
}
var _bd=el.parentNode;
el.style.display="none";
var _be=$telerik.getBounds(_bd);
el.style.width=_be.width+"px";
el.style.height=_be.height+"px";
if(!el.style.overflowX&&!el.style.overflowY){
el.style.overflow=_bc;
}
el.style.display="";
},_getLeftOffset:function(){
var _bf=Telerik.Web.UI.ToolTipPosition;
if(_bf.Left==this._position){
return (-1*this._targetControl.offsetWidth)+this._offsetX;
}else{
if(_bf.Right==this._position){
return this._targetControl.offsetWidth+this._offsetX;
}else{
return this._offsetX;
}
}
},_getTopOffset:function(){
var _c0;
var _c1=Telerik.Web.UI.ToolTipPosition;
if(_c1.Top==this._position){
_c0=(-1*this._targetControl.offsetHeight)+this._offsetY;
}else{
if(_c1.Bottom==this._position){
_c0=this._targetControl.offsetHeight+this._offsetY;
}else{
_c0=this._offsetY;
}
}
return _c0;
},_adjustCallout:function(){
if(this.get_showCallout()&&this.get_position()!=22){
var _c2=this.get_targetControl();
if(!_c2){
return;
}
var _c3=$telerik.getBounds(_c2);
var _c4=this.get_popupElement();
var _c5=$telerik.getBounds(_c4);
var _c6=_c4.getElementsByTagName("DIV")[0];
_c6.style.left="";
_c6.style.top="";
var _c7=$telerik.getBounds(_c6);
var _c8=this.get_position();
var _c9=false;
_c6.style.visibility="hidden";
if(_c3.x>_c7.x){
_c9=(_c8==13||_c8==23||_c8==33);
}else{
_c9=(_c8==11||_c8==21||_c8==31);
}
if(_c9){
return;
}
if(_c3.y>_c7.y){
_c9=(_c8==32);
}else{
_c9=(_c8==12);
}
if(_c9){
return;
}
_c6.style.visibility="visible";
var _ca=null;
var top=null;
if(this._verticalPosition==2){
if(_c3.y<_c7.y&&(_c3.y+_c3.height)>_c7.y){
return;
}
var _cc=_c5.y-_c3.y;
top=(Math.abs(_cc)+Math.floor(_c6.offsetHeight));
}else{
if(_c3.x<_c7.x&&(_c3.x+_c3.width)>_c7.x){
return;
}
var _cc=_c5.x-_c3.x;
var _cd=this._horizontalPosition;
if((_cd==3&&_cc<0)||(_cd==1&&_cc>0)||_cd==2){
_ca=(Math.abs(_cc)+Math.floor(_c6.offsetWidth));
}
}
if(top){
_c6.style.top=top+"px";
}
if(_ca){
_c6.style.left=_ca+"px";
}
}
},isVisible:function(){
var _ce=this._popupElement;
return (_ce&&_ce.style.display!="none");
},get_targetControlID:function(){
return this._targetControlID;
},set_targetControlID:function(_cf){
if(this._targetControlID!=_cf){
this._targetControlID=_cf;
var _d0=(this._targetControlID?$get(this._targetControlID):null);
this.set_targetControl(_d0);
}
},get_serverTargetControlID:function(){
return this._serverTargetControlID;
},set_serverTargetControlID:function(_d1){
this._serverTargetControlID=_d1;
},get_serverValue:function(){
return this._serverValue;
},set_serverValue:function(_d2){
this._serverValue=_d2;
},get_value:function(){
return this.get_serverValue();
},set_value:function(_d3){
this.set_serverValue(_d3);
},get_formID:function(){
return this._formID;
},set_formID:function(_d4){
if(this._formID!=_d4){
this._formID=_d4;
}
},get_position:function(){
return this._position;
},set_position:function(_d5){
if(this._position!=_d5){
this._position=_d5;
if(this._calloutElement){
this._calloutElement.className="rtCallout "+this._getCalloutPosition(this._position);
}
}
this._horizontalPosition=this._getHorizontalSide(this._position);
this._verticalPosition=this._getVerticalSide(this._position);
},get_offsetX:function(){
return this._offsetX;
},set_offsetX:function(_d6){
if(this._offsetX!=_d6){
this._offsetX=_d6;
}
},get_offsetY:function(){
return this._offsetY;
},set_offsetY:function(_d7){
if(this._offsetY!=_d7){
this._offsetY=_d7;
}
},get_title:function(){
return this._title;
},set_title:function(_d8){
if(this._title!=_d8){
this._title=_d8;
}
this._refreshTitle();
},get_text:function(){
return this._text;
},set_text:function(_d9){
if(this._text!=_d9){
this._text=_d9;
}
if(this.isCreated()){
this.set_content(this._text);
}
},get_width:function(){
return this._width;
},set_width:function(_da){
if(this._width!=_da){
this._width=_da;
}
},get_height:function(){
return this._height;
},set_height:function(_db){
if(this._height!=_db){
this._height=_db;
}
},get_relativeTo:function(){
return this._relativeTo;
},set_relativeTo:function(_dc){
if(this._relativeTo!=_dc){
this._relativeTo=_dc;
}
},get_contentScrolling:function(){
return this._contentScrolling;
},set_contentScrolling:function(_dd){
if(this._contentScrolling!=_dd){
this._contentScrolling=_dd;
}
},get_sticky:function(){
return this.isHideEventEnabled(Telerik.Web.UI.ToolTipHideEvent.LeaveToolTip);
},set_sticky:function(_de){
if(this._sticky!=_de){
this._sticky=_de;
}
if(this._sticky){
this.set_hideEvent(Telerik.Web.UI.ToolTipHideEvent.LeaveToolTip);
}
},get_manualClose:function(){
return this.isHideEventEnabled(Telerik.Web.UI.ToolTipHideEvent.ManualClose);
},set_manualClose:function(_df){
if(this._manualClose!=_df){
this._manualClose=_df;
}
if(this._manualClose){
this.set_hideEvent(Telerik.Web.UI.ToolTipHideEvent.ManualClose);
}
},get_showCallout:function(){
return this._showCallout;
},set_showCallout:function(_e0){
if(this._showCallout!=_e0){
this._showCallout=_e0;
}
},get_renderInPageRoot:function(){
return this._renderInPageRoot;
},set_renderInPageRoot:function(_e1){
if(this._renderInPageRoot!=_e1){
this._renderInPageRoot=_e1;
}
},get_showDelay:function(){
return this._showDelay;
},set_showDelay:function(_e2){
if(this._showDelay!=_e2){
this._showDelay=_e2;
}
},get_autoCloseDelay:function(){
return this._autoCloseDelay;
},set_autoCloseDelay:function(_e3){
if(this._autoCloseDelay!=_e3){
this._autoCloseDelay=_e3;
}
},get_hideDelay:function(){
return this._hideDelay;
},set_hideDelay:function(_e4){
if(this._hideDelay!=_e4){
this._hideDelay=_e4;
}
},get_mouseTrailing:function(){
return this._mouseTrailing;
},set_mouseTrailing:function(_e5){
if(this._mouseTrailing!=_e5){
this._mouseTrailing=_e5;
if(true==_e5){
this.set_relativeTo(Telerik.Web.UI.ToolTipRelativeDisplay.Mouse);
}
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_e6){
if(this._visibleOnPageLoad!=_e6){
this._visibleOnPageLoad=_e6;
}
},get_animation:function(){
return this._animation;
},set_animation:function(_e7){
if(this._animation!=_e7){
this._animation=_e7;
}
},get_showEvent:function(){
return this._showEvent;
},set_showEvent:function(_e8){
if(this._showEvent!=_e8){
this._showEvent=_e8;
}
},get_hideEvent:function(){
return this._hideEvent;
},set_hideEvent:function(_e9){
if(this._hideEvent!=_e9){
this._hideEvent=_e9;
}
},get_modal:function(){
return this._modal;
},set_modal:function(_ea){
if(this._modal!=_ea){
this._modal=_ea;
}
this._makeModal(this._modal);
},get_skin:function(){
return this._skin;
},set_skin:function(_eb){
if(_eb&&this._skin!=_eb){
this._skin=_eb;
}
},get_targetControl:function(){
return this._targetControl;
},set_targetControl:function(_ec){
if(this._targetControl!=_ec){
if(this._targetControl&&(this._targetControl!=_ec)){
this._registerMouseHandlers(this._targetControl,false);
}
this._targetControl=_ec;
var _ed=this._targetControl;
if(_ed){
if($telerik.isIE&&_ed){
_ed.removeAttribute("alt");
}
this._registerMouseHandlers(_ed,true);
if(this._popupBehavior){
this._popupBehavior.set_parentElement(_ed);
}
}
}
},get_popupElement:function(){
return this._popupElement;
},add_beforeShow:function(_ee){
this.get_events().addHandler("beforeShow",_ee);
},remove_beforeShow:function(_ef){
this.get_events().removeHandler("beforeShow",_ef);
},add_show:function(_f0){
this.get_events().addHandler("show",_f0);
},remove_show:function(_f1){
this.get_events().removeHandler("show",_f1);
},add_beforeHide:function(_f2){
this.get_events().addHandler("beforeHide",_f2);
},remove_beforeHide:function(_f3){
this.get_events().removeHandler("beforeHide",_f3);
},add_hide:function(_f4){
this.get_events().addHandler("hide",_f4);
},remove_hide:function(_f5){
this.get_events().removeHandler("hide",_f5);
}};
Telerik.Web.UI.RadToolTip.registerClass("Telerik.Web.UI.RadToolTip",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.ToolTipPosition=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipPosition.prototype={TopLeft:11,TopCenter:12,TopRight:13,MiddleLeft:21,Center:22,MiddleRight:23,BottomLeft:31,BottomCenter:32,BottomRight:33};
Telerik.Web.UI.ToolTipPosition.registerEnum("Telerik.Web.UI.ToolTipPosition",false);
Telerik.Web.UI.ToolTipRelativeDisplay=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipRelativeDisplay.prototype={Mouse:0,Element:1,BrowserWindow:2};
Telerik.Web.UI.ToolTipRelativeDisplay.registerEnum("Telerik.Web.UI.ToolTipRelativeDisplay",false);
Telerik.Web.UI.ToolTipScrolling=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipScrolling.prototype={Auto:0,None:1,X:2,Y:3,Both:4,Default:5};
Telerik.Web.UI.ToolTipScrolling.registerEnum("Telerik.Web.UI.ToolTipScrolling",false);
Telerik.Web.UI.ToolTipAnimation=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipAnimation.prototype={None:0,Resize:1,Fade:2,Slide:4,FlyIn:8};
Telerik.Web.UI.ToolTipAnimation.registerEnum("Telerik.Web.UI.ToolTipAnimation",false);
Telerik.Web.UI.ToolTipShowEvent=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipShowEvent.prototype={OnMouseOver:1,OnClick:2,OnRightClick:4,OnFocus:8,FromCode:16};
Telerik.Web.UI.ToolTipShowEvent.registerEnum("Telerik.Web.UI.ToolTipShowEvent",false);
Telerik.Web.UI.ToolTipHideEvent=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.ToolTipHideEvent.prototype={Default:1,LeaveToolTip:2,ManualClose:4,LeaveTargetAndToolTip:8,FromCode:16};
Telerik.Web.UI.ToolTipHideEvent.registerEnum("Telerik.Web.UI.ToolTipHideEvent",false);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();