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._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 b=this._getModalOverlay(); var a=this._foregroundElement; a.parentNode.appendChild(b); var c=$telerik.getCurrentStyle(a,"zIndex"); if(!isNaN(parseInt(c))){b.style.zIndex=c-1 }b.style.display=""; this._disableTab(); 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(d,b){try{if(null==d){d=this._browserLeft }if(null==b){b=this._browserTop }var a=document.body; var c=document.documentElement; a.scrollTop=b; a.scrollLeft=d; c.scrollTop=b; c.scrollLeft=d }catch(e){}},hide:function(){this._restoreTab(); this._attachWindowHandlers(false); var a=this._backgroundElement; if(a){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 b=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body)); var e=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop); var a=$telerik.getClientBounds(); var f=a.width; var d=a.height; var c=this._getModalOverlay(); c.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),f)+"px"; c.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),d)+"px" },_disableTab:function(){var d=0; var a; var c=new Array(); Array.clear(this._saveTabIndexes); for(var e=0; eb.width); var k=(h.height>b.height); var g=h.scrollTop; var i=h.height+g; var f=h.scrollLeft; var e=h.width+f; if($telerik.isRightToLeft(document.body)){var d=document.documentElement.scrollWidth; e=d?d:document.body.scrollWidth }if(b.xe)){b.x=e-b.width; j=true }if(k&&(i0){this._element.style.left=h.x+"px" }if(j||h.y>0){this._element.style.top=h.y+"px" }if(h.width>0){this._element.style.width=h.width+"px" }if(h.height>0){this._element.style.height=h.height+"px" }if(!j){this._updateInnerTableSize() }return true },getPositionedParent:function(){var a=this._element.parentNode; while(a&&a!=document){if("static"!=$telerik.getCurrentStyle(a,"position","static")){return a }a=a.parentNode }return null },_storeStartCoords:function(g){if(!this._enabled){return }this._cancelResize=false; this._startX=g.clientX; this._startY=g.clientY; var f=$telerik.getBounds(this._element); if($telerik.isIE){var d=this.getPositionedParent(); if(d){f.x+=d.scrollLeft; f.y+=d.scrollTop }}this._originalBounds=f; var c=g.target?g.target:g.srcElement; if(c&&c.type==3){c=c.parentNode }this._resizeType=$telerik.getCurrentStyle(c,"cursor"); if(!this._resizeType&&g.currentTarget){this._resizeType=$telerik.getCurrentStyle(g.currentTarget,"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(c).x-this._startX) }var a=this._resizeDir.move?this._raiseDragEvent("DragStart",null,g):this._raiseEvent("ResizeStart"); this._cancelResize=(a==false); var b=$telerik.getCurrentStyle(this._element.parentNode,"position"); var h=("relative"==b)||("absolute"==b); this._offsetLocation=h?$telerik.getLocation(this._element.parentNode):null; if(!this._cancelResize){this._clearSelection(); this._setIframesVisible(false); this._attachDocumentHandlers(false); this._attachDocumentHandlers(true) }},_updateInnerTableSize:function(){var b=this._resizeDir; if(b.south||b.north){var a=this._element.style.height; var c=this._tableElement; if(c){c.style.height=a; this._fixIeHeight(c,a) }}},_setIframesVisible:function(d){if(!this._hideIframes){return }var c=this._document.getElementsByTagName("IFRAME"); for(var a=0; a0){var c=(parseInt(a.style.height)-d); if(c>0){a.style.height=c+"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(a){this._initializeAutoScroll(); var b=$telerik.getClientBounds(); if(b.width>0){this._scrollDeltaX=this._scrollDeltaY=0; if(a.clientXb.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst }}if(a.clientYb.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst }}var c=this._scroller; if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._originalStartX=this._startX; this._originalStartY=this._startY; c.set_enabled(true) }else{if(c.get_enabled()){this._startX=this._originalStartX; this._startY=this._originalStartY }c.set_enabled(false) }}},_onScrollerTick:function(){var g=document.documentElement.scrollLeft||document.body.scrollLeft; var e=document.documentElement.scrollTop||document.body.scrollTop; window.scrollBy(this._scrollDeltaX,this._scrollDeltaY); var c=document.documentElement.scrollLeft||document.body.scrollLeft; var i=document.documentElement.scrollTop||document.body.scrollTop; var a=c-g; var d=i-e; var h=this._element; var b={x:parseInt(h.style.left)+a,y:parseInt(h.style.top)+d}; this._startX-=a; this._startY-=d; try{$telerik.setLocation(h,b) }catch(f){}}}; Telerik.Web.UI.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null); if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();