Type.registerNamespace("Telerik.Web"); Telerik.Web.BehaviorBase=function(_1){ Telerik.Web.BehaviorBase.initializeBase(this,[_1]); this._clientStateFieldID=null; this._pageRequestManager=null; this._partialUpdateBeginRequestHandler=null; this._partialUpdateEndRequestHandler=null; }; Telerik.Web.BehaviorBase.prototype={initialize:function(){ Telerik.Web.BehaviorBase.callBaseMethod(this,"initialize"); },dispose:function(){ var _2=this.get_element(); Telerik.Web.BehaviorBase.callBaseMethod(this,"dispose"); if(_2&&_2._behaviors&&_2._behaviors.length==0){ _2._behaviors=null; } _2=null; if(this._pageRequestManager){ if(this._partialUpdateBeginRequestHandler){ this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler); this._partialUpdateBeginRequestHandler=null; } if(this._partialUpdateEndRequestHandler){ this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler); this._partialUpdateEndRequestHandler=null; } this._pageRequestManager=null; } },get_ClientStateFieldID:function(){ return this._clientStateFieldID; },set_ClientStateFieldID:function(_3){ if(this._clientStateFieldID!=_3){ this._clientStateFieldID=_3; this.raisePropertyChanged("ClientStateFieldID"); } },get_ClientState:function(){ if(this._clientStateFieldID){ var _4=document.getElementById(this._clientStateFieldID); if(_4){ return _4.value; } } return null; },set_ClientState:function(_5){ if(this._clientStateFieldID){ var _6=document.getElementById(this._clientStateFieldID); if(_6){ _6.value=_5; } } },registerPartialUpdateEvents:function(){ if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){ this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance(); if(this._pageRequestManager){ this._partialUpdateBeginRequestHandler=Function.createDelegate(this,this._partialUpdateBeginRequest); this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler); this._partialUpdateEndRequestHandler=Function.createDelegate(this,this._partialUpdateEndRequest); this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler); } } },_partialUpdateBeginRequest:function(_7,_8){ },_partialUpdateEndRequest:function(_9,_a){ }}; Telerik.Web.BehaviorBase.registerClass("Telerik.Web.BehaviorBase",Sys.UI.Behavior); Type.registerNamespace("Telerik.Web"); Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.ModalExtender=function(_b){ this._windowResizeDelegate=null; this._windowScrollDelegate=null; this._xCoordinate=-1; this._yCoordinate=-1; this._backgroundElement=null; this._foregroundElement=_b; this._saveTabIndexes=new Array(); this._saveDesableSelect=new Array(); this._tagWithTabIndex=new Array("A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME"); }; Telerik.Web.UI.ModalExtender.prototype={dispose:function(){ this.hide(); this._backgroundElement=null; this._foregroundElement=null; },show:function(){ this._attachWindowHandlers(true); var _c=this._getModalOverlay(); this._foregroundElement.parentNode.appendChild(_c); _c.style.zIndex=$telerik.getCurrentStyle(this._foregroundElement,"zIndex",this._foregroundElement.style.zIndex)-1; _c.style.display=""; this._disableTab(); this._updatePageLayout(); this._updatePageLayout(); },_storeBrowserPosition:function(){ var _d=document.body; var _e=document.documentElement; this._browserTop=_d.scrollTop>_e.scrollTop?_d.scrollTop:_e.scrollTop; this._browserLeft=_d.scrollLeft>_e.scrollLeft?_d.scrollTop:_e.scrollLeft; },_restoreBrowserPosition:function(_f,top){ try{ if(null==_f){ _f=this._browserLeft; } if(null==top){ top=this._browserTop; } var _11=document.body; var _12=document.documentElement; _11.scrollTop=top; _11.scrollLeft=_f; _12.scrollTop=top; _12.scrollLeft=_f; } catch(ex){ } },hide:function(){ this._restoreTab(); this._attachWindowHandlers(false); var _13=this._backgroundElement; if(_13){ _13.parentNode.removeChild(_13); this._backgroundElement=null; } },_enableScroll:function(_14){ if(_14){ document.body.style.overflow=null!=this._overflow?this._overflow:""; document.documentElement.style.overflow=null!=this._documentOverflow?this._documentOverflow:""; document.body.style.marginRight=""; }else{ this._overflow=document.body.style.overflow; document.body.style.overflow="hidden"; this._documentOverflow=document.documentElement.style.overflow; document.documentElement.style.overflow="hidden"; document.body.style.marginRight="18px"; } },_getModalOverlay:function(){ if(!this._backgroundElement){ var div=document.createElement("div"); div.style.display="none"; div.style.position="absolute"; if($telerik.isRightToLeft(this._foregroundElement)){ div.style.right="0px"; }else{ div.style.left="0px"; } div.style.top="0px"; div.style.zIndex=10000; div.style.backgroundColor="#aaaaaa"; div.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50)"; div.style.opacity=".5"; div.style.mozOpacity=".5"; div.className="TelerikModalOverlay"; this._backgroundElement=div; } return this._backgroundElement; },_attachWindowHandlers:function(_16){ var _17=window; if(true==_16){ this._windowResizeDelegate=Function.createDelegate(this,this._updatePageLayout); $addHandler(_17,"resize",this._windowResizeDelegate); this._windowScrollDelegate=Function.createDelegate(this,this._updatePageLayout); $addHandler(_17,"scroll",this._windowScrollDelegate); }else{ if(this._windowResizeDelegate){ $removeHandler(_17,"resize",this._windowResizeDelegate); } this._windowResizeDelegate=null; if(this._windowScrollDelegate){ $removeHandler(_17,"scroll",this._windowScrollDelegate); } this._windowScrollDelegate=null; } },_updatePageLayout:function(){ var _18=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body)); var _19=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop); var _1a=$telerik.getClientBounds(); var _1b=_1a.width; var _1c=_1a.height; var _1d=this._getModalOverlay(); _1d.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),_1b)+"px"; _1d.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),_1c)+"px"; },_disableTab:function(){ var i=0; var _1f; var _20=new Array(); Array.clear(this._saveTabIndexes); for(var j=0;j_53){ _4f.x=_53-_50.width+_51.scrollLeft; _52=true; } if(_50.x<0){ _4f.x-=_50.x; _52=true; } if(_50.y<0){ _4f.y-=_50.y; _52=true; } if(_51.height<_50.y+_50.height-_51.scrollTop){ if(_51.height-_50.height>0){ _4f.y=_51.height-_50.height+_51.scrollTop; _52=true; } } if(_52){ $telerik.setLocation(elt,_4f); _50=$telerik.getBounds(elt); } } elt.zIndex=1000; if(((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7))||this._overlay){ var _54=elt._hideWindowedElementsIFrame; if(!_54){ _54=document.createElement("iframe"); _54.src="javascript:'';"; _54.style.position="absolute"; _54.style.display="none"; _54.scrolling="no"; _54.frameBorder="0"; _54.tabIndex="-1"; _54.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"; elt.parentNode.insertBefore(_54,elt); elt._hideWindowedElementsIFrame=_54; this._moveHandler=Function.createDelegate(this,this._onMove); $telerik.addExternalHandler(elt,"move",this._moveHandler); } $telerik.setBounds(_54,_50); if(Sys.Browser.agent===Sys.Browser.Firefox){ _54.style.top=parseInt(_50.y)-_51.scrollTop+"px"; _54.style.left=parseInt(_50.x)-_51.scrollLeft+"px"; _54.style.position="fixed"; } if($telerik.quirksMode){ return; } _54.style.display=elt.style.display; if(elt.currentStyle&&elt.currentStyle.zIndex){ _54.style.zIndex=elt.currentStyle.zIndex; }else{ if(elt.style.zIndex){ _54.style.zIndex=elt.style.zIndex; } } } },_getViewportBounds:function(){ var _55=$telerik.getClientBounds(); var _56=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body); var _57=document.documentElement.scrollTop||document.body.scrollTop; _55.scrollLeft=_56; _55.scrollTop=_57; return _55; },_setCoordinates:function(x,y){ var _5a=false; if(x!=this._x){ this._x=x; _5a=true; } if(y!=this._y){ this._y=y; _5a=true; } if($telerik.getVisible(this.get_element())&&_5a&&this._manageVisibility){ this.show(); } },initialize:function(){ Telerik.Web.PopupBehavior.callBaseMethod(this,"initialize"); this.hide(); this.get_element().style.position="absolute"; },dispose:function(){ var elt=this.get_element(); if(elt){ if(this._moveHandler){ $telerik.removeExternalHandler(elt,"move",this._moveHandler); this._moveHandler=null; } this._attachWindowHandlers(false); if($telerik.getVisible(elt)&&this._manageVisibility){ this.hide(); } if(this._originalParent){ elt.parentNode.removeChild(elt); this._originalParent.appendChild(elt); this._originalParent=null; } var _5c=elt._hideWindowedElementsIFrame; if(_5c){ var _5d=_5c.parentNode; var _5e=_5c.nextSibling; if(_5d){ _5d.removeChild(_5c); if(_5e){ _5d.insertBefore(document.createElement("SPAN"),_5e); }else{ _5d.appendChild(document.createElement("SPAN")); } } } } this._parentElement=null; Telerik.Web.PopupBehavior.callBaseMethod(this,"dispose"); },_onMove:function(){ var elt=this.get_element(); var _60=elt._hideWindowedElementsIFrame; if(_60){ if(Sys.Browser.agent===Sys.Browser.Firefox){ var _61=this._getViewportBounds(); _60.style.top=parseInt(elt.style.top)-_61.scrollTop+"px"; _60.style.left=parseInt(elt.style.left)-_61.scrollLeft+"px"; _60.style.position="fixed"; }else{ _60.style.top=elt.style.top; _60.style.left=elt.style.left; } } },_handleElementResize:function(){ var elt=this.get_element(); var _63=elt._hideWindowedElementsIFrame; if(_63){ var _64=$telerik.getBounds(elt); $telerik.setBounds(_63,_64); } },_attachWindowHandlers:function(_65){ if(!Sys.Browser.agent===Sys.Browser.Firefox){ return; } var _66=window; if(true==_65){ this._windowResizeDelegate=Function.createDelegate(this,this._onMove); $telerik.addExternalHandler(_66,"resize",this._windowResizeDelegate); this._windowScrollDelegate=Function.createDelegate(this,this._onMove); $telerik.addExternalHandler(_66,"scroll",this._windowScrollDelegate); }else{ if(this._windowResizeDelegate){ $telerik.removeExternalHandler(_66,"resize",this._windowResizeDelegate); } this._windowResizeDelegate=null; if(this._windowScrollDelegate){ $telerik.removeExternalHandler(_66,"scroll",this._windowScrollDelegate); } this._windowScrollDelegate=null; } }}; Telerik.Web.PopupBehavior.registerClass("Telerik.Web.PopupBehavior",Telerik.Web.BehaviorBase); Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.ResizeExtender=function(_67,_68,_69,_6a,doc,_6c,_6d){ this._document=doc?doc:document; this._documentMouseMoveDelegate=null; this._documentMouseUpDelegate=null; this._element=null; this._tableElement=null; this._moveCursorType="move"; this._enabled=true; this._jsOwner=null; this._hideIframes=true; this._autoScrollEnabled=true; this._saveDelegates={}; this.makeResizable(_67,_68,_69,_6a,_6c,_6d); }; Telerik.Web.UI.ResizeExtender.containsBounds=function(_6e,_6f){ if(!_6e||!_6f){ return false; } var _70=$telerik.containsPoint(_6e,_6f.x,_6f.y); if(_70){ var x=_6f.x+_6f.width; var y=_6f.y+_6f.height; _70=$telerik.containsPoint(_6e,x,y); } return _70; }; Telerik.Web.UI.ResizeExtender.prototype={dispose:function(){ this._attachDocumentHandlers(false); this._configureHandleElements(false); this._jsOwner=null; },enable:function(_73){ this._enabled=_73; },set_hideIframes:function(_74){ this._hideIframes=_74; },get_hideIframes:function(){ return this._hideIframes; },makeResizable:function(_75,_76,_77,_78,_79,_7a){ if(!_76){ return; } if(this._element){ alert("Element "+_76.getAttribute("id")+" cannot be made resizable, as the resizeExtender already has the element "+this._element.getAttribute("id")+" associated with it. You must create a new extender resizer object"); return; } this._jsOwner=_75; this._element=_76; this._tableElement=_78; this._resizeHandles=_77; if(_79){ this._moveCursorType=_79; } if(_7a!=null){ this._autoScrollEnabled=_7a; } this._startX=0; this._startY=0; this._cancelResize=true; this._configureHandleElements(true); },_raiseDragEvent:function(_7b,ev,_7d){ if(this._jsOwner&&this._jsOwner["on"+_7b]){ var _7e=ev; if(!_7e){ _7e={}; } _7e.element=this._element; _7e.ownerEvent=_7d; return this._jsOwner["on"+_7b](_7e); } return true; },_raiseEvent:function(_7f,ev){ if(this._jsOwner&&this._jsOwner["on"+_7f]){ if(!ev){ ev=new Sys.EventArgs(); }else{ if(_7f=="Resize"){ ev=this._resizeDir; }else{ if(_7f=="Resizing"){ ev=this._getProposedBounds(ev); } } } return this._jsOwner["on"+_7f](ev); } return true; },_getProposedBounds:function(b1){ var b2=$telerik.getBounds(this._element); return {x:b1.x||b2.x,y:b1.y||b2.y,width:b1.width||b2.width,height:b1.height||b2.height}; },_resize:function(e){ if(!this._enabled||this._cancelResize){ return false; } var _84=0; var _85=0; var _86=0; var _87=0; var _88=this._originalBounds; var _89=this._resizeDir.move; if(_89){ _86=_88.x+(e.clientX-this._startX); _87=_88.y+(e.clientY-this._startY); }else{ if(this._resizeDir.east){ _84=_88.width+(e.clientX-this._startX); }else{ if(this._resizeDir.west){ _86=e.clientX-this._leftHandleMouseDelta; _84=_88.width-(e.clientX-this._startX); } } if(this._resizeDir.south){ _85=_88.height+(e.clientY-this._startY); }else{ if(this._resizeDir.north){ _87=_88.y+(e.clientY-this._startY); _85=_88.height-(e.clientY-this._startY); } } } if(this._offsetLocation){ _86-=this._offsetLocation.x; _87-=this._offsetLocation.y; } var _8a=new Sys.UI.Bounds(_86,_87,_84,_85); var _8b=_89?this._raiseDragEvent("Drag",_8a,e):this._raiseEvent("Resizing",_8a); if(false==_8b){ return true; } if(_89||_8a.x>0){ this._element.style.left=_8a.x+"px"; } if(_89||_8a.y>0){ this._element.style.top=_8a.y+"px"; } if(_8a.width>0){ this._element.style.width=_8a.width+"px"; } if(_8a.height>0){ this._element.style.height=_8a.height+"px"; } if(!_89){ this._updateInnerTableSize(); } return true; },_storeStartCoords:function(e){ if(!this._enabled){ return; } this._cancelResize=false; this._startX=e.clientX; this._startY=e.clientY; var _8d=$telerik.getBounds(this._element); this._originalBounds=_8d; var _8e=e.target?e.target:e.srcElement; if(_8e&&_8e.type==3){ _8e=_8e.parentNode; } this._resizeType=$telerik.getCurrentStyle(_8e,"cursor"); this._resizeDir={north:this._resizeType.match(/n.?-/)?1:0,east:this._resizeType.match(/e-/)?1:0,south:this._resizeType.match(/s.?-/)?1:0,west:this._resizeType.match(/w-/)?1:0,move:new RegExp(this._moveCursorType).test(this._resizeType)?1:0}; this._leftHandleMouseDelta=0; if(this._resizeDir.west){ this._leftHandleMouseDelta=Math.abs($telerik.getBounds(_8e).x-this._startX); } var _8f=this._resizeDir.move?this._raiseDragEvent("DragStart",null,e):this._raiseEvent("ResizeStart"); this._cancelResize=(_8f==false); var _90=$telerik.getCurrentStyle(this._element.parentNode,"position"); var _91=("relative"==_90)||("absolute"==_90); this._offsetLocation=_91?$telerik.getLocation(this._element.parentNode):null; if(!this._cancelResize){ this._clearSelection(); this._setIframesVisible(false); this._attachDocumentHandlers(false); this._attachDocumentHandlers(true); } },_updateInnerTableSize:function(){ var dir=this._resizeDir; if(dir.south||dir.north){ var _93=this._element.style.height; var _94=this._tableElement; if(_94){ _94.style.height=_93; this._fixIeHeight(_94,_93); } } },_setIframesVisible:function(_95){ if(!this._hideIframes){ return; } var _96=this._document.getElementsByTagName("IFRAME"); for(var i=0;i<_96.length;i++){ var _98=_96[i]; _98.style.visibility=_95?"":"hidden"; if($telerik.isIE){ try{ _98.contentWindow.document.body.style.visibility=_95?"":"hidden"; } catch(ex){ } } } },_configureHandleElements:function(_99){ var _9a=["nw","n","ne","w","e","sw","s","se",this._moveCursorType]; for(var i=0;i<_9a.length;i++){ var _9c=_9a[i]; var _9d=this._resizeHandles[_9c]; if(_9d){ if(_9d instanceof Array){ for(var j=0;j<_9d.length;j++){ this._configureHandle("id"+i+"_"+j,_99,_9d[j],_9c); } }else{ this._configureHandle("id"+i,_99,_9d,_9c); } } } if(!_99){ this._saveDelegates={}; } },_configureHandle:function(_9f,_a0,_a1,_a2){ if(_a0){ var _a3=Function.createDelegate(this,this._onHandleMouseDown); $telerik.addExternalHandler(_a1,"mousedown",_a3); this._saveDelegates[_9f]={delegate:_a3,element:_a1}; var _a4=(_a2==this._moveCursorType?this._moveCursorType:_a2+"-resize"); _a1.style.cursor=_a4; }else{ $telerik.removeExternalHandler(_a1,"mousedown",this._saveDelegates[_9f].delegate); _a1.style.cursor=""; } },_attachDocumentHandlers:function(_a5){ var _a6=this._document; if(true==_a5){ this._documentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove); $telerik.addExternalHandler(_a6,"mousemove",this._documentMouseMoveDelegate); this._documentMouseUpDelegate=Function.createDelegate(this,this._onDocumentMouseUp); $telerik.addExternalHandler(_a6,"mouseup",this._documentMouseUpDelegate); }else{ if(this._documentMouseMoveDelegate){ $telerik.removeExternalHandler(_a6,"mousemove",this._documentMouseMoveDelegate); } this._documentMouseMoveDelegate=null; if(this._documentMouseUpDelegate){ $telerik.removeExternalHandler(_a6,"mouseup",this._documentMouseUpDelegate); } this._documentMouseUpDelegate=null; } },_onDocumentMouseMove:function(e){ var _a8=this._resize(e); if(this._autoScrollEnabled){ this._autoScroll(e); } if(_a8){ return $telerik.cancelRawEvent(e); } },_onDocumentMouseUp:function(e){ var _aa=!this._cancelResize; this._cancelResize=true; if(_aa){ this._clearSelection(); this._setIframesVisible(true); if(this._resizeDir&&this._resizeDir.move){ this._raiseDragEvent("DragEnd",null,e); }else{ this._raiseEvent("ResizeEnd"); } this._attachDocumentHandlers(false); if(this._scroller){ this._scroller.set_enabled(false); } } },_onHandleMouseDown:function(e){ this._storeStartCoords(e); return $telerik.cancelRawEvent(e); },_clearSelection:function(){ if(this._document.selection&&this._document.selection.empty){ this._document.selection.empty(); } },_fixIeHeight:function(_ac,_ad){ if("CSS1Compat"==document.compatMode){ var _ae=(_ac.offsetHeight-parseInt(_ad)); if(_ae>0){ var _af=(parseInt(_ac.style.height)-_ae); if(_af>0){ _ac.style.height=_af+"px"; } } } },_initializeAutoScroll:function(){ if(this._autoScrollInitialized){ return; } this._scrollEdgeConst=40; this._scrollByConst=10; this._scroller=null; this._scrollDeltaX=0; this._scrollDeltaY=0; this._scrollerTickHandler=Function.createDelegate(this,this._onScrollerTick); this._scroller=new Telerik.Web.Timer(); this._scroller.set_interval(10); this._scroller.add_tick(this._scrollerTickHandler); this._autoScrollInitialized=true; },_autoScroll:function(ev){ this._initializeAutoScroll(); var _b1=$telerik.getClientBounds(); if(_b1.width>0){ this._scrollDeltaX=this._scrollDeltaY=0; if(ev.clientX<_b1.x+this._scrollEdgeConst){ this._scrollDeltaX=-this._scrollByConst; }else{ if(ev.clientX>_b1.width-this._scrollEdgeConst){ this._scrollDeltaX=this._scrollByConst; } } if(ev.clientY<_b1.y+this._scrollEdgeConst){ this._scrollDeltaY=-this._scrollByConst; }else{ if(ev.clientY>_b1.height-this._scrollEdgeConst){ this._scrollDeltaY=this._scrollByConst; } } var _b2=this._scroller; if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){ this._originalStartX=this._startX; this._originalStartY=this._startY; _b2.set_enabled(true); }else{ if(_b2.get_enabled()){ this._startX=this._originalStartX; this._startY=this._originalStartY; } _b2.set_enabled(false); } } },_onScrollerTick:function(){ var _b3=document.documentElement.scrollLeft||document.body.scrollLeft; var _b4=document.documentElement.scrollTop||document.body.scrollTop; window.scrollBy(this._scrollDeltaX,this._scrollDeltaY); var _b5=document.documentElement.scrollLeft||document.body.scrollLeft; var _b6=document.documentElement.scrollTop||document.body.scrollTop; var _b7=_b5-_b3; var _b8=_b6-_b4; var _b9=this._element; var _ba={x:parseInt(_b9.style.left)+_b7,y:parseInt(_b9.style.top)+_b8}; this._startX-=_b7; this._startY-=_b8; $telerik.setLocation(_b9,_ba); }}; Telerik.Web.UI.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null); if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();