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 b=this._getModalOverlay();
if($telerik.getVisible(b)){return;
}this._attachWindowHandlers(true);
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 b=document.body;
var a=document.documentElement;
this._browserTop=b.scrollTop>a.scrollTop?b.scrollTop:a.scrollTop;
this._browserLeft=b.scrollLeft>a.scrollLeft?b.scrollTop:a.scrollLeft;
},_restoreBrowserPosition:function(e,d){try{if(null==e){e=this._browserLeft;
}if(null==d){d=this._browserTop;
}var c=document.body;
var a=document.documentElement;
c.scrollTop=d;
c.scrollLeft=e;
a.scrollTop=d;
a.scrollLeft=e;
}catch(b){}},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(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 f=(document.documentElement.scrollLeft?$telerik.getCorrectScrollLeft(document.documentElement):$telerik.getCorrectScrollLeft(document.body));
var a=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);
var e=$telerik.getClientBounds();
var c=e.width;
var b=e.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";
},_disableTab:function(){var f=0;
var a;
var d=new Array();
Array.clear(this._saveTabIndexes);
for(var c=0;
cf.width);
var h=(j.height>f.height);
var l=j.scrollTop;
var k=j.height+l;
var d=j.scrollLeft;
var g=j.width+d;
if(($telerik.isIE8||$telerik.isOpera||$telerik.isSafari)&&$telerik.isRightToLeft(document.body)){var i=b.style.display;
if($telerik.isOpera){b.style.display="none";
}var m=document.documentElement.scrollWidth;
g=m?m:document.body.scrollWidth;
if($telerik.isOpera){b.style.display=i;
}}if(f.xg)){f.x=g-f.width;
e=true;
}if(h&&(k0){g.style.left=n.x+"px";
}if(j||n.y>0){g.style.top=n.y+"px";
}if(n.width>0){g.style.width=n.width+"px";
}if(n.height>0){g.style.height=n.height+"px";
}if(!j){this._updateInnerTableSize();
}return true;
},_updateInnerTableSize:function(){var c=this._resizeDir;
if(c.south||c.north){var e=this._element.style.height;
var d=this._tableElement;
if(d){d.style.height=e;
this._fixIeHeight(d,e);
}}},_fixIeHeight:function(e,c){if("CSS1Compat"==document.compatMode){var f=(e.offsetHeight-parseInt(c));
if(f>0){var d=(parseInt(e.style.height)-f);
if(d>0){e.style.height=d+"px";
}}}},_setIframesVisible:function(c){if(!this.get_hideIframes()){return;
}var j=this._document.getElementsByTagName("iframe");
var e=this.get_iframeToSkip();
for(var f=0,d=j.length;
f1){return true;
}this._storeStartCoords(c);
if(!$telerik.isMobileSafari&&!$telerik.isAndroid){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 d=!this._cancelResize;
this._cancelResize=true;
this._startCursorLocation=null;
if(d){this._clearSelection();
this._setIframesVisible(true);
if(this._resizeDir&&this._resizeDir.move){this._raiseDragEvent("DragEnd",null,c);
}else{this._raiseEvent("ResizeEnd");
}this._attachDocumentHandlers(false);
if(this._scroller){this._scroller.set_enabled(false);
}}},_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(c){this._initializeAutoScroll();
var e=$telerik.getClientBounds();
if(e.width>0){this._scrollDeltaX=this._scrollDeltaY=0;
if(c.clientXe.width-this._scrollEdgeConst){this._scrollDeltaX=this._scrollByConst;
}}if(c.clientYe.height-this._scrollEdgeConst){this._scrollDeltaY=this._scrollByConst;
}}var d=this._scroller;
if(this._scrollDeltaX!=0||this._scrollDeltaY!=0){this._originalStartX=this._startX;
this._originalStartY=this._startY;
d.set_enabled(true);
}else{if(d.get_enabled()){this._startX=this._originalStartX;
this._startY=this._originalStartY;
}d.set_enabled(false);
}}},_onScrollerTick:function(){var f=document.documentElement.scrollLeft||document.body.scrollLeft;
var c=document.documentElement.scrollTop||document.body.scrollTop;
window.scrollBy(this._scrollDeltaX,this._scrollDeltaY);
var k=document.documentElement.scrollLeft||document.body.scrollLeft;
var i=document.documentElement.scrollTop||document.body.scrollTop;
var e=k-f;
var d=i-c;
var h=this._element;
var g={x:parseInt(h.style.left)+e,y:parseInt(h.style.top)+d};
this._startX-=e;
this._startY-=d;
try{$telerik.setLocation(h,g);
}catch(j){}}};
b.ResizeExtender.registerClass("Telerik.Web.UI.ResizeExtender",null,Sys.IDisposable);
})();
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();