Type.registerNamespace("Telerik.Web.UI");
(function(){$telerik.toWindow=function(c){return c;
};
$telerik.findWindow=$find;
var b=$telerik.$;
var a=Telerik.Web.UI;
a.RadWindowControllerClass=function(){this._activeWindow=null;
this._historyStack=[];
};
a.RadWindowControllerClass.prototype={getInstance:function(){return this;
},hideCurrentWindowIfNonModal:function(){if(this._activeWindow!=null&&this._activeWindow.isModal&&!this._activeWindow.isModal()){this._activeWindow.close();
}this._activeWindow=null;
},inactivateCurrentWindow:function(){if(this._activeWindow!=null){this._activeWindow.setActive(false);
}this._activeWindow=null;
},set_activeWindow:function(c){if(c==this._activeWindow){return;
}this.inactivateCurrentWindow();
this._activeWindow=c;
Array.remove(this._historyStack,c);
Array.add(this._historyStack,c);
},notifyWindowClosed:function(c){if(this._activeWindow==c){this._activeWindow=null;
}Array.remove(this._historyStack,c);
this._activatePreviousWindow();
},_activatePreviousWindow:function(){var c=this._historyStack;
var d=c.length-1;
for(;
d>=0;
d--){var e=c[d];
if(!e){return;
}if(e.isCreated()&&!e.isClosed()&&!e.isMinimized()){e.setActive(true);
break;
}else{Array.removeAt(c,d);
}}},get_activeWindow:function(){return this._activeWindow;
}};
a.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null);
if(!a.RadWindowController){a.RadWindowController=new a.RadWindowControllerClass();
}Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.RadWindowUtils");
a.RadWindowUtils.Localization={Close:"Close",Minimize:"Minimize",Maximize:"Maximize",Reload:"Reload",PinOn:"Pin on",PinOff:"Pin off",Restore:"Restore",OK:"OK",Cancel:"Cancel",Yes:"Yes",No:"No"};
b.registerEnum(a,"WindowBehaviors",{None:0,Resize:1,Minimize:2,Close:4,Pin:8,Maximize:16,Move:32,Reload:64,Default:(1+2+4+8+16+32+64)});
b.registerEnum(a,"WindowAutoSizeBehaviors",{Width:1,WidthProportional:2,Height:4,HeightProportional:8,Default:(2+8)});
b.registerEnum(a,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8});
b.registerEnum(a,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1});
a.RadWindow=function(c){a.RadWindow.initializeBase(this,[c]);
this._openerElement=null;
this._offsetElement=null;
this._popupElement=null;
this._tableElement=null;
this._contentElement=null;
this._contentCell=null;
this._titleElement=null;
this._titleCell=null;
this._titlebarElement=null;
this._statusCell=null;
this._statusMessageElement=null;
this._iframe=null;
this._dockMode=false;
this._buttonsElement=null;
this._buttonsArray=[];
this._iconUrl=null;
this._shortCutManager=null;
this.isIE=($telerik.isIE);
this._openerElementID=null;
this._offsetElementID=null;
this._behaviors=a.WindowBehaviors.Default;
this._left=null;
this._top=null;
this._title="";
this._width="300px";
this._minWidth=null;
this._minHeight=null;
this._defaultMinWidth=null;
this._defaultMinHeight=null;
this._handlesWidth=null;
this._resizeOverlayElement=null;
this._height="300px";
this._opacity=100;
this._visibleTitlebar=true;
this._visibleStatusbar=true;
this._modal=false;
this._overlay=false;
this._keepInScreenBounds=false;
this._windowAnimation=null;
this._onMouseDownDelegate=null;
this._onClickDelegate=null;
this._onTitlebarDblclickDelegate=null;
this._onTitlebarClickDelegate=null;
this._onWindowResizeDelegate=null;
this._onIframeLoadDelegate=null;
this._onChildPageUnloadDelegate=null;
this._onChildPageClickDelegate=null;
this._onKeyDownDelegate=null;
this._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._loaded=false;
this._isCloned=false;
this._restoreRect=null;
this._popupBehavior=null;
this._popupVisible=false;
this._dropDownTouchScroll=null;
this._browserWindow=window;
this._stylezindex=null;
this.GetWindowManager=this.get_windowManager;
this.BrowserWindow=window;
this.GetContentFrame=this.get_contentFrame;
this.GetLeftPosition=function(){this.getWindowBounds().x;
};
this.GetTopPosition=function(){this.getWindowBounds().y;
};
this.GetTitlebar=function(){return this._titleCell;
};
this.GetStatusbar=function(){return this._statusCell;
};
this.SetOpenerElementId=this.set_openerElementID;
this.SetStatus=this.set_status;
this.GetStatus=this.get_status;
this.SetModal=this.set_modal;
this.SetWidth=this.set_width;
this.SetHeight=this.set_height;
this.GetWidth=this.get_width;
this.GetHeight=this.get_height;
this.SetOffsetElementId=this.set_offsetElementID;
this.SetTitle=this.set_title;
this.MoveTo=this.moveTo;
this.Center=this.center;
this.SetVisible=this.setVisible;
this.SetSize=this.setSize;
this.Show=this.show;
this.Hide=this.hide;
this.GetUrl=this.get_navigateUrl;
this.SetUrl=this.setUrl;
this.Reload=this.reload;
this.SetActive=this.setActive;
this.Minimize=this.minimize;
this.Restore=this.restore;
this.Maximize=this.maximize;
this.Close=this.close;
this.TogglePin=this.togglePin;
this.IsMaximized=this.isMaximized;
this.IsMinimized=this.isMinimized;
this.IsModal=this.isModal;
this.IsClosed=this.isClosed;
this.IsPinned=this.isPinned;
this.IsVisible=this.isVisible;
this.IsActive=this.isActive;
this.IsBehaviorEnabled=this.isBehaviorEnabled;
};
a.RadWindow.prototype={_getLocalization:function(){return a.RadWindowUtils.Localization;
},_getLocalizationString:function(e){var c=this.get_localization();
if(typeof(c)=="string"){c=Sys.Serialization.JavaScriptSerializer.deserialize(c);
this.set_localization(c);
}var d=this._getLocalization();
if(!c){return d[e];
}return c[e];
},_registerGlobalBodyEventHandlers:function(c){var d=this.get_shortcuts();
if(!d){return;
}if(!this._shortCutManager){this._shortCutManager=new a.WindowShortCutManager(d);
}if(c){this._onKeyDownDelegate=Function.createDelegate(this,this._onKeyDown);
$addHandler(document.documentElement,"keydown",this._onKeyDownDelegate);
}else{if(this._onKeyDownDelegate){$removeHandler(document.documentElement,"keydown",this._onKeyDownDelegate);
this._onKeyDownDelegate=null;
}}},_registerIframeLoadHandler:function(c){if(!this._iframe){return;
}if(c){this._onIframeLoadDelegate=Function.createDelegate(this,this._onIframeLoad);
$addHandler(this._iframe,"load",this._onIframeLoadDelegate);
}else{if(this._onIframeLoadDelegate){$removeHandler(this._iframe,"load",this._onIframeLoadDelegate);
this._onIframeLoadDelegate=null;
$clearHandlers(this._iframe);
}}},_registerWindowResizeHandler:function(c){if(c){this._onWindowResizeDelegate=Function.createDelegate(this,this._maintainMaximizedSize);
$addHandler(window,"resize",this._onWindowResizeDelegate);
}else{if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate);
this._onWindowResizeDelegate=null;
}}},_registerOpenerElementHandler:function(d,c){if(!d){return;
}if(Sys.UI.DomElement.containsCssClass(d,"RadButton")){d.setAttribute("rwOpener",true);
}else{d.removeAttribute("rwOpener");
}if(true==c){this._onClickDelegate=Function.createDelegate(this,this._onClick);
$addHandler(d,"click",this._onClickDelegate);
}else{var e=$removeHandler(d,"click",this._onClickDelegate);
this._onClickDelegate=null;
}},_registerTitlebarHandlers:function(d){var c=this._titleCell;
if(d){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore();
}else{if(this.isBehaviorEnabled(a.WindowBehaviors.Maximize)){if(this.isMaximized()){this.restore();
}else{this.maximize();
}}}});
this._onTitlebarClickDelegate=Function.createDelegate(this,function(){this.setActive(true);
});
$addHandler(c,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(c,"click",this._onTitlebarClickDelegate);
}else{if(c){if(this._onTitlebarDblclickDelegate){$removeHandler(c,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}if(this._onTitlebarClickDelegate){$removeHandler(c,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}$clearHandlers(c);
}}},_makeModal:function(c){if(this._onModalShowHandler){this.remove_show(this._onModalShowHandler);
this._onModalShowHandler=null;
}if(this._onModalCloseHandler){this.remove_close(this._onModalCloseHandler);
this._onModalCloseHandler=null;
}if(this._modalExtender){this._modalExtender.dispose();
this._modalExtender=null;
}if(!c){return;
}if(typeof(a.RadWindowManager)!="undefined"&&a.RadWindowManager.isInstanceOfType(this)){return;
}this._onModalShowHandler=function(e){if(!e._modalExtender){e._modalExtender=new a.ModalExtender(e._popupElement);
}e._modalExtender.show();
var f=document.activeElement;
if(f&&f.tagName.toLowerCase()!="body"){var d=(!$telerik.isDescendant(this._contentElement,f)&&this._dockMode);
if(!(e._isPredefined)||d){e._focusedPageElement=f;
f.blur();
}}e.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(d){window.setTimeout(function(){if(d._modalExtender){d._modalExtender.hide();
}var e=d._focusedPageElement;
if(e){try{e.focus();
}catch(f){}d._focusedPageElement=null;
}},10);
};
this.add_close(this._onModalCloseHandler);
},_enableMoveResize:function(d){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!d){return;
}if(!this._popupElement){return;
}var g=this._tableElement.rows;
var f={};
var e=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(a.WindowBehaviors.Resize)){if(e){f={nw:g[0].cells[2],n:this._topResizer,ne:g[0].cells[0],w:[g[1].cells[2],g[2].cells[2]],e:[g[1].cells[0],g[2].cells[0]],sw:g[3].cells[2],s:g[3].cells[1],se:[g[3].cells[0],this._bottomResizer]};
}else{f={nw:g[0].cells[0],n:this._topResizer,ne:g[0].cells[2],w:[g[1].cells[0],g[2].cells[0]],e:[g[1].cells[2],g[2].cells[2]],sw:g[3].cells[0],s:g[3].cells[1],se:[g[3].cells[2],this._bottomResizer]};
}}if(this.isBehaviorEnabled(a.WindowBehaviors.Move)){f.move=this._titleCell;
}this._resizeExtender=new a.ResizeExtender(this,this._popupElement,f,this._tableElement);
var c=this._dockMode?null:this._iframe;
this._resizeExtender.set_iframeToSkip(c);
},_setResizeOverlayVisible:function(f){if(this._dockMode){return;
}var d=this._resizeOverlayElement;
if(!d){var e=this._getHandlesWidth();
var c=this._visibleTitlebar?this._tableElement.rows[0].offsetHeight:e;
d=document.createElement("div");
d.style.position="absolute";
d.style.zIndex="1";
d.style.top=c+"px";
d.style.left=Math.round(e/2)+"px";
d.style.backgroundColor="White";
d.style.filter="alpha(opacity=0)";
d.style.opacity=0;
this._contentCell.appendChild(d);
this._resizeOverlayElement=d;
}this._setResizeOverlaySize();
d.style.display=f?"":"none";
},_setResizeOverlaySize:function(){var c=this._resizeOverlayElement;
if(c){var d=this._contentCell;
c.style.width=d.offsetWidth+"px";
c.style.height=d.offsetHeight+"px";
}},onResizeStart:function(){if(this.isMaximized()){return false;
}this.setActive(true);
this._setResizeOverlayVisible(true);
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
var c=new Sys.CancelEventArgs();
this.raiseEvent("resizeStart",c);
if(c.get_cancel()){return false;
}},onResizing:function(e){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,e)){this._manageVisibilityFirefox(false);
if(this._dockMode){this.setWidthDockMode(e.width-1);
this.setHeightDockMode(e.height-1);
}else{this._setResizeOverlaySize();
}var g=this._getCurrentBounds();
var d=this.get_minWidth();
var j=parseInt(this.get_maxWidth());
var f=this.get_minHeight();
var k=parseInt(this.get_maxHeight());
var i=false;
if(e.width<d||j&&e.width>j){var c=d;
if(e.width<d){e.width=d;
}else{e.width=j;
c=j;
}var h=this._resizeExtender._originalBounds;
if(this._resizeExtender._resizeDir.west){e.x=h.x+(h.width-c);
if(this._cachedDragZoneBounds){e.x-=this._cachedDragZoneBounds.x;
}}else{e.x=g.x;
}e.y=g.y;
e.height=g.height;
i=true;
}if(e.height<f||k&&e.height>k){e.height=(e.height<f)?f:k;
e.x=g.x;
e.y=g.y;
e.width=g.width;
i=true;
}if(i){this.setSize(e.width,e.height);
this._manageVisibilityFirefox(false);
this._setPopupVisible(e.x,e.y);
return false;
}this._updateTitleWidth();
return true;
}return false;
},onResizeEnd:function(){this._manageVisibilityFirefox(false);
this._cachedDragWindowBounds=null;
var c=this._getCurrentBounds();
if(!this._dockMode){this._setResizeOverlayVisible(false);
}this._setPopupVisible(c.x,c.y);
this._storeBounds();
if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this.raiseEvent("resizeEnd",new Sys.EventArgs());
this._manageVisibilityFirefox(true);
},onDragStart:function(){this.setActive(true);
if(this.isPinned()||this.isMaximized()){return false;
}if(this.isMinimized()&&this.get_minimizeZoneID()){return false;
}var e=this.get_popupElement();
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
var c=$telerik.getSize(e);
var d=$telerik.getBorderBox(e);
c.width-=d.horizontal;
c.height-=d.vertical;
this._cachedDragWindowBounds=c;
this._setResizeOverlayVisible(true);
this.raiseEvent("dragStart",new Sys.EventArgs());
return true;
},onDragEnd:function(d){this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this._setResizeOverlayVisible(false);
this._manageVisibilityFirefox(false);
var c=this._getCurrentBounds();
this._manageVisibilityFirefox(false);
this.moveTo(c.x,c.y);
this.setActive(true);
if(this.isMinimized()){this._getTitleElement().style.width="";
}this._manageVisibilityFirefox(true);
this.raiseEvent("dragEnd",new Sys.EventArgs());
},onDrag:function(f){if(!this._cachedDragZoneBounds){return true;
}var d=this._cachedDragWindowBounds;
var e=this._cachedDragZoneBounds;
f.width=d.width;
f.height=d.height;
var c=this._checkRestrictionZoneBounds(e,f);
if(!c){if(f.x<=e.x){f.x=e.x;
}else{if(e.x+e.width<=f.x+d.width){f.x=e.x+e.width-d.width;
}}if(f.y<=e.y){f.y=e.y;
}else{if(e.y+e.height<=f.y+d.height){f.y=e.y+e.height-d.height;
}}c=true;
}return c;
},initialize:function(){a.RadWindow.callBaseMethod(this,"initialize");
if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show();
}),0);
}this._registerWindowResizeHandler(true);
var c=this.get_element().className;
if(c){this.set_cssClass(c.replace(/^ /,""));
}},dispose:function(){var d=this.get_windowManager();
if(d){if(d.get_preserveClientState()){d.saveWindowState(this);
}if(this.get_destroyOnClose()){d.removeWindow(this);
}}if(this._windowAnimation){this._windowAnimation.dispose();
}if(!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=this.get_destroyOnClose();
}this._enableMoveResize(false);
this._makeModal(false);
this._registerTitlebarHandlers(false);
if(this._titleIconElement){$clearHandlers(this._titleIconElement);
}this._registerWindowResizeHandler(false);
this._registerIframeLoadHandler(false);
if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false);
}this.set_behaviors(a.WindowBehaviors.None);
var i=this._iframe;
if(i){i.radWindow=null;
var g="sandbox" in document.createElement("iframe");
i.src=g?"about:blank":"javascript:'<html></html>';";
i.name="";
i.removeAttribute("name");
i.removeAttribute("NAME");
}this._createTouchScrollExtender(false);
if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML="";
}var c=this.get_contentElement();
if(this._dockMode&&c){if(Sys&&Sys.WebForms){var f=Sys.WebForms.PageRequestManager.getInstance();
if(f&&f.get_isInAsyncPostBack()){$telerik.disposeElement(c);
}}}var e=this._popupElement;
if(e&&e.parentNode){e.parentNode.removeChild(e);
}var h=this._popupBehavior;
if(this.get_destroyOnClose()&&h){h.dispose();
this._popupBehavior=null;
}a.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){this._hide();
this._registerGlobalBodyEventHandlers(false);
return true;
},clone:function(c){var d=document.createElement("span");
if(c){d.setAttribute("id",c);
}return $telerik.cloneControl(this,a.RadWindow,d);
},_createTouchScrollExtender:function(d){var e=$get(this.get_id()+"_C");
if(e){var c=this._dropDownTouchScroll;
if(c){if(!d){c.dispose();
this._dropDownTouchScroll=null;
}}else{if(d){this._dropDownTouchScroll=new a.TouchScrollExtender(e);
this._dropDownTouchScroll.initialize();
}}}},set_contentElement:function(c){if(!this._isPredefined){this._dockMode=true;
}var d=$get(this.get_id()+"_C");
if(d&&c!=d){$telerik.disposeElement(d);
d.innerHTML="";
d.appendChild(c);
c=d;
}this._createUI();
if(this._iframe){this._iframe.style.display="none";
}else{if(!this._dropDownTouchScroll&&a.TouchScrollExtender._getNeedsScrollExtender()){this._createTouchScrollExtender(true);
}}if(c.parentNode&&c.parentNode.removeChild){c.parentNode.removeChild(c);
}this._contentCell.appendChild(c);
c.style.display="";
this._contentElement=c;
},_setShadowCSSClass:function(c){var e=this._tableElement;
var d=this.get_popupElement();
if(!e||!d){return;
}if(c){Sys.UI.DomElement.addCssClass(e,"rwShadow");
Sys.UI.DomElement.addCssClass(d,"rwShadow");
}else{Sys.UI.DomElement.removeCssClass(e,"rwShadow");
Sys.UI.DomElement.removeCssClass(d,"rwShadow");
}},get_contentElement:function(){return this._contentElement;
},isCreated:function(){return this._popupElement!=null;
},show:function(){var d=this.isCreated();
this._createUI();
var c=new Sys.CancelEventArgs();
this.raiseEvent("beforeShow",c);
if(c.get_cancel()){return;
}if(this.get_navigateUrl()&&(!d||this.get_reloadOnShow())){this.setUrl(this.get_navigateUrl());
}if(!d&&(this.get_initialBehaviors()!=a.WindowBehaviors.None)){this._show();
this._afterShow();
if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Minimize)){this.minimize();
}if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Maximize)){this.maximize();
}if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Pin)){this.togglePin();
}return;
}if(this.isModal()){this.center();
}if(this.get_animation()==a.WindowAnimation.None){this._show();
this._afterShow();
}else{this._playAnimation();
}},_show:function(){if(this.get_offsetElementID()&&!this._offsetElement){var d=$get(this.get_offsetElementID());
if(d){this._offsetElement=d;
}}var c=this._popupBehavior.get_parentElement();
if(this._offsetElement&&!this._offsetSet){this._popupBehavior.set_parentElement(this._offsetElement);
this._offsetSet=true;
}this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
this._reSetWindowPosition();
var f=this._getStoredBounds();
if(this._firstShow&&!f){this.set_width(this.get_width());
this.set_height(this.get_height());
}else{this._restoreBounds();
}if(c!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(c);
}this._popupVisible=true;
var e=this.get_contentElement();
if(!this._isPredefned&&e){$telerik.repaintChildren(e);
}},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide();
}else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var c=Function.createDelegate(this,this._afterHide);
var d=this.isMaximized();
$telerik.$(this._popupElement).stop().fadeOut(this.get_animationDuration(),function(){c(d);
});
}},_afterHide:function(d){if(!this._popupBehavior){return;
}this._manageVisibilityFirefox(true);
if(d==null){d=this.isMaximized();
}var c=this.isMinimized();
if(d||c){this.restore();
}if($telerik.isFirefox){this.setOverflowVisible(false);
}this._popupBehavior.hide(true);
this._popupVisible=false;
this._getWindowController().notifyWindowClosed(this);
if(this.get_enableAriaSupport()&&this._popupElement&&!this.isVisible()){this._popupElement.setAttribute("aria-hidden","true");
}},_afterShow:function(){this.setActive(true);
if($telerik.isFirefox){this.setOverflowVisible(true);
}this._registerGlobalBodyEventHandlers(true);
this._storeBounds();
this.raiseEvent("show",new Sys.EventArgs());
var c=!this.get_animation()==a.WindowAnimation.None;
if(this.get_autoSize()&&(this._dockMode||c)){this.autoSize(c);
}if(this.get_enableAriaSupport()&&this._popupElement&&this.isVisible()){this._popupElement.setAttribute("aria-hidden","false");
}},_playAnimation:function(){var h=Function.createDelegate(this,function(){var m=this._getCalculatedPopupBounds();
this._setPopupVisible(m.x,m.y);
var l=$telerik.getBounds(this._popupElement);
var n=this.get_offsetElementID();
if(n){var o=$get(n);
if(o){var p=$telerik.getBounds(o);
l.x=p.x;
l.y=p.y;
}}$telerik.$(this._popupElement).hide();
return l;
});
var d=this._popupElement;
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var i=this.get_animation();
var f=this._openerElement?$telerik.getBounds(this._openerElement):null;
var c=h();
var g=this.get_animationDuration();
var e=""+this._position;
var k=null;
var j=Function.createDelegate(this,function(){var l=this.get_popupElement();
l.style.filter="";
if($telerik.isIE7){l.style.removeAttribute("filter");
}l.style.opacity="";
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true);
}this._show();
this._afterShow();
});
a.Animations.playJQueryAnimation(d,i,f,c,e,k,j,g);
},_onClick:function(c){this.show();
return this._cancelEvent(c);
},_onKeyDown:function(d){var c=this._shortCutManager.isShortCutHit(d);
if(!c){return;
}if(this.isActive()){this.fire(c.get_name());
}},_cancelEvent:function(c){if(c){c.returnValue=false;
c.cancelBubble=true;
c.preventDefault();
c.stopPropagation();
}return false;
},_getWindowController:function(){return a.RadWindowController.getInstance();
},_getReloadOnShowUrl:function(d){var e="rwndrnd="+Math.random();
if(d.indexOf("?")>-1){e="&"+e;
}else{e="?"+e;
}var c=d.indexOf("#");
d=(c>-1)?d.substr(0,c)+e+d.substr(c):d+e;
return d;
},getWindowBounds:function(){return this._getCalculatedPopupBounds();
},toString:function(){return"[RadWindow id="+this.get_id()+"]";
},center:function(){var c=this._getCentralBounds();
this.moveTo(c.x,c.y);
},moveTo:function(d,e){var f=this._popupElement;
if(this.isVisible()){this._manageVisibilityFirefox(false);
}if(f){var c=$telerik.getBounds(f);
var h=this._getRestrictionZoneBounds();
if(h){var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d+h.x,e+h.y,c.width,c.height));
if(!g){return false;
}}}d=parseInt(d);
e=parseInt(e);
this._createUI();
this._setPopupVisible(d,e);
this._storeBounds();
if(this.isVisible()){this._manageVisibilityFirefox(true);
}return true;
},setSize:function(c,d){this._firstShow=false;
this.set_width(c);
this.set_height(d);
this._storeBounds();
},_calculateBoundsToFit:function(f,d){var t=this.get_minWidth();
var q=this._getTitleElement();
if(q){q.style.width="1px";
}var s;
var p;
f.style.height="1px";
f.style.width="1px";
if(this._dockMode){var m=f.scrollWidth;
p=m>t?m:t;
s=f.scrollHeight;
Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading");
}else{p=d.scrollWidth;
if(p<t){f.style.width=t+"px";
p=d.scrollWidth;
}s=d.scrollHeight;
}var n=this._getRestrictionZoneBounds();
var r=n?n:this._getViewportBounds();
var g=this._getHandlesWidth()+p;
var k=this.get_defaultMinHeight()+s;
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){var j=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
if(j>0){k-=j;
}}var c=Math.min(g,r.width);
var i=Math.min(k,r.height);
var e=this.get_minWidth();
var l=this.get_minHeight();
var o=parseInt(this.get_maxHeight());
var h=parseInt(this.get_maxWidth());
if(e>c){c=e;
}if(l>i){i=l;
}if(o&&o<i){i=o;
}if(h&&h<c){c=h;
}return{width:c,height:i,contentPageWidth:p,contentPageHeight:s};
},_autoSizeBehaviorBounds:function(e,i){var f=this._getRestrictionZoneBounds();
var g=f?f:this._getViewportBounds();
var c=e;
if(f){c.y-=f.y;
c.x-=f.x;
}if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.WidthProportional)){c.x=this.calcPosition(e.x,e.width,i.width,g.width,false);
c.width=i.width;
}else{if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.Width)){c.width=i.width;
}}if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.HeightProportional)){c.y=this.calcPosition(e.y,e.height,i.height,g.height,true);
c.height=i.height;
}else{if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.Height)){c.height=i.height;
}}var h=17;
if(c.height<i.contentPageHeight){c.width=Math.min(c.width+h,g.width);
}if(c.width<i.contentPageWidth){c.height=Math.min(c.height+h,g.height);
}if(!f){this.set_keepInScreenBounds(true);
}else{if(c.width==f.width){c.x=0;
}if(c.height==f.height){c.y=0;
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){var d=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
c.height-=d;
}}}return c;
},autoSize:function(m){if(this.isClosed()){return;
}this.setOverflowVisible(true);
this._autoSizeInProgress=!this.get_autoSize();
var l=this.get_contentFrame();
var g=this.get_popupElement();
var i=$telerik.getBounds(g);
var f=$telerik.getBorderBox(g);
i.width-=f.horizontal;
i.height-=f.vertical;
var n=null;
var e=null;
var d=this.get_keepInScreenBounds();
var j=this.get_contentElement();
if(!this._dockMode){try{n=l.contentWindow.document.documentElement;
if(!n){return;
}}catch(h){return false;
}e=l.contentWindow.document.body;
var j=n;
if($telerik.isIE||$telerik.isFirefox){j=l;
}}var c=this._calculateBoundsToFit(j,n);
var k=this._autoSizeBehaviorBounds(i,c);
this.setOverflowVisible(false);
if(m){this._autoSizeWithAnimation(k);
}else{this._restoreRect=null;
this.setBounds(k);
this.setOverflowVisible(true);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
this.raiseEvent("autoSizeEnd",new Sys.EventArgs());
}if($telerik.isIE&&l){l.style.overflow="hidden";
setTimeout(function(){l.style.overflow="";
},0);
}this.set_keepInScreenBounds(d);
if(l){j.style.width="100%";
j.style.height="100%";
if($telerik.isIE9Mode){this.set_height(this.get_height());
}}return true;
},_autoSizeWithAnimation:function(e){var d=this.get_popupElement();
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var f=Function.createDelegate(this,function(){if(this.isClosed()){return;
}var h=this.get_popupElement();
h.style.filter="";
if($telerik.isIE7){h.style.removeAttribute("filter");
}h.style.opacity="";
this._restoreRect=null;
this.setBounds(e);
this.setOverflowVisible(true);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true);
}this.raiseEvent("autoSizeEnd",new Sys.EventArgs());
});
this._tableElement.style.height="100%";
var c={width:e.width,height:e.height,x:e.x,y:e.y};
var g=this._getRestrictionZoneBounds();
if(g){c.x+=g.x;
c.y+=g.y;
}$telerik.$(d).animate({width:c.width,height:c.height,left:c.x,top:c.y,opacity:1},300,null,f);
},setBounds:function(c){if(!c){return;
}this._checkRestrictionZoneBounds=function(){return true;
};
this.moveTo(c.x,c.y);
this.setSize(c.width,c.height);
this._checkRestrictionZoneBounds=a.RadWindow.prototype._checkRestrictionZoneBounds;
},_substractWrappersBorder:function(c,e){var g=this.get_popupElement();
var d=this._contentCell;
if(!g||!d){return c;
}var h=$telerik.getBorderBox(g);
var f=$telerik.getBorderBox(d);
c-=e?(h.horizontal+f.hrizontal):(h.vertical+f.vertical);
return c;
},setWidthDockMode:function(c){if(!this._dockMode||!this.get_contentElement()){return;
}widthToSet=this._substractWrappersBorder(c)-this._getHandlesWidth();
if(widthToSet>0){this._contentElement.style.width=widthToSet+"px";
}},setHeightDockMode:function(f){if(!this._dockMode||!this.get_contentElement()){return;
}var d=this._substractWrappersBorder(f);
var e=this.isVisible();
var c=this._tableElement.rows[3].cells[1];
var g=this._tableElement.rows[0].cells[1];
var h=this._tableElement.rows[2].cells[1];
d-=e?parseInt($telerik.getBounds(c).height):parseInt($telerik.getCurrentStyle(c,"height"));
if(this._visibleTitlebar){d-=e?parseInt($telerik.getBounds(this._titlebarElement).height):parseInt($telerik.getCurrentStyle(this._titlebarElement,"height"));
d-=e?parseInt($telerik.getBounds(this._topResizer).height):parseInt($telerik.getCurrentStyle(this._topResizer,"height"));
}else{d-=e?parseInt($telerik.getBounds(g).height):parseInt($telerik.getCurrentStyle(g,"height"));
}if(this._visibleStatusbar){d-=e?parseInt($telerik.getBounds(h).height):parseInt($telerik.getCurrentStyle(h,"height"));
}if(d>0){this._contentElement.style.height=d+"px";
}},calcPosition:function(d,e,c,f,i){var g=d+Math.round((e-c)/2);
if(g<0||g+e>f){g=Math.round(Math.abs((f-c)/2));
if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.Default)){var h=this._dockMode?window:this.BrowserWindow;
g+=i?Math.max(h.document.documentElement.scrollTop,h.document.body.scrollTop):Math.max(h.document.documentElement.scrollLeft,h.document.body.scrollLeft);
}}return g;
},_maintainMaximizedSize:function(){if(this.isVisible()&&this._getRestrictionZoneBounds()){this._reSetWindowPosition();
}if(!this.isMaximized()){return;
}var g=this._popupElement;
if(!g){return;
}var j=this._getViewportBounds();
g.style.top=(j.scrollTop+j.y)+"px";
g.style.left=(j.scrollLeft+j.x)+"px";
var i=parseInt(this.get_maxWidth());
var d=parseInt(this.get_maxHeight());
if(i){j.width=i;
}if(d){j.height=d;
}$telerik.setSize(g,{width:j.width,height:j.height});
var k=this._getRestrictionZoneBounds();
if(!k){this._enablePageScrolling(false);
}var e=this._tableElement;
j=$telerik.getContentSize(g);
var c=$telerik.getBorderBox(e);
var f=$telerik.getPaddingBox(e);
var h=j.height-c.vertical-f.vertical;
e.style.height=h+"px";
this._fixIeHeight(e,h);
if(this._dockMode){this.setWidthDockMode(j.width);
this.setHeightDockMode(j.height);
}this._updateTitleWidth();
},_enablePageScrolling:function(c){var d=document.body;
var e=document.documentElement;
if(c){if(null!=this._documentOverflow){e.style.overflow=this._documentOverflow;
}if(null!=this._bodyOverflow){d.style.overflow=this._bodyOverflow;
}this._documentOverflow=null;
this._bodyOverflow=null;
}else{if(null==this._documentOverflow){this._documentOverflow=e.style.overflow;
}if(null==this._bodyOverflow){this._bodyOverflow=d.style.overflow;
}d.style.overflow="hidden";
e.style.overflow="hidden";
}},_getRestrictionZoneBounds:function(){var d=null;
if(this.get_restrictionZoneID()){var c=$get(this.get_restrictionZoneID());
if(c){d=$telerik.getBounds(c);
d.scrollLeft=0;
d.scrollTop=0;
}}return d;
},_storeBounds:function(){if(!this.isCreated()){return;
}var c=this._getCurrentBounds();
if(this.isMaximized()){return false;
}if(this.isMinimized()){if(this._restoreRect){c.width=this._restoreRect.width;
c.height=this._restoreRect.height;
}else{c.width=this.get_width();
c.height=this.get_height();
}}this._restoreRect=c;
},_restoreBounds:function(){if(!this._restoreRect){return;
}var c=this._restoreRect;
this.setSize(c.width,c.height);
this.moveTo(c.x,c.y);
},_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect;
}},_deleteStoredBounds:function(){this._restoreRect=null;
},_getCurrentBounds:function(){var c=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){this._updateWindowSize(this._height);
this._firstShow=true;
}var e=$telerik.getBounds(this._popupElement);
if(c){this._popupElement.style.display="none";
}var d=this._getRestrictionZoneBounds();
if(d){e.x-=d.x;
e.y-=d.y;
}return e;
},_getCentralBounds:function(){var f=this._getCurrentBounds();
var c=this._getViewportBounds();
var e=parseInt((c.width-f.width)/2);
var d=parseInt((c.height-f.height)/2);
f.x=e+c.scrollLeft;
f.y=d+c.scrollTop;
return f;
},_getViewportBounds:function(){var d=this._getRestrictionZoneBounds();
if(d){return d;
}var f=$telerik.getClientBounds();
var c=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body);
var e=document.documentElement.scrollTop||document.body.scrollTop;
f.scrollLeft=c;
f.scrollTop=e;
if(this.isIE){if(f.width==0){f.width=document.body.clientWidth;
}if(f.height==0){f.height=document.body.clientHeight;
}}return f;
},_getCalculatedPopupBounds:function(){var g=this._getStoredBounds();
if(g){return g;
}var c=this._getCurrentBounds();
var d=this._offsetElement;
if(this._top==null&&this._left==null&&!d){c=this._getCentralBounds();
}else{if(d){c.y=0;
c.x=0;
}else{var h=this._getViewportBounds();
c.x=h.scrollLeft;
c.y=h.scrollTop;
}var e=this._left?this._left:0;
c.x+=e;
var f=this._top?this._top:0;
c.y+=f;
}return c;
},_checkRestrictionZoneBounds:function(c,e){var d=c;
if(!d){d=this._getRestrictionZoneBounds();
if(!d){return true;
}}return a.ResizeExtender.containsBounds(d,e);
},_reSetWindowPosition:function(){var c=this._getCalculatedPopupBounds();
this._setPopupVisible(c.x,c.y);
},_fixIeHeight:function(d,c){if("CSS1Compat"==document.compatMode){var e=(d.offsetHeight-parseInt(c));
if(e>0){var f=(parseInt(d.style.height)-e);
if(f>0){d.style.height=f+"px";
}}}},_setPopupVisible:function(d,e){var c=this._getRestrictionZoneBounds();
if(c){d+=c.x;
e+=c.y;
}this._popupBehavior._setCoordinates(d,e);
this._popupBehavior.show();
if(!this.get_width()){this._popupElement.style.width="";
}this._updateTitleWidth();
},_createDefaultTable:function(){var c=document.createElement("table");
c.align="left";
c.cellSpacing=0;
c.cellPadding=0;
c.insertRow(-1);
return c;
},_isWindowRightToLeft:function(){var c=this._isRightToLeft;
if(c==null){var d=this.get_element();
var e=d.parentNode?d:this._getDefaultParent();
c=this._isRightToLeft=$telerik.isRightToLeft(e);
}return c;
},_createStatusbarResizer:function(d){var c=d.rows[0].insertCell(-1);
c.style.width="15px";
var e=document.createElement("div");
c.appendChild(e);
this._bottomResizer=e;
},_createStatusbarMessageCell:function(c){var e=c.rows[0].insertCell(-1);
e.style.width="100%";
var f=this._getStatusMessageElement();
e.appendChild(f);
var d=document.createElement("label");
d.setAttribute("for",f.id);
d.innerHTML="status label";
d.style.display="none";
e.appendChild(d);
},_createUI:function(){if(!this._popupElement){var z=this.get_id();
var q="RadWindowWrapper_"+z;
var A=this._isWindowRightToLeft();
var p=document.createElement("div");
p.id=q;
p.className=this._getFullSkinName();
var g=this.get_cssClass();
if(g){Sys.UI.DomElement.addCssClass(p,g);
}if(A){Sys.UI.DomElement.addCssClass(p,"RadWindow_rtl");
}if(!this._visibleTitlebar){Sys.UI.DomElement.addCssClass(p,"rwNoTitleBar");
}p.style.width=this._width;
p.style.height=this._height;
p.setAttribute("unselectable","on");
this._popupElement=p;
var h=document.createElement("table");
h.cellSpacing=0;
h.cellPadding=0;
Sys.UI.DomElement.addCssClass(h,"rwTable");
this._tableElement=h;
var f=[];
if(A){f=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"];
}else{f=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"];
}var x=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var v=0;
for(var t=0;
t<4;
t++){var n=h.insertRow(-1);
n.className=x[t];
for(var u=1;
u<=3;
u++){var D=n.insertCell(-1);
D.innerHTML="&nbsp;";
D.className=f[v];
v++;
}}var r=h.rows[0].cells[1];
r.innerHTML="";
this._titleCell=r;
var e=document.createElement("div");
e.className="rwTopResize";
e.innerHTML="<!-- / -->";
this._topResizer=e;
this._titleCell.appendChild(this._topResizer);
var s=this._createDefaultTable();
s.className="rwTitlebarControls";
this._titlebarElement=s;
this._titleCell.appendChild(this._titlebarElement);
var d=this._getTitleIcon();
var l=this._titlebarElement.rows[0].insertCell(-1);
l.appendChild(d);
this.set_iconUrl(this.get_iconUrl());
var y=this._getTitleElement();
var r=this._titlebarElement.rows[0].insertCell(-1);
r.appendChild(y);
this.set_title(this._title);
var B=this._titlebarElement.rows[0].insertCell(-1);
B.noWrap=true;
B.style.whiteSpace="nowrap";
B.appendChild(this._getTitleCommandButtonsHolder());
var m=h.rows[1].cells[1];
m.vAlign="top";
m.innerHTML="";
this._contentCell=m;
if(!(this._dockMode||this._isPredefined)){Sys.UI.DomElement.addCssClass(this._contentCell,"rwExternalContent");
}if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}var c=this.get_name();
var C=this._createDefaultTable();
C.style.width="100%";
this._statusCell=h.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(C);
if(A){this._createStatusbarResizer(C);
this._createStatusbarMessageCell(C);
}else{this._createStatusbarMessageCell(C);
this._createStatusbarResizer(C);
}this._popupElement.appendChild(this._tableElement);
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
this._addWindowToDocument();
this._registerTitlebarHandlers(true);
this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
if(this.get_enableAriaSupport()){this._applyAriaSupport();
}if(this._dockMode){var k=$get(this.get_id()+"_C");
if(k&&k.innerHTML){k.style.overflow="auto";
k.style.border="0px";
this.set_contentElement(k);
this.setWidthDockMode(this.get_width());
this.setHeightDockMode(this.get_height());
}}else{var o=($telerik.isIE&&!$telerik.isIE9Mode)?document.createElement("<iframe name='"+c+"'>"):document.createElement("iframe");
o.name=c;
o.src="javascript:'<html></html>';";
o.style.width="100%";
o.style.height="100%";
o.style.border="0px";
o.frameBorder="0";
if($telerik.isIE8){o.style.display="block";
}this._iframe=o;
if($telerik.isMobileSafari&&!this._isPredefined){var w=document.createElement("div");
w.style.width="100%";
w.style.height="100%";
w.style.overflow="hidden";
w.appendChild(this._iframe);
this._contentCell.appendChild(w);
}else{this._contentCell.appendChild(this._iframe);
}this._createBackReference();
}this._updateOpacity();
}if(!this._popupBehavior){this.set_behaviors(this._behaviors);
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:(new Date()-100)+"PopupBehavior",parentElement:null,overlay:this._overlay,keepInScreenBounds:this._keepInScreenBounds},null,null,this._popupElement);
}},_getDefaultParent:function(){var c=this.get_formID()?document.getElementById(this.get_formID()):null;
if(!c){if(document.forms&&document.forms.length>0){c=document.forms[0];
}else{c=document.body;
}}return c;
},_getStatusMessageElement:function(){if(null==this._statusMessageElement){var c=document.createElement("input");
c.id=this.get_id()+"_status";
c.readOnly="readonly";
c.setAttribute("unselectable","on");
this._statusMessageElement=c;
}return this._statusMessageElement;
},_getTitleCommandButtonsHolder:function(){if(null==this._buttonsElement){var c=document.createElement("ul");
c.className="rwControlButtons";
this._buttonsElement=c;
if(this.get_enableAriaSupport()){c.setAttribute("role","presentation");
}}return this._buttonsElement;
},_getTitleElement:function(){if(!this._titleElement){this._titleElement=document.createElement("em");
this._titleElement.setAttribute("unselectable","on");
if(this.get_enableAriaSupport()){this._titleElement.id=this.get_id()+"_title";
this._titleElement.setAttribute=("role","label");
}}return this._titleElement;
},_getTitleIcon:function(){if(null==this._titleIconElement){var c=document.createElement("a");
this._titleIconElement=c;
c.className="rwIcon";
$addHandler(this._titleIconElement,"mousedown",this._cancelEvent);
}return this._titleIconElement;
},_getTitleCommandButton:function(d){if(!d||!this._buttonsArray){return null;
}var g=d.toLowerCase();
g=g.charAt(0).toUpperCase()+g.substring(1);
d="rw"+g+"Button";
var e=this._buttonsArray.length;
for(var f=0;
f<e;
f++){var c=this._buttonsArray[f];
if(c&&Sys.UI.DomElement.containsCssClass(c,d)){return c;
}}return null;
},_getHandlesWidth:function(){if(!this._handlesWidth){var c=this._tableElement;
if(!c){return 0;
}var d=parseInt($telerik.getCurrentStyle(c.rows[2].cells[0],"width"));
if(!d){return 0;
}this._handlesWidth=2*d;
}return this._handlesWidth;
},get_defaultMinWidth:function(){if(!this._defaultMinWidth){var f=this._getHandlesWidth();
this._defaultMinWidth=f;
if(this._visibleTitlebar){var g=this._tableElement;
var d=this._getTitleElement();
var e=d.style.width;
if(d){d.style.width="1px";
}if(this._dockMode){this._contentElement.style.width="1px";
}g.style.width="1px";
var c=this._titleCell.offsetWidth;
d.style.width=e;
g.style.width="";
if(this._dockMode){this._contentElement.style.width="";
}this._defaultMinWidth+=c;
}}return this._defaultMinWidth;
},get_defaultMinHeight:function(){if(!this._defaultMinHeight){var c=Math.ceil(this._getHandlesWidth()/2);
this._defaultMinHeight=c;
this._defaultMinHeight+=this._visibleTitlebar?this._titleCell.offsetHeight:c;
this._defaultMinHeight+=this._visibleStatusbar?this._statusCell.offsetHeight:0;
}return this._defaultMinHeight;
},setOverflowVisible:function(f){if(!f&&this._overflowHidden){return;
}var c="hidden";
var g="hidden";
var i="hidden";
var j;
var d;
if(!this._dockMode){try{var h=this.get_contentFrame();
if(h){h.style.overflow=f?"":"hidden";
}j=h.contentWindow.document.documentElement;
if(!j){return;
}d=h.contentWindow.document.body;
if(!f){this._oldBodyOverflow=d.style.overflow;
this._oldDocOverflow=j.style.overflow;
this._overflowHidden=true;
}}catch(e){}}if(f){g=this._oldBodyOverflow;
i=this._oldDocOverflow;
c="auto";
this._overflowHidden=false;
}if(this._dockMode){this.get_contentElement().style.overflow=c;
}else{if(j&&d){if(i||i==""){j.style.overflow=i;
}if(g||g==""){d.style.overflow=g;
}}}},_manageVisibilityFirefox:function(d){var c=this._popupBehavior;
if($telerik.isFirefox&&Sys.Browser.version<4&&c){c.set_manageVisibility(d);
}},_updateTitleWidth:function(){if(this._visibleTitlebar&&!this.isMinimized()){var i=this._getTitleElement();
if(!i){return;
}i.style.width="1px";
var c=0;
var k=this._getTitleCommandButtonsHolder();
var h=k.offsetWidth;
if(h>0){var g=k.getElementsByTagName("LI");
if(g[0]&&g[0].offsetWidth>0){h=g.length*g[0].offsetWidth;
}k.style.width=h+"px";
c+=h;
}var f=this._getTitleIcon();
var d=f.offsetWidth;
if(d>0&&f.parentNode.tagName=="TD"){f.parentNode.style.width=d+"px";
c+=d;
}c+=this._getHandlesWidth();
var j=0;
var e=this._titlebarElement;
j=e?e.offsetWidth-c:c;
if(j>0){i.style.width=j+"px";
}}},_addWindowToDocument:function(){var c=this._getDefaultParent();
c.insertBefore(this._popupElement,c.firstChild);
},_createBackReference:function(){var f=this;
if(!f.Argument){f.Argument={};
}var c=this._iframe;
try{c.radWindow=f;
if(c.contentWindow!=null){c.contentWindow.radWindow=f;
}}catch(d){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(f){var d=(true==f)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize");
var g=(true==f)?this.restore:this.minimize;
var e=this._getTitleCommandButton("Minimize");
if(!(this.isBehaviorEnabled(a.WindowBehaviors.Close))&&e){var c=e.parentNode;
var h=this._isWindowRightToLeft()?"right":"left";
if(true==f){h=(h=="right")?"left":"right";
}c.style.styleFloat=h;
c.style.cssFloat=h;
}this._registerTitlebarHandlersButton("Minimize",d,g);
},_configureMaximizeButton:function(e){var d=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Maximize");
var c=(true==e)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",d,c);
},_registerTitlebarHandlersButton:function(c,e,f){var d=this._getTitleCommandButton(c);
if(d){d.setAttribute("title",e);
d.innerHTML=e;
$clearHandlers(d);
$addHandlers(d,{click:f},this);
$addHandler(d,"dblclick",this._cancelEvent);
$addHandler(d,"mousedown",this._cancelEvent);
}},isCloned:function(){return this._isCloned;
},isBehaviorEnabled:function(c){return c&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(c){return c&this.get_initialBehaviors()?true:false;
},isAutoSizeBehaviorEnabled:function(c){return c&this.get_autoSizeBehaviors()?true:false;
},setVisible:function(c){if(this._popupBehavior){if(c){this._popupBehavior.show();
}else{this._popupBehavior.hide();
}}},isVisible:function(){return this._popupVisible;
},isModal:function(){return this._modal;
},isActive:function(){return(this._popupElement&&!Sys.UI.DomElement.containsCssClass(this._popupElement,"rwInactiveWindow"));
},isPinned:function(){var c=this._getTitleCommandButton("Pin");
return(c&&Sys.UI.DomElement.containsCssClass(c,"on"));
},isClosed:function(){return(!this.isVisible());
},isMinimized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMinimizedWindow"));
},isMaximized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMaximizedWindow"));
},_moveToMinimizeZone:function(){var d=$get(this.get_minimizeZoneID());
if(d){if(this.isPinned()){this._isPinned=true;
this.togglePin();
}var c=this._popupElement;
if(c.parentNode!=d){c.parentNode.removeChild(c);
d.appendChild(c);
this.setVisible(true);
c.style.position="static";
if(this.isIE){c.style.display="inline";
}else{c.style.cssFloat="left";
}}}},_moveToDocument:function(){var c=this._popupElement;
c.parentNode.removeChild(c);
c.style.position="absolute";
if(this.isIE){c.style.display="";
}else{c.style.cssFloat="";
}this._addWindowToDocument();
if(this._isPinned){this._isPinned=false;
this.togglePin();
}},minimize:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Minimize");
if(!d){return;
}if(this.isMaximized()){this._normalizeWindowRootCss();
this._restoreBounds();
}var c=this._popupElement;
$telerik.removeCssClasses(c,["rwNormalWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(c,"rwMinimizedWindow");
if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
Sys.UI.DomElement.addCssClass(c,"rwMinimizedWindowShadow");
}var e=c._hideWindowedElementsIFrame;
if(e){Sys.UI.DomElement.addCssClass(e,"rwMinimizedWindowOverlay");
}this._configureMinimizeButton(true);
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
this._getTitleElement().style.width="";
if(this.get_minimizeZoneID()){this._moveToMinimizeZone();
}},restore:function(){if(!this.isCreated()||this.isClosed()){return;
}var c=this.onCommand("Restore");
if(!c){return;
}this._configureMinimizeButton();
this._configureMaximizeButton();
if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument();
}this._normalizeWindowRootCss();
this._enablePageScrolling(true);
this._restoreBounds();
this._manageVisibilityFirefox(false);
this.setVisible(true);
if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}if(this.get_showOnTopWhenMaximized()&&this._restoreZindex){this._popupElement.style.zIndex=this._restoreZindex;
this._restoreZindex=null;
}this.setVisible(true);
this.setActive(true);
this._manageVisibilityFirefox(true);
if(this.isVisible()){this._show();
}},maximize:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Maximize");
if(!d){return;
}this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument();
}if(this.isMinimized()){this._normalizeWindowRootCss();
this._checkRestrictionZoneBounds=function(){return true;
};
this._restoreBounds();
this._checkRestrictionZoneBounds=a.RadWindow.prototype._checkRestrictionZoneBounds;
}this._setShadowCSSClass(false);
var c=this._popupElement;
$telerik.removeCssClasses(c,["rwNormalWindow","rwMinimizedWindow","rwMinimizedWindowShadow"]);
Sys.UI.DomElement.addCssClass(c,"rwMaximizedWindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var f=c._hideWindowedElementsIFrame;
if(f){Sys.UI.DomElement.removeCssClass(f,"rwMinimizedWindowOverlay");
this._popupBehavior._handleElementResize();
}if(!this.isActive()){this.setActive(true);
}if(!this.isActive()){this.setActive(true);
}if(this.get_showOnTopWhenMaximized()){var e=c.style.zIndex;
if(e){this._restoreZindex=e;
}c.style.zIndex=100000;
}this._updateTitleWidth();
},setActive:function(c){var f=this._popupElement;
if(!c){Sys.UI.DomElement.addCssClass(f,"rwInactiveWindow");
}else{if(!this.isMaximized()){var d=parseInt(f.style.zIndex);
var e=(this.get_stylezindex())?this.get_stylezindex():a.RadWindowUtils.get_newZindex(d);
f.style.zIndex=""+e;
}this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){return;
}Sys.UI.DomElement.removeCssClass(f,"rwInactiveWindow");
}},togglePin:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Pin");
if(!d){return;
}var c=this._getTitleCommandButton("Pin");
var f=this.isPinned();
var e=f?this._getLocalizationString("PinOn"):this._getLocalizationString("PinOff");
if(c){Sys.UI.DomElement.toggleCssClass(c,"on");
}this._registerTitlebarHandlersButton("Pin",e,this.togglePin);
a.RadWindowUtils.setPinned(!f,this);
},reload:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Reload");
if(!d){return;
}if(!this._iframe){return;
}this._onWindowUrlChanging();
try{this._iframe.contentWindow.location.reload();
if(($telerik.isChrome||$telerik.isSafari)&&this._iframe.contentWindow.document.domain!=document.domain){this._onWindowUrlChanged();
}}catch(c){this._onWindowUrlChanged();
}},fire:function(d){if(d&&typeof(this[d])=="function"){this[d]();
}else{var c=this.get_windowManager();
if(!c){return;
}if(d&&typeof(c[d])=="function"){c[d]();
}}},_normalizeWindowRootCss:function(){var c=this._popupElement;
if(c){$telerik.removeCssClasses(c,["rwMinimizedWindow","rwMaximizedWindow","rwMinimizedWindowShadow"]);
Sys.UI.DomElement.addCssClass(c,"rwNormalWindow");
var d=c._hideWindowedElementsIFrame;
if(d){Sys.UI.DomElement.removeCssClass(d,"rwMinimizedWindowOverlay");
}}this._updateTitleWidth();
},close:function(c){if(this.isClosed()){return;
}var e=new Sys.CancelEventArgs();
var d=(typeof(c)!="undefined"&&!(c instanceof Sys.UI.DomEvent))?c:null;
e._argument=d;
e.get_argument=function(){return this._argument;
};
this.raiseEvent("beforeClose",e);
if(e.get_cancel()){return;
}this.hide();
var f=new Sys.EventArgs();
f._argument=d;
f.get_argument=function(){return this._argument;
};
this.raiseEvent("close",f);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(c instanceof Sys.UI.DomEvent){c=null;
}this._invokeDialogCallBackFunction(c);
if(this.get_destroyOnClose()&&!this._dockMode){this.dispose();
}},_invokeDialogCallBackFunction:function(d){var c=this.get_clientCallBackFunction();
if(c){if("string"==typeof(c)){c=eval(c);
}if("function"==typeof(c)){c(this,d);
}}},onCommand:function(d){var c=new Sys.CancelEventArgs();
c._commandName=d;
c.get_commandName=function(){return this._commandName;
};
this.raise_command(c);
if(c.get_cancel()){return false;
}return true;
},setUrl:function(d){if(this._dockMode){return;
}this._createUI();
this.set_navigateUrl(d);
var c=d;
if(this.get_reloadOnShow()){c=this._getReloadOnShowUrl(c);
}this._iframe.src=c;
this._onWindowUrlChanging();
if(!this._loaded){this._registerIframeLoadHandler(true);
}this._loaded=true;
},_registerChildPageHandlers:function(c){var d=null;
try{d=this._iframe.contentWindow.document;
if(d.domain!=document.domain){return;
}}catch(f){return;
}if(null==d){return;
}if(c){this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(d,"click",this._onChildPageClickDelegate);
}else{if(this._onChildPageClickDelegate){$telerik.removeExternalHandler(d,"click",this._onChildPageClickDelegate);
this._onChildPageClickDelegate=null;
}}},_onChildPageUnload:function(d){this._registerChildPageHandlers(false);
if(this._removeFromDOM&&!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=false;
var c=this._popupElement;
if(c&&c.parentNode){c.parentNode.removeChild(c);
}}},_onChildPageClick:function(d){if(!this.isVisible()||this.isClosed()){return;
}var c=d.target?d.target:d.srcElement;
if(c){if(c.tagName=="INPUT"&&c.type=="button"){return;
}else{if(c.tagName=="BUTTON"||c.tagName=="A"){return;
}}}this.setActive(true);
},_onIframeLoad:function(){this._onWindowUrlChanged();
if($telerik.isFirefox){this.setOverflowVisible(true);
}this._registerChildPageHandlers(true);
this.raiseEvent("pageLoad",new Sys.EventArgs());
if(this.get_autoSize()){var d=this.get_animation()!=a.WindowAnimation.None;
this.autoSize(d);
}var c=null;
try{c=this._iframe.contentWindow;
var e=c.document;
}catch(f){return false;
}c.close=Function.createDelegate(this,function(){this.close();
});
},_onWindowUrlChanging:function(){if(this.get_showContentDuringLoad()){var d=this._getStatusMessageElement();
if(d){Sys.UI.DomElement.addCssClass(d,"rwLoading");
}}else{var c=this._iframe.style;
c.position="absolute";
c.top="-10000px";
if($telerik.isIE9Mode){this._updateWindowSize(this._height);
}if(this._isWindowRightToLeft()&&$telerik.isChrome){c.width="1px";
}var e=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(e,"rwLoading");
}},_onWindowUrlChanged:function(){var c=this._getStatusMessageElement();
if(this.get_showContentDuringLoad()){if(c){Sys.UI.DomElement.removeCssClass(c,"rwLoading");
}}else{this._iframe.style.position="";
if(this._isWindowRightToLeft()&&$telerik.isChrome){this._iframe.style.width="100%";
}var d=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(d,"rwLoading");
if($telerik.isIE9Mode){if(this.isMaximized()){this._maintainMaximizedSize();
}else{if(!this.isMinimized()){this._updateWindowSize(this.get_height());
}}}}if(c){this.set_status(this.get_navigateUrl());
}try{var f=this._iframe.contentWindow.document.title;
if(f&&f!=this.get_title()){this.set_title(f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"));
}}catch(g){}},_updatePopupZindex:function(){if(this._popupBehavior){if(this.isVisible()){this._popupBehavior.show();
}}},_updateOpacity:function(){var c=this._dockMode?this.get_contentElement():this.get_contentFrame();
if(c){if(this._opacity<100){this._contentCell.style.background="none transparent";
var d=c.style;
d.filter="alpha(opacity="+this._opacity+")";
d.opacity=(this._opacity/100);
}else{this._contentCell.style.background="";
if($telerik.isIE){this._contentCell.removeAttribute("style");
c.style.removeAttribute("filter");
c.style.removeAttribute("opacity");
}else{c.style.filter="";
c.style.opacity="";
}}}},get_zindex:function(){if(this._popupElement){return this._popupElement.style.zIndex;
}else{return -1;
}},get_browserWindow:function(){return this._browserWindow;
},get_contentFrame:function(){return this._iframe;
},get_offsetElementID:function(){return this._offsetElementID;
},set_offsetElementID:function(c){if(this._offsetElementID!=c){this._offsetElementID=c;
this._offsetElement=$get(c);
this._deleteStoredBounds();
this._offsetSet=false;
}if(this.isVisible()){this._show();
}},get_openerElementID:function(){return this._openerElementID;
},set_openerElementID:function(c){if(this._openerElementID!=c){if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}this._openerElementID=c;
if(this._openerElementID){this._openerElement=$get(this._openerElementID);
}if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,true);
}}},get_left:function(){return this._left;
},set_left:function(c){if(this._left!=c){this._left=parseInt(c)||parseInt(c)==0?parseInt(c):null;
}},get_top:function(){return this._top;
},set_top:function(c){if(this._top!=c){this._top=parseInt(c)||parseInt(c)==0?parseInt(c):null;
}},get_stylezindex:function(){return this.get_element()?parseInt(this.get_element().style.zIndex||$telerik.getCurrentStyle(this.get_element(),"zIndex")):null;
},get_title:function(){return this._title;
},set_title:function(c){if(this._title!=c){this._title=c;
}if(null==this._titleElement){return;
}this._titleElement.innerHTML=c==""?"&nbsp;":this._title;
this._updateTitleWidth();
},get_width:function(){return parseInt(this._width);
},_fixSizeValue:function(c){c=""+c;
if(-1==c.indexOf("px")){c=parseInt(c);
if(!isNaN(c)){c=c+"px";
}else{c="";
}}return c;
},set_width:function(c){if(null==c){return false;
}if(this.isMaximized()){return false;
}var e=this.get_minWidth();
if(e&&e>c){c=e;
}var i=parseInt(this.get_maxWidth());
if(i&&i<c){c=i;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}c=this._fixSizeValue(c);
var f=this._popupElement;
if(f){var d=$telerik.getBounds(f);
var g=parseInt(c);
if(isNaN(g)){g=d.width;
}var h=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d.x,d.y,g,d.height));
if(!h){return false;
}}if(this._width!=c){this._width=c;
}if(this._dockMode){this.setWidthDockMode(this.get_width());
}if(f){this._deleteStoredBounds();
f.style.width=(parseInt(this._width)-$telerik.getBorderBox(f).horizontal)+"px";
this._updatePopupZindex();
}this._updateTitleWidth();
this._manageVisibilityFirefox(true);
return true;
},get_minWidth:function(){var c=parseInt(this._minWidth);
if(!this.isCreated()){return c;
}var d=this.get_defaultMinWidth();
return(c&&(c>d))?c:d;
},set_minWidth:function(c){if(this._minWidth!=c){this._minWidth=c;
}},get_minHeight:function(){var c=parseInt(this._minHeight);
if(!this.isCreated()){return c;
}var d=this.get_defaultMinHeight();
return(c&&(c>d))?c:d;
},set_minHeight:function(c){if(this._minHeight!=c){this._minHeight=c;
}},get_height:function(){return parseInt(this._height);
},set_height:function(c){if(null==c){return false;
}if(this.isMaximized()){return false;
}var f=this.get_minHeight();
if(f&&f>c){c=f;
}var h=parseInt(this.get_maxHeight());
if(h&&h<c){c=h;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}c=this._fixSizeValue(c);
var e=this._popupElement;
if(e){this._firstShow=false;
var d=$telerik.getBounds(e);
var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d.x,d.y,d.width,parseInt(c)));
if(!g){return false;
}}if(this._height!=c){this._height=c;
}if(this._dockMode){this.setHeightDockMode(this.get_height());
}if(e){this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}this._manageVisibilityFirefox(true);
return true;
},_updateWindowSize:function(e,f){var g=this._tableElement;
var c=e?e:g.style.height;
if(true==f){c=g.offsetHeight+"px";
}if(parseInt(c)==0){return;
}var d=$telerik.getBorderBox(this.get_popupElement()).vertical;
c=parseInt(c)>d?(parseInt(c)-d)+"px":c;
g.style.height=c;
this._fixIeHeight(g,c);
g.parentNode.style.height=c;
},get_behaviors:function(){return this._behaviors;
},set_behaviors:function(f){if(this._behaviors!=f){this._behaviors=f;
}if(null==this._titlebarElement){return;
}this._enableMoveResize(false);
this._enableMoveResize(true);
if(this._buttonsArray&&this._buttonsArray.length>0){var l=this._buttonsArray.length;
for(var e=0;
e<l;
e++){var d=this._buttonsArray[e];
$clearHandlers(d);
}this._buttonsArray=[];
var c=this._getTitleCommandButtonsHolder();
c.innerHTML="";
}if(a.WindowBehaviors.None==this._behaviors){return;
}else{var o=a.WindowBehaviors;
var p=[[this.isBehaviorEnabled(o.Pin),"rwPinButton",this._getLocalizationString("PinOn"),this.togglePin],[this.isBehaviorEnabled(o.Reload),"rwReloadButton",this._getLocalizationString("Reload"),this.reload],[this.isBehaviorEnabled(o.Minimize),"rwMinimizeButton",this._getLocalizationString("Minimize"),this.minimize],[this.isBehaviorEnabled(o.Maximize),"rwMaximizeButton",this._getLocalizationString("Maximize"),this.maximize],[this.isBehaviorEnabled(o.Close),"rwCloseButton",this._getLocalizationString("Close"),this.close]];
for(var g=0;
g<p.length;
g++){var m=p[g];
if(!m[0]){continue;
}var h=document.createElement("li");
var k=document.createElement("a");
k.href="javascript:void(0);";
k.className=m[1];
k.setAttribute("title",m[2]);
if(this.get_enableAriaSupport()){h.setAttribute("role","presentation");
k.setAttribute("role","button");
}var n=document.createElement("span");
n.innerHTML=m[2];
k.appendChild(n);
$addHandlers(k,{click:m[3],dblclick:this._cancelEvent,mousedown:this._cancelEvent},this);
$addHandler(k,"click",this._cancelEvent);
h.appendChild(k);
this._buttonsElement.appendChild(h);
this._buttonsArray[this._buttonsArray.length]=k;
this._updateTitleWidth();
this._defaultMinWidth=null;
}}},get_modal:function(){return this._modal;
},set_modal:function(c){if(this._modal!=c){this._modal=c;
}this._makeModal(this._modal);
if(this.isVisible()){this._afterShow();
}},get_visibleTitlebar:function(){return this._visibleTitlebar;
},set_visibleTitlebar:function(d){if(this._visibleTitlebar!=d){this._visibleTitlebar=d;
}var c=this.get_popupElement();
if(c){d?Sys.UI.DomElement.removeCssClass(c,"rwNoTitleBar"):Sys.UI.DomElement.addCssClass(c,"rwNoTitleBar");
}if(this._titlebarElement){this._titlebarElement.style.display=d?"":"none";
if(this.get_enableAriaSupport()){this._titlebarElement.setAttribute("aria-hidden",!d);
}}},get_visibleStatusbar:function(){return this._visibleStatusbar;
},set_visibleStatusbar:function(c){if(this._visibleStatusbar!=c){this._visibleStatusbar=c;
}if(this._statusCell){this._statusCell.parentNode.style.display=c?"":"none";
if(this.get_enableAriaSupport()){this._statusCell.parentNode.setAttribute("aria-hidden",!c);
}}},get_overlay:function(){return this._overlay;
},set_overlay:function(c){this._overlay=c;
if(this._popupBehavior){this._popupBehavior.set_overlay(this._overlay);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_opacity:function(){return this._opacity;
},set_opacity:function(c){if(this.get_opacity()!=c){this._opacity=c>100?100:c;
this._opacity=c<0?0:c;
if(this.isCreated()){this._updateOpacity();
}}},get_iconUrl:function(){return this._iconUrl;
},set_iconUrl:function(c){this._iconUrl=c;
if(this._titleIconElement){if(this.get_iconUrl()==""){this._titleIconElement.className="rwIcon";
}else{this._titleIconElement.style.background="transparent url('"+c+"') no-repeat scroll 0px 0px";
}}},get_keepInScreenBounds:function(){return this._keepInScreenBounds;
},set_keepInScreenBounds:function(c){this._keepInScreenBounds=c;
if(this._popupBehavior){this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_popupElement:function(){return this._popupElement;
},set_status:function(d){var c=this._getStatusMessageElement();
if(c){window.setTimeout(function(){c.value=d;
},0);
}},get_status:function(){var c=this._getStatusMessageElement();
if(c){return c.value;
}},raise_command:function(c){this.raiseEvent("command",c);
},add_resize:function(c){this.get_events().addHandler("resizeEnd",c);
},remove_resize:function(c){this.get_events().removeHandler("resizeEnd",c);
},saveClientState:function(){var c=["position"];
var e={};
for(var d=0;
d<c.length;
d++){e[c[d]]=this["get_"+c[d]]();
}return Sys.Serialization.JavaScriptSerializer.serialize(e);
},_applyAriaForLayoutTables:function(){var k=this._tableElement;
if(k){k.setAttribute("role","presentation");
}var f=k.getElementsByTagName("tr");
for(var d=0;
d<f.length;
d++){var c=f[d];
c.setAttribute("role","presentation");
var l=c.getElementsByTagName("td");
for(var e=0;
e<l.length;
e++){l[e].setAttribute("role","presentation");
}}var h=this._titlebarElement;
if(h){h.setAttribute("role","presentation");
}var g=this._statusCell;
if(g){var m=g.getElementsByTagName("table")[0];
if(m){m.setAttribute("role","presentation");
}}},_applyAriaSupport:function(){this._applyAriaForLayoutTables();
var c=this.get_popupElement();
c.setAttribute("aria-hidden","true");
c.setAttribute("aria-labelledby",this._getTitleElement().id);
if(this._isPredefined){c.setAttribute("role","alertdialog");
c.setAttribute("aria-describedby",this.get_id()+"_content");
}else{c.setAttribute("role","dialog");
}}};
b.registerControlProperties(a.RadWindow,{minimizeZoneID:null,restrictionZoneID:"",minimizeIconUrl:null,clientCallBackFunction:null,navigateUrl:null,localization:null,shortcuts:null,initialBehaviors:a.WindowBehaviors.None,destroyOnClose:false,reloadOnShow:false,showContentDuringLoad:true,visibleOnPageLoad:false,showOnTopWhenMaximized:true,animation:a.WindowAnimation.None,animationDuration:500,autoSize:false,autoSizeBehaviors:a.WindowAutoSizeBehaviors.Default,windowManager:null,cssClass:"",name:null,skin:"Deafult",formID:null,enableShadow:false,enableAriaSupport:false,maxWidth:null,maxHeight:null});
b.registerControlEvents(a.RadWindow,["command","dragStart","dragEnd","activate","beforeShow","show","pageLoad","close","beforeClose","resizeStart","resizeEnd","autoSizeEnd"]);
a.RadWindow.registerClass("Telerik.Web.UI.RadWindow",a.RadWebControl);
a.RadWindowUtils._zIndex=3000;
a.RadWindowUtils.get_newZindex=function(c){c=parseInt(c);
if(null==c||isNaN(c)){c=0;
}if(a.RadWindowUtils._zIndex<c){a.RadWindowUtils._zIndex=c;
}a.RadWindowUtils._zIndex++;
return a.RadWindowUtils._zIndex;
};
a.RadWindowUtils._pinnedList={};
a.RadWindowUtils.setPinned=function(e,c){if(e){var j=c._getViewportBounds();
var i=c._getCurrentBounds();
c.LeftOffset=i.x-j.scrollLeft;
c.TopOffset=i.y-j.scrollTop;
var h=window.setInterval(function(){a.RadWindowUtils._updatePinnedElementPosition(c);
},100);
a.RadWindowUtils._pinnedList[h]=c;
}else{var g=null;
var d=a.RadWindowUtils._pinnedList;
for(var f in d){if(d[f]==c){g=f;
break;
}}if(null!=g){window.clearInterval(g);
a.RadWindowUtils._pinnedList[g]=null;
}c.TopOffset=null;
c.LeftOffset=null;
}};
a.RadWindowUtils._updatePinnedElementPosition=function(f){if(f.isMaximized()||!f.isVisible()){return;
}var g=f._getViewportBounds();
var d=f._getCurrentBounds();
var e=(f.LeftOffset!=null)?f.LeftOffset+g.scrollLeft:d.x;
var c=(f.TopOffset!=null)?f.TopOffset+g.scrollTop:d.y;
if(d.x!=e||d.y!=c){f.moveTo(e,c);
}};
})();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.WindowShortCutManager=function(a){this._shortcuts=[];
this.addShortCuts(a);
};
Telerik.Web.UI.WindowShortCutManager.prototype={addShortCuts:function(a){if(typeof(a)=="string"){a=Sys.Serialization.JavaScriptSerializer.deserialize(a);
}for(var b=0;
b<a.length;
b++){this.addShortCut(a[b][0],a[b][1]);
}},addShortCut:function(b,c){var a=new Telerik.Web.UI.WindowShortCut(b,c);
a.HashValue=this._getShortCutHashValue(a);
this._shortcuts[a.HashValue]=a;
},removeShortCut:function(b){var a=this.findShortCutByName(b);
if(a){this._shortcuts[a.HashValue]=null;
}},setShortCut:function(b,a){this.removeShortCut(b);
this.addShortCut(b,a);
},isShortCutHit:function(a){return this._hitTest(a.keyCode,a.ctrlKey,(null!=a.ctrlLeft?a.ctrlLeft:a.ctrlKey),a.shiftKey,(null!=a.shiftLeft?a.shiftLeft:a.shiftKey),a.altKey,(null!=a.altLeft?a.altLeft:a.altKey));
},_hitTest:function(e,h,g,b,a,f,c){var d=this._getHashValue(e,h,g,b,a,f,c);
return this._shortcuts[d];
},_getHashValue:function(f,i,h,c,b,g,e){var a=f&65535;
var d=0;
d|=(i?(1<<0):0);
d|=(c?(1<<2):0);
d|=(g?(1<<4):0);
a|=(d<<16);
return a;
},_getShortCutHashValue:function(a){return this._getHashValue(a.KeyCode,a.CtrlKey,a.LeftCtrlKey,a.ShiftKey,a.LeftShiftKey,a.AltKey,a.LeftAltKey);
},findShortCutByName:function(c){var b;
for(var a in this._shortcuts){b=this._shortcuts[a];
if(null!=b&&b._name==c){return b;
}}return null;
}};
Telerik.Web.UI.WindowShortCut=function(b,a){this._name=b;
this._shortcutString="";
this.setShortCut(a);
};
Telerik.Web.UI.WindowShortCut.prototype={CtrlKey:false,LeftCtrlKey:false,ShiftKey:false,LeftShiftKey:false,AltKey:false,LeftAltKey:false,KeyCode:0,get_name:function(){return this._name;
},set_name:function(a){this._name=a;
},get_shortCutString:function(){return this._shortcutString;
},setShortCut:function(a){this._parseShortcutString(a);
this._shortcutString=a;
},_parseShortcutString:function(c){if("string"==typeof(c)){this.CtrlKey=false;
this.LeftCtrlKey=false;
this.ShiftKey=false;
this.LeftShiftKey=false;
this.AltKey=false;
this.LeftAltKey=false;
this.KeyCode=0;
c=c.replace(/\s*/gi,"");
c=c.replace(/\+\+/gi,"+PLUS");
var d=c.split("+");
var b="";
for(var a=0;
a<d.length;
a++){b=d[a].toUpperCase();
switch(b){case"LCTRL":this.LeftCtrlKey=true;
case"CTRL":this.CtrlKey=true;
break;
case"LSHIFT":this.LeftShiftKey=true;
case"SHIFT":this.ShiftKey=true;
break;
case"LALT":this.LeftAltKey=true;
case"ALT":this.AltKey=true;
break;
case"F1":this.KeyCode=112;
break;
case"F2":this.KeyCode=113;
break;
case"F3":this.KeyCode=114;
break;
case"F4":this.KeyCode=115;
break;
case"F5":this.KeyCode=116;
break;
case"F6":this.KeyCode=117;
break;
case"F7":this.KeyCode=118;
break;
case"F8":this.KeyCode=119;
break;
case"F9":this.KeyCode=120;
break;
case"F10":this.KeyCode=121;
break;
case"F11":this.KeyCode=122;
break;
case"F12":this.KeyCode=123;
break;
case"ENTER":this.KeyCode=13;
break;
case"HOME":this.KeyCode=36;
break;
case"END":this.KeyCode=35;
break;
case"LEFT":this.KeyCode=37;
break;
case"RIGHT":this.KeyCode=39;
break;
case"UP":this.KeyCode=38;
break;
case"DOWN":this.KeyCode=40;
break;
case"PAGEUP":this.KeyCode=33;
break;
case"PAGEDOWN":this.KeyCode=34;
break;
case"SPACE":this.KeyCode=32;
break;
case"TAB":this.KeyCode=9;
break;
case"BACK":this.KeyCode=8;
break;
case"CONTEXT":this.KeyCode=93;
break;
case"ESCAPE":case"ESC":this.KeyCode=27;
break;
case"DELETE":case"DEL":this.KeyCode=46;
break;
case"INSERT":case"INS":this.KeyCode=45;
break;
case"PLUS":this.KeyCode="+".charCodeAt(0);
break;
default:this.KeyCode=b.charCodeAt(0);
break;
}}}else{throw {description:"Invalid shortcut string"};
}}};
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
