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