Type.registerNamespace("Telerik.Web"); Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.ModalExtender=function(a){this._windowResizeDelegate=null; this._windowScrollDelegate=null; this._xCoordinate=-1; this._yCoordinate=-1; this._backgroundElement=null; this._foregroundElement=a; this._saveTabIndexes=new Array(); this._saveAccessKeys=new Array(); this._saveDesableSelect=new Array(); this._saveDisabledElements=new Array(); this._tagWithTabIndex=new Array("A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME","SPAN"); this._tagWithAcessKey=this._tagWithTabIndex; this._elementsToDisable=[]; }; Telerik.Web.UI.ModalExtender.prototype={dispose:function(){this.hide(); this._backgroundElement=null; this._foregroundElement=null; },show:function(){var a=this._getModalOverlay(); if($telerik.getVisible(a)){return; }this._attachWindowHandlers(true); var b=this._foregroundElement; b.parentNode.appendChild(a); var c=$telerik.getCurrentStyle(b,"zIndex"); if(!isNaN(parseInt(c))){a.style.zIndex=c-1; }a.style.display=""; this._disableElements(this._elementsToDisable); this._disableTab(); this._disableAccesskey(); this._updatePageLayout(); this._updatePageLayout(); },_storeBrowserPosition:function(){var a=document.body; var b=document.documentElement; this._browserTop=a.scrollTop>b.scrollTop?a.scrollTop:b.scrollTop; this._browserLeft=a.scrollLeft>b.scrollLeft?a.scrollTop:b.scrollLeft; },_restoreBrowserPosition:function(b,e){try{if(null==b){b=this._browserLeft; }if(null==e){e=this._browserTop; }var c=document.body; var d=document.documentElement; c.scrollTop=e; c.scrollLeft=b; d.scrollTop=e; d.scrollLeft=b; }catch(a){}},hide:function(){this._restoreTab(); this._restoreAccessKey(); this._restoreDisabledElements(); this._attachWindowHandlers(false); var a=this._backgroundElement; if(a){if(a.parentNode){a.parentNode.removeChild(a); }this._backgroundElement=null; }},_enableScroll:function(a){if(a){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 a=document.createElement("div"); a.style.display="none"; a.style.position="absolute"; if($telerik.isRightToLeft(this._foregroundElement)){a.style.right="0px"; }else{a.style.left="0px"; }a.style.top="0px"; a.style.zIndex=10000; a.style.backgroundColor="#aaaaaa"; a.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=50)"; a.style.opacity=".5"; a.style.MozOpacity=".5"; a.setAttribute("unselectable","on"); a.className="TelerikModalOverlay"; this._backgroundElement=a; }return this._backgroundElement; },_attachWindowHandlers:function(a){var b=window; if(true==a){this._windowResizeDelegate=Function.createDelegate(this,this._updatePageLayout); $addHandler(b,"resize",this._windowResizeDelegate); this._windowScrollDelegate=Function.createDelegate(this,this._updatePageLayout); $addHandler(b,"scroll",this._windowScrollDelegate); }else{if(this._windowResizeDelegate){$removeHandler(b,"resize",this._windowResizeDelegate); }this._windowResizeDelegate=null; if(this._windowScrollDelegate){$removeHandler(b,"scroll",this._windowScrollDelegate); }this._windowScrollDelegate=null; }},_updatePageLayout:function(){var e=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body)); var f=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop); var a=$telerik.getClientBounds(); var c=a.width; var b=a.height; var d=this._getModalOverlay(); d.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c)+"px"; d.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),b)+"px"; },_getElementsWithTabIndexes:function(b,c){var d=this; var a=$telerik.$(b).find(this._tagWithTabIndex.join(",")).filter(function(){if(this.tabIndex==-1||this.disabled||this===c||$telerik.$.contains(c,this)){return false; }if(!$telerik.getVisible(this)){return false; }if(this.nodeName=="SPAN"&&!d._hasTabIndexAttribute(this)){return false; }return true; }); return $telerik.$.makeArray(a); },_getElementsWithAccessKey:function(b,c){var a=$telerik.$(b).find(this._tagWithAcessKey.join(",")).filter(function(){if(!this.accessKey||this.disabled||this===c||$telerik.$.contains(c,this)){return false; }if(!$telerik.getVisible(this)){return false; }return true; }); return $telerik.$.makeArray(a); },_hasTabIndexAttribute:function(b){if(b.hasAttribute){return b.hasAttribute("tabIndex"); }var a=b.getAttribute("tabIndex"); if(a==null||a=="undefined"||a===-32768){return false; }if(typeof a=="number"&&a!=0){return true; }if(a==0){var d=$telerik.getOuterHtml(b),c=d.replace(b.innerHTML); return/tabindex=/i.test(c); }return false; },_getElementsToDisable:function(c,b,d){var a=$telerik.$(b).find(c.join(",")).filter(function(){if(this.disabled||!$telerik.getVisible(this)||this===d||$telerik.$.contains(d,this)){return false; }return true; }); return $telerik.$.makeArray(a); },_disableElements:function(b){this._saveDisabledElements=[]; if(!b||b.length==0){return; }var a=this._getElementsToDisable(b,document,this._foregroundElement); for(var c=0; cj.width); var d=(b.height>j.height); var l=b.scrollTop; var a=b.height+l; var g=b.scrollLeft; var k=b.width+g; if(($telerik.isIE8||$telerik.isOpera||$telerik.isSafari)&&$telerik.isRightToLeft(document.body)){var i=c.style.display; if($telerik.isOpera){c.style.display="none"; }var f=document.documentElement.scrollWidth; k=f?f:document.body.scrollWidth; if($telerik.isOpera){c.style.display=i; }}if(j.xk)){j.x=k-j.width; m=true; }if(d&&(a0){h.style.left=m.x+"px"; }if(j||m.y>0){h.style.top=m.y+"px"; }}if(m.width>0){h.style.width=m.width+"px"; }if(m.height>0){h.style.height=m.height+"px"; }if(!j){this._updateInnerTableSize(); }return true; },_setTranslate:function(c,e,f){var d=c.style; d.webkitTransform=d.mozTransform=d.OTransform="translate("+e+"px,"+f+"px)"; },_updateInnerTableSize:function(){var c=this._resizeDir; if(c.south||c.north){var d=this._element.style.height; var e=this._tableElement; if(e){e.style.height=d; this._fixIeHeight(e,d); }}},_getMoveConstraints:function(c){var d=this._getSizeConstraints(); if(d){d.width-=c.width; d.height-=c.height; }return d; },_getSizeConstraints:function(c){var d=this._constraints; if(!d){return null; }var e=d.x+this._offsetLocation.x; var f=d.y+this._offsetLocation.y; return new Sys.UI.Bounds(e,f,e+d.width,f+d.height); },_constrainPosition:function(e,d,c){return Math.max(d,Math.min(c,e)); },_constrainDimension:function(d,c){return this._constrainPosition(d,0,c); },_fixIeHeight:function(f,d){if("CSS1Compat"==document.compatMode){var c=(f.offsetHeight-parseInt(d)); if(c>0){var e=(parseInt(f.style.height)-c); if(e>0){f.style.height=e+"px"; }}}},_setIframesVisible:function(c){if(!this.get_hideIframes()){return; }var g=this._document.getElementsByTagName("iframe"); var h=this.get_iframeToSkip(); for(var f=0,j=g.length; f1){return true; }this._storeStartCoords(c); if(!$telerik.isTouchDevice){return $telerik.cancelRawEvent(c); }},_onDocumentMouseMove:function(c){var d=this._resize(c); if(this._autoScrollEnabled){this._autoScroll(c); }if(d){return $telerik.cancelRawEvent(c); }},_onDocumentMouseUp:function(c){var f=!this._cancelResize; this._cancelResize=true; this._startCursorLocation=null; var d=this._resizeDir&&this._resizeDir.move; if(this._useCssTransform&&d){this._moveBoxBy(this._lastTouchDelta); }if(f){this._clearSelection(); this._setIframesVisible(true); if(d){this._raiseDragEvent("DragEnd",null,c); }else{this._raiseEvent("ResizeEnd"); }this._attachDocumentHandlers(false); if(this._scroller){this._scroller.set_enabled(false); }}},_moveBoxBy:function(d,c){var c=c||this._element; var f=this._originalBounds; var e=this._offsetLocation; boxStartPos=f; this._resetBoxTransform(c); c.style.left=boxStartPos.x+d.x-e.x+"px"; c.style.top=boxStartPos.y+d.y-e.y+"px"; },_resetBoxTransform:function(c){var d=c.style; d.webkitTransform=d.mozTransform=d.OTransform=d.msTranslate="translate(0,0)"; },_clearSelection:function(){if(this._document.selection&&this._document.selection.empty){try{this._document.selection.empty(); }catch(c){}}},_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(d){this._initializeAutoScroll(); var c=$telerik.getClientBounds(); if(c.width>0){this._scrollDeltaX=this._scrollDeltaY=0; if(d.clientXc.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst; }}if(d.clientYc.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst; }}var e=this._scroller; if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._originalStartX=this._startX; this._originalStartY=this._startY; e.set_enabled(true); }else{if(e.get_enabled()){this._startX=this._originalStartX; this._startY=this._originalStartY; }e.set_enabled(false); }}},_onScrollerTick:function(){var i=document.documentElement.scrollLeft||document.body.scrollLeft; var j=document.documentElement.scrollTop||document.body.scrollTop; window.scrollBy(this._scrollDeltaX,this._scrollDeltaY); var g=document.documentElement.scrollLeft||document.body.scrollLeft; var h=document.documentElement.scrollTop||document.body.scrollTop; var c=g-i; var d=h-j; var e=this._element; var k={x:parseInt(e.style.left)+c,y:parseInt(e.style.top)+d}; this._startX-=c; this._startY-=d; try{$telerik.setLocation(e,k); }catch(f){}}}; a.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null,Sys.IDisposable); Telerik.Web.UI.Helpers.IETouchActionManager=function(c){this.element=c; }; Telerik.Web.UI.Helpers.IETouchActionManager.prototype={allowUserTouch:function(){if(!this.isPointerEnabled()){return; }var c=this.getStyle(); this.cachedTouchAction=c.msTouchAction; c.msTouchAction="none"; },restore:function(){if(!this.isPointerEnabled()){return; }this.getStyle().msTouchAction=this.cachedTouchAction; },getStyle:function(){return this.element?this.element.style:{}; },isPointerEnabled:function(){try{return window.navigator.msPointerEnabled; }catch(c){return false; }},dispose:function(){this.restore(); this.element=null; }}; })(Telerik.Web.UI); if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();