Type.registerNamespace("Telerik.Web.UI");
(function(){$telerik.toWindow=function(c){return c;
};
$telerik.findWindow=$find;
var a=$telerik.$;
var b=Telerik.Web.UI;
b.RadWindowControllerClass=function(){this._activeWindow=null;
this._historyStack=[];
};
b.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;
}};
b.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null);
if(!b.RadWindowController){b.RadWindowController=new b.RadWindowControllerClass();
}Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.RadWindowUtils");
b.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"};
a.registerEnum(b,"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)});
a.registerEnum(b,"WindowAutoSizeBehaviors",{Width:1,WidthProportional:2,Height:4,HeightProportional:8,Default:(2+8)});
a.registerEnum(b,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8});
a.registerEnum(b,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1});
b.RadWindow=function(c){b.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._shortCutManager=null;
this.isIE=($telerik.isIE);
this._openerElementID=null;
this._offsetElementID=null;
this._behaviors=b.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;
};
b.RadWindow.prototype={_getLocalization:function(){return b.RadWindowUtils.Localization;
},_getLocalizationString:function(d){var e=this.get_localization();
if(typeof(e)=="string"){e=Sys.Serialization.JavaScriptSerializer.deserialize(e);
this.set_localization(e);
}var c=this._getLocalization();
if(!e){return c[d];
}return e[d];
},_registerGlobalBodyEventHandlers:function(c){var d=this.get_shortcuts();
if(!d){return;
}if(!this._shortCutManager){this._shortCutManager=new b.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,e){if(!d){return;
}if(Sys.UI.DomElement.containsCssClass(d,"RadButton")){d.setAttribute("rwOpener",true);
}else{d.removeAttribute("rwOpener");
}if(true==e){this._onClickDelegate=Function.createDelegate(this,this._onClick);
$addHandler(d,"click",this._onClickDelegate);
}else{var c=$removeHandler(d,"click",this._onClickDelegate);
this._onClickDelegate=null;
}},_registerTitlebarHandlers:function(c){var d=this._titleCell;
if(c){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore();
}else{if(this.isBehaviorEnabled(b.WindowBehaviors.Maximize)){if(this.isMaximized()){this.restore();
}else{this.maximize();
}}}});
this._onTitlebarClickDelegate=Function.createDelegate(this,function(){this.setActive(true);
});
$addHandler(d,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(d,"click",this._onTitlebarClickDelegate);
}else{if(d){if(this._onTitlebarDblclickDelegate){$removeHandler(d,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}if(this._onTitlebarClickDelegate){$removeHandler(d,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}$clearHandlers(d);
}}},_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(b.RadWindowManager)!="undefined"&&b.RadWindowManager.isInstanceOfType(this)){return;
}this._onModalShowHandler=function(d){if(!d._modalExtender){d._modalExtender=new b.ModalExtender(d._popupElement);
}d._modalExtender.show();
var f=document.activeElement;
if(f&&f.tagName.toLowerCase()!="body"){var e=(!$telerik.isDescendant(this._contentElement,f)&&this._dockMode);
if(!(d._isPredefined)||e){d._focusedPageElement=f;
f.blur();
}}d.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(d){window.setTimeout(function(){if(d._modalExtender){d._modalExtender.hide();
}var f=d._focusedPageElement;
if(f){try{f.focus();
}catch(e){}d._focusedPageElement=null;
}},10);
};
this.add_close(this._onModalCloseHandler);
},_enableMoveResize:function(e){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!e){return;
}if(!this._popupElement){return;
}var f=this._tableElement.rows;
var c={};
var g=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(b.WindowBehaviors.Resize)){if(g){c={nw:f[0].cells[2],n:this._topResizer,ne:f[0].cells[0],w:[f[1].cells[2],f[2].cells[2]],e:[f[1].cells[0],f[2].cells[0]],sw:f[3].cells[2],s:f[3].cells[1],se:[f[3].cells[0],this._bottomResizer]};
}else{c={nw:f[0].cells[0],n:this._topResizer,ne:f[0].cells[2],w:[f[1].cells[0],f[2].cells[0]],e:[f[1].cells[2],f[2].cells[2]],sw:f[3].cells[0],s:f[3].cells[1],se:[f[3].cells[2],this._bottomResizer]};
}}if(this.isBehaviorEnabled(b.WindowBehaviors.Move)){c.move=this._titleCell;
}this._resizeExtender=new b.ResizeExtender(this,this._popupElement,c,this._tableElement);
var d=this._dockMode?null:this._iframe;
this._resizeExtender.set_iframeToSkip(d);
},_setResizeOverlayVisible:function(f){if(this._dockMode){return;
}var c=this._resizeOverlayElement;
if(!c){var e=this._getHandlesWidth();
var d=this._visibleTitlebar?this._tableElement.rows[0].offsetHeight:e;
c=document.createElement("div");
c.style.position="absolute";
c.style.zIndex="1";
c.style.top=d+"px";
c.style.left=Math.round(e/2)+"px";
c.style.backgroundColor="White";
c.style.filter="alpha(opacity=0)";
c.style.opacity=0;
this._contentCell.appendChild(c);
this._resizeOverlayElement=c;
}this._setResizeOverlaySize();
c.style.display=f?"":"none";
},_setResizeOverlaySize:function(){var d=this._resizeOverlayElement;
if(d){var c=this._contentCell;
d.style.width=c.offsetWidth+"px";
d.style.height=c.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 i=this._getCurrentBounds();
var f=this.get_minWidth();
var h=parseInt(this.get_maxWidth());
var j=this.get_minHeight();
var g=parseInt(this.get_maxHeight());
var c=false;
if(e.width<f||h&&e.width>h){var d=f;
if(e.width<f){e.width=f;
}else{e.width=h;
d=h;
}var k=this._resizeExtender._originalBounds;
if(this._resizeExtender._resizeDir.west){e.x=k.x+(k.width-d);
if(this._cachedDragZoneBounds){e.x-=this._cachedDragZoneBounds.x;
}}else{e.x=i.x;
}e.y=i.y;
e.height=i.height;
c=true;
}if(e.height<j||g&&e.height>g){e.height=(e.height<j)?j:g;
e.x=i.x;
e.y=i.y;
e.width=i.width;
c=true;
}if(c){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 d=$telerik.getSize(e);
var c=$telerik.getBorderBox(e);
d.width-=c.horizontal;
d.height-=c.vertical;
this._cachedDragWindowBounds=d;
this._setResizeOverlayVisible(true);
this.raiseEvent("dragStart",new Sys.EventArgs());
return true;
},onDragEnd:function(c){this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this._setResizeOverlayVisible(false);
this.raiseEvent("dragEnd",new Sys.EventArgs());
this._manageVisibilityFirefox(false);
var d=this._getCurrentBounds();
this._manageVisibilityFirefox(false);
this.moveTo(d.x,d.y);
this.setActive(true);
if(this.isMinimized()){this._getTitleElement().style.width="";
}this._manageVisibilityFirefox(true);
},onDrag:function(d){if(!this._cachedDragZoneBounds){return true;
}var c=this._cachedDragWindowBounds;
var f=this._cachedDragZoneBounds;
d.width=c.width;
d.height=c.height;
var e=this._checkRestrictionZoneBounds(f,d);
if(!e){if(d.x<=f.x){d.x=f.x;
}else{if(f.x+f.width<=d.x+c.width){d.x=f.x+f.width-c.width;
}}if(d.y<=f.y){d.y=f.y;
}else{if(f.y+f.height<=d.y+c.height){d.y=f.y+f.height-c.height;
}}e=true;
}return e;
},initialize:function(){b.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 i=this.get_windowManager();
if(i){if(i.get_preserveClientState()){i.saveWindowState(this);
}if(this.get_destroyOnClose()){i.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(b.WindowBehaviors.None);
var c=this._iframe;
if(c){c.radWindow=null;
var e="sandbox" in document.createElement("iframe");
c.src=e?"about:blank":"javascript:'<html></html>';";
c.name="";
c.removeAttribute("name");
c.removeAttribute("NAME");
}this._createTouchScrollExtender(false);
if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML="";
}var f=this.get_contentElement();
if(this._dockMode&&f){if(Sys&&Sys.WebForms){var d=Sys.WebForms.PageRequestManager.getInstance();
if(d&&d.get_isInAsyncPostBack()){$telerik.disposeElement(f);
}}}if($telerik.isChrome||$telerik.isSafari||!this.get_destroyOnClose()){var h=this._popupElement;
if(h&&h.parentNode){h.parentNode.removeChild(h);
}}var g=this._popupBehavior;
if(this.get_destroyOnClose()&&g){g.dispose();
this._popupBehavior=null;
}b.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){this._hide();
this._registerGlobalBodyEventHandlers(false);
return true;
},clone:function(d){var c=document.createElement("span");
if(d){c.setAttribute("id",d);
}return $telerik.cloneControl(this,b.RadWindow,c);
},_createTouchScrollExtender:function(e){var c=$get(this.get_id()+"_C");
if(c){var d=this._dropDownTouchScroll;
if(d){if(!e){d.dispose();
this._dropDownTouchScroll=null;
}}else{if(e){this._dropDownTouchScroll=new b.TouchScrollExtender(c);
this._dropDownTouchScroll.initialize();
}}}},set_contentElement:function(d){if(!this._isPredefined){this._dockMode=true;
}var c=$get(this.get_id()+"_C");
if(c&&d!=c){$telerik.disposeElement(c);
c.innerHTML="";
c.appendChild(d);
d=c;
}this._createUI();
if(this._iframe){this._iframe.style.display="none";
}else{if(!this._dropDownTouchScroll&&b.TouchScrollExtender._getNeedsScrollExtender()){this._createTouchScrollExtender(true);
}}if(d.parentNode&&d.parentNode.removeChild){d.parentNode.removeChild(d);
}this._contentCell.appendChild(d);
d.style.display="";
this._contentElement=d;
},_setShadowCSSClass:function(c){var d=this._tableElement;
var e=this.get_popupElement();
if(!d||!e){return;
}if(c){Sys.UI.DomElement.addCssClass(d,"rwShadow");
Sys.UI.DomElement.addCssClass(e,"rwShadow");
}else{Sys.UI.DomElement.removeCssClass(d,"rwShadow");
Sys.UI.DomElement.removeCssClass(e,"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()!=b.WindowBehaviors.None)){this._show();
this._afterShow();
if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Minimize)){this.minimize();
}if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Maximize)){this.maximize();
}if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Pin)){this.togglePin();
}return;
}if(this.isModal()){this.center();
}if(this.get_animation()==b.WindowAnimation.None){this._show();
this._afterShow();
}else{this._playAnimation();
}},_show:function(){if(this.get_offsetElementID()&&!this._offsetElement){var e=$get(this.get_offsetElementID());
if(e){this._offsetElement=e;
}}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();
if(this._firstShow){this.set_width(this.get_width());
this.set_height(this.get_height());
}if(c!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(c);
}this._popupVisible=true;
var d=this.get_contentElement();
if(!this._isPredefned&&d){$telerik.repaintChildren(d);
}},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide();
}else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var d=Function.createDelegate(this,this._afterHide);
var c=this.isMaximized();
$telerik.$(this._popupElement).stop().fadeOut(this.get_animationDuration(),function(){d(c);
});
}},_afterHide:function(c){if(!this._popupBehavior){return;
}this._manageVisibilityFirefox(true);
if(c==null){c=this.isMaximized();
}var d=this.isMinimized();
if(c||d){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()==b.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 f=Function.createDelegate(this,function(){var p=this._getCalculatedPopupBounds();
this._setPopupVisible(p.x,p.y);
var l=$telerik.getBounds(this._popupElement);
var o=this.get_offsetElementID();
if(o){var n=$get(o);
if(n){var m=$telerik.getBounds(n);
l.x=m.x;
l.y=m.y;
}}$telerik.$(this._popupElement).hide();
return l;
});
var g=this._popupElement;
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var d=this.get_animation();
var k=this._openerElement?$telerik.getBounds(this._openerElement):null;
var c=f();
var i=this.get_animationDuration();
var h=""+this._position;
var e=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();
});
b.Animations.playJQueryAnimation(g,d,k,c,h,e,j,i);
},_onClick:function(c){this.show();
return this._cancelEvent(c);
},_onKeyDown:function(c){var d=this._shortCutManager.isShortCutHit(c);
if(!d){return;
}if(this.isActive()){this.fire(d.get_name());
}},_cancelEvent:function(c){if(c){c.returnValue=false;
c.cancelBubble=true;
c.preventDefault();
c.stopPropagation();
}return false;
},_getWindowController:function(){return b.RadWindowController.getInstance();
},_getReloadOnShowUrl:function(d){var c="rwndrnd="+Math.random();
if(d.indexOf("?")>-1){c="&"+c;
}else{c="?"+c;
}var e=d.indexOf("#");
d=(e>-1)?d.substr(0,e)+c+d.substr(e):d+c;
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(h,f){var e=this._popupElement;
if(this.isVisible()){this._manageVisibilityFirefox(false);
}if(e){var c=$telerik.getBounds(e);
var g=this._getRestrictionZoneBounds();
if(g){var d=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(h+g.x,f+g.y,c.width,c.height));
if(!d){return false;
}}}h=parseInt(h);
f=parseInt(f);
this._createUI();
this._setPopupVisible(h,f);
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(n,q){var e=this.get_minWidth();
var j=this._getTitleElement();
if(j){j.style.width="1px";
}var f;
var l;
n.style.height="1px";
n.style.width="1px";
if(this._dockMode){var r=n.scrollWidth;
l=r>e?r:e;
f=n.scrollHeight;
Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading");
}else{l=q.scrollWidth;
if(l<e){n.style.width=e+"px";
l=q.scrollWidth;
}f=q.scrollHeight;
}var i=this._getRestrictionZoneBounds();
var t=i?i:this._getViewportBounds();
var m=this._getHandlesWidth()+l;
var c=this.get_defaultMinHeight()+f;
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){var o=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
if(o>0){c-=o;
}}var d=Math.min(m,t.width);
var k=Math.min(c,t.height);
var s=this.get_minWidth();
var p=this.get_minHeight();
var g=parseInt(this.get_maxHeight());
var h=parseInt(this.get_maxWidth());
if(s>d){d=s;
}if(p>k){k=p;
}if(g&&g<k){k=g;
}if(h&&h<d){d=h;
}return{width:d,height:k,contentPageWidth:l,contentPageHeight:f};
},_autoSizeBehaviorBounds:function(d,c){var h=this._getRestrictionZoneBounds();
var e=h?h:this._getViewportBounds();
var f=d;
if(h){f.y-=h.y;
f.x-=h.x;
}if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.WidthProportional)){f.x=this.calcPosition(d.x,d.width,c.width,e.width,false);
f.width=c.width;
}else{if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.Width)){f.width=c.width;
}}if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.HeightProportional)){f.y=this.calcPosition(d.y,d.height,c.height,e.height,true);
f.height=c.height;
}else{if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.Height)){f.height=c.height;
}}var i=17;
if(f.height<c.contentPageHeight){f.width=Math.min(f.width+i,e.width);
}if(f.width<c.contentPageWidth){f.height=Math.min(f.height+i,e.height);
}if(!h){this.set_keepInScreenBounds(true);
}else{if(f.width==h.width){f.x=0;
}if(f.height==h.height){f.y=0;
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){var g=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
f.height-=g;
}}}return f;
},autoSize:function(e){if(this.isClosed()){return;
}this.setOverflowVisible(true);
var n=this.get_contentFrame();
var j=this.get_popupElement();
var g=$telerik.getBounds(j);
var h=$telerik.getBorderBox(j);
g.width-=h.horizontal;
g.height-=h.vertical;
var l=null;
var k=null;
var m=this.get_keepInScreenBounds();
var c=this.get_contentElement();
if(!this._dockMode){try{l=n.contentWindow.document.documentElement;
if(!l){return;
}}catch(f){return false;
}k=n.contentWindow.document.body;
var c=l;
if($telerik.isIE||$telerik.isFirefox){c=n;
}}var i=this._calculateBoundsToFit(c,l);
var d=this._autoSizeBehaviorBounds(g,i);
this.setOverflowVisible(false);
if(e){this._autoSizeWithAnimation(d);
}else{this._restoreRect=null;
this.setBounds(d);
this.setOverflowVisible(true);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
this.raiseEvent("autoSizeEnd",new Sys.EventArgs());
}if($telerik.isIE&&n){n.style.overflow="hidden";
setTimeout(function(){n.style.overflow="";
},0);
}this.set_keepInScreenBounds(m);
if(n){c.style.width="100%";
c.style.height="100%";
}return true;
},_autoSizeWithAnimation:function(c){var f=this.get_popupElement();
if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false);
}var d=Function.createDelegate(this,function(){var h=this.get_popupElement();
h.style.filter="";
if($telerik.isIE7){h.style.removeAttribute("filter");
}h.style.opacity="";
this._restoreRect=null;
this.setBounds(c);
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 e={width:c.width,height:c.height,x:c.x,y:c.y};
var g=this._getRestrictionZoneBounds();
if(g){e.x+=g.x;
e.y+=g.y;
}$telerik.$(f).animate({width:e.width,height:e.height,left:e.x,top:e.y,opacity:1},300,null,d);
},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=b.RadWindow.prototype._checkRestrictionZoneBounds;
},_substractWrappersBorder:function(f,e){var h=this.get_popupElement();
var c=this._contentCell;
if(!h||!c){return f;
}var g=$telerik.getBorderBox(h);
var d=$telerik.getBorderBox(c);
f-=e?(g.horizontal+d.hrizontal):(g.vertical+d.vertical);
return f;
},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(c){if(!this._dockMode||!this.get_contentElement()){return;
}var g=this._substractWrappersBorder(c);
var f=this.isVisible();
var d=this._tableElement.rows[3].cells[1];
var e=this._tableElement.rows[0].cells[1];
var h=this._tableElement.rows[2].cells[1];
g-=f?parseInt($telerik.getBounds(d).height):parseInt($telerik.getCurrentStyle(d,"height"));
if(this._visibleTitlebar){g-=f?parseInt($telerik.getBounds(this._titlebarElement).height):parseInt($telerik.getCurrentStyle(this._titlebarElement,"height"));
g-=f?parseInt($telerik.getBounds(this._topResizer).height):parseInt($telerik.getCurrentStyle(this._topResizer,"height"));
}else{g-=f?parseInt($telerik.getBounds(e).height):parseInt($telerik.getCurrentStyle(e,"height"));
}if(this._visibleStatusbar){g-=f?parseInt($telerik.getBounds(h).height):parseInt($telerik.getCurrentStyle(h,"height"));
}if(g>0){this._contentElement.style.height=g+"px";
}},calcPosition:function(d,c,g,h,e){var i=d+Math.round((c-g)/2);
if(i<0||i+c>h){i=Math.round(Math.abs((h-g)/2));
if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.Default)){var f=this._dockMode?window:this.BrowserWindow;
i+=e?Math.max(f.document.documentElement.scrollTop,f.document.body.scrollTop):Math.max(f.document.documentElement.scrollLeft,f.document.body.scrollLeft);
}}return i;
},_maintainMaximizedSize:function(){if(!this.isMaximized()){return;
}var j=this._popupElement;
if(!j){return;
}var d=this._getViewportBounds();
j.style.top=(d.scrollTop+d.y)+"px";
j.style.left=(d.scrollLeft+d.x)+"px";
var i=parseInt(this.get_maxWidth());
var g=parseInt(this.get_maxHeight());
if(i){d.width=i;
}if(g){d.height=g;
}$telerik.setSize(j,{width:d.width,height:d.height});
var k=this._getRestrictionZoneBounds();
if(!k){this._enablePageScrolling(false);
}var h=this._tableElement;
d=$telerik.getContentSize(j);
var c=$telerik.getBorderBox(h);
var f=$telerik.getPaddingBox(h);
var e=d.height-c.vertical-f.vertical;
h.style.height=e+"px";
this._fixIeHeight(h,e);
if(this._dockMode){this.setWidthDockMode(d.width);
this.setHeightDockMode(d.height);
}this._updateTitleWidth();
},_enablePageScrolling:function(e){var d=document.body;
var c=document.documentElement;
if(e){if(null!=this._documentOverflow){c.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=c.style.overflow;
}if(null==this._bodyOverflow){this._bodyOverflow=d.style.overflow;
}d.style.overflow="hidden";
c.style.overflow="hidden";
}},_getRestrictionZoneBounds:function(){var c=null;
if(this.get_restrictionZoneID()){var d=$get(this.get_restrictionZoneID());
if(d){c=$telerik.getBounds(d);
c.scrollLeft=0;
c.scrollTop=0;
}}return c;
},_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 e=this._getCurrentBounds();
var f=this._getViewportBounds();
var c=parseInt((f.width-e.width)/2);
var d=parseInt((f.height-e.height)/2);
e.x=c+f.scrollLeft;
e.y=d+f.scrollTop;
return e;
},_getViewportBounds:function(){var c=this._getRestrictionZoneBounds();
if(c){return c;
}var e=$telerik.getClientBounds();
var d=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body);
var f=document.documentElement.scrollTop||document.body.scrollTop;
e.scrollLeft=d;
e.scrollTop=f;
if(this.isIE){if(e.width==0){e.width=document.body.clientWidth;
}if(e.height==0){e.height=document.body.clientHeight;
}}return e;
},_getCalculatedPopupBounds:function(){var f=this._getStoredBounds();
if(f){return f;
}var d=this._getCurrentBounds();
var e=this._offsetElement;
if(this._top==null&&this._left==null&&!e){d=this._getCentralBounds();
}else{if(e){d.y=0;
d.x=0;
}else{var h=this._getViewportBounds();
d.x=h.scrollLeft;
d.y=h.scrollTop;
}var c=this._left?this._left:0;
d.x+=c;
var g=this._top?this._top:0;
d.y+=g;
}return d;
},_checkRestrictionZoneBounds:function(c,d){var e=c;
if(!e){e=this._getRestrictionZoneBounds();
if(!e){return true;
}}return b.ResizeExtender.containsBounds(e,d);
},_reSetWindowPosition:function(){var c=this._getCalculatedPopupBounds();
this._setPopupVisible(c.x,c.y);
},_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";
}}}},_setPopupVisible:function(c,d){var e=this._getRestrictionZoneBounds();
if(e){c+=e.x;
d+=e.y;
}this._popupBehavior._setCoordinates(c,d);
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 e=this._isRightToLeft;
if(e==null){var c=this.get_element();
var d=c.parentNode?c:this._getDefaultParent();
e=this._isRightToLeft=$telerik.isRightToLeft(d);
}return e;
},_createStatusbarResizer:function(c){var d=c.rows[0].insertCell(-1);
d.style.width="15px";
var e=document.createElement("div");
d.appendChild(e);
this._bottomResizer=e;
},_createStatusbarMessageCell:function(c){var f=c.rows[0].insertCell(-1);
f.style.width="100%";
var d=this._getStatusMessageElement();
f.appendChild(d);
var e=document.createElement("label");
e.setAttribute("for",d.id);
e.innerHTML="status label";
e.style.display="none";
f.appendChild(e);
},_createUI:function(){if(!this._popupElement){var z=this.get_id();
var l="RadWindowWrapper_"+z;
var A=this._isWindowRightToLeft();
var t=document.createElement("div");
t.id=l;
t.className=this._getFullSkinName();
var v=this.get_cssClass();
if(v){Sys.UI.DomElement.addCssClass(t,v);
}if(A){Sys.UI.DomElement.addCssClass(t,"RadWindow_rtl");
}if(!this._visibleTitlebar){Sys.UI.DomElement.addCssClass(t,"rwNoTitleBar");
}t.style.width=this._width;
t.style.height=this._height;
t.setAttribute("unselectable","on");
this._popupElement=t;
var e=document.createElement("table");
e.cellSpacing=0;
e.cellPadding=0;
Sys.UI.DomElement.addCssClass(e,"rwTable");
this._tableElement=e;
var q=[];
if(A){q=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"];
}else{q=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"];
}var d=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var u=0;
for(var B=0;
B<4;
B++){var s=e.insertRow(-1);
s.className=d[B];
for(var y=1;
y<=3;
y++){var m=s.insertCell(-1);
m.innerHTML="&nbsp;";
m.className=q[u];
u++;
}}var k=e.rows[0].cells[1];
k.innerHTML="";
this._titleCell=k;
var o=document.createElement("div");
o.className="rwTopResize";
o.innerHTML="<!-- / -->";
this._topResizer=o;
this._titleCell.appendChild(this._topResizer);
var g=this._createDefaultTable();
g.className="rwTitlebarControls";
this._titlebarElement=g;
this._titleCell.appendChild(this._titlebarElement);
var f=this._getTitleIcon();
var p=this._titlebarElement.rows[0].insertCell(-1);
p.appendChild(f);
var h=this._getTitleElement();
var k=this._titlebarElement.rows[0].insertCell(-1);
k.appendChild(h);
k.id=this.get_id()+"_title";
this.set_title(this._title);
var x=this._titlebarElement.rows[0].insertCell(-1);
x.noWrap=true;
x.style.whiteSpace="nowrap";
x.appendChild(this._getTitleCommandButtonsHolder());
var C=e.rows[1].cells[1];
C.vAlign="top";
C.innerHTML="";
this._contentCell=C;
if(!(this._dockMode||this._isPredefined)){Sys.UI.DomElement.addCssClass(this._contentCell,"rwExternalContent");
}if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}var w=this.get_name();
var c=this._createDefaultTable();
c.style.width="100%";
this._statusCell=e.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._dockMode){var n=$get(this.get_id()+"_C");
if(n&&n.innerHTML){n.style.overflow="auto";
n.style.border="0px";
this.set_contentElement(n);
this.setWidthDockMode(this.get_width());
this.setHeightDockMode(this.get_height());
}}else{var r=($telerik.isIE&&!$telerik.isIE9)?document.createElement("<iframe name='"+w+"'>"):document.createElement("iframe");
r.name=w;
r.src="javascript:'<html></html>';";
r.style.width="100%";
r.style.height="100%";
r.style.border="0px";
r.frameBorder="0";
if($telerik.isIE8){r.style.display="block";
}this._iframe=r;
if($telerik.isMobileSafari){var D=document.createElement("div");
D.style.width="100%";
D.style.height="100%";
D.style.overflow="hidden";
D.appendChild(this._iframe);
this._contentCell.appendChild(D);
}else{this._contentCell.appendChild(this._iframe);
}}if(this.get_enableAriaSupport()){t.setAttribute("aria-hidden","true");
t.setAttribute("aria-labelledby",k.id);
e.setAttribute("role","presentation");
c.setAttribute("role","presentation");
g.setAttribute("role","presentation");
k.setAttribute("role","label");
if(this._isPredefined){t.setAttribute("role","alertdialog");
t.setAttribute("aria-describedby",this.get_id()+"_content");
}else{t.setAttribute("role","dialog");
}}if(!this._dockMode){this._createBackReference();
if(this.get_enableAriaSupport()){r.setAttribute("aria-labelledby",k.id);
}}}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;
}return this._buttonsElement;
},_getTitleElement:function(){if(!this._titleElement){this._titleElement=document.createElement("em");
this._titleElement.setAttribute("unselectable","on");
}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);
}if(this.get_iconUrl()){this._titleIconElement.style.background="transparent url('"+this.get_iconUrl()+"') no-repeat scroll 0px 0px";
}return this._titleIconElement;
},_getTitleCommandButton:function(f){if(!f||!this._buttonsArray){return null;
}var e=f.toLowerCase();
e=e.charAt(0).toUpperCase()+e.substring(1);
f="rw"+e+"Button";
var d=this._buttonsArray.length;
for(var g=0;
g<d;
g++){var c=this._buttonsArray[g];
if(c&&Sys.UI.DomElement.containsCssClass(c,f)){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 g=this._getHandlesWidth();
this._defaultMinWidth=g;
if(this._visibleTitlebar){var e=this._tableElement;
var c=this._getTitleElement();
var f=c.style.width;
if(c){c.style.width="1px";
}if(this._dockMode){this._contentElement.style.width="1px";
}e.style.width="1px";
var d=this._titleCell.offsetWidth;
c.style.width=f;
e.style.width="";
if(this._dockMode){this._contentElement.style.width="";
}this._defaultMinWidth+=d;
}}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(c){if(!c&&this._overflowHidden){return;
}var f="hidden";
var e="hidden";
var d="hidden";
var h;
var g;
if(!this._dockMode){try{var j=this.get_contentFrame();
if(j){j.style.overflow=c?"":"hidden";
}h=j.contentWindow.document.documentElement;
if(!h){return;
}g=j.contentWindow.document.body;
if(!c){this._oldBodyOverflow=g.style.overflow;
this._oldDocOverflow=h.style.overflow;
this._overflowHidden=true;
}}catch(i){}}if(c){e=this._oldBodyOverflow;
d=this._oldDocOverflow;
f="auto";
this._overflowHidden=false;
}if(this._dockMode){this.get_contentElement().style.overflow=f;
}else{if(h&&g){if(d||d==""){h.style.overflow=d;
}if(e||e==""){g.style.overflow=e;
}}}},_manageVisibilityFirefox:function(d){var c=this._popupBehavior;
if($telerik.isFirefox&&c){c.set_manageVisibility(d);
}},_updateTitleWidth:function(){if(this._visibleTitlebar){var g=this._getTitleElement();
if(!g){return;
}g.style.width="1px";
var f=0;
var d=this._getTitleCommandButtonsHolder();
var c=d.offsetWidth;
if(c>0){var i=d.getElementsByTagName("LI");
if(i[0]&&i[0].offsetWidth>0){c=i.length*i[0].offsetWidth;
}d.style.width=c+"px";
f+=c;
}var k=this._getTitleIcon();
var j=k.offsetWidth;
if(j>0&&k.parentNode.tagName=="TD"){k.parentNode.style.width=j+"px";
f+=j;
}f+=this._getHandlesWidth();
var h=0;
var e=this._titlebarElement;
h=e?e.offsetWidth-f:f;
if(h>0){g.style.width=h+"px";
}}},_addWindowToDocument:function(){var c=this._getDefaultParent();
c.insertBefore(this._popupElement,c.firstChild);
},_createBackReference:function(){var d=this;
if(!d.Argument){d.Argument={};
}var f=this._iframe;
try{f.radWindow=d;
if(f.contentWindow!=null){f.contentWindow.radWindow=d;
}}catch(c){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(e){var c=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize");
var d=(true==e)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",c,d);
},_configureMaximizeButton:function(e){var c=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Maximize");
var d=(true==e)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",c,d);
},_registerTitlebarHandlersButton:function(e,c,d){var f=this._getTitleCommandButton(e);
if(f){f.setAttribute("title",c);
f.innerHTML=c;
$clearHandlers(f);
$addHandlers(f,{click:d},this);
$addHandler(f,"dblclick",this._cancelEvent);
$addHandler(f,"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 c=$get(this.get_minimizeZoneID());
if(c){if(this.isPinned()){this._isPinned=true;
this.togglePin();
}var d=this._popupElement;
if(d.parentNode!=c){d.parentNode.removeChild(d);
c.appendChild(d);
this.setVisible(true);
d.style.position="static";
if(this.isIE){d.style.display="inline";
}else{d.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 e=this._popupElement;
$telerik.removeCssClasses(e,["rwNormalWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(e,"rwMinimizedWindow");
if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
Sys.UI.DomElement.addCssClass(e,"rwMinimizedWindowShadow");
}var c=e._hideWindowedElementsIFrame;
if(c){Sys.UI.DomElement.addCssClass(c,"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);
},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=b.RadWindow.prototype._checkRestrictionZoneBounds;
}this._setShadowCSSClass(false);
var e=this._popupElement;
$telerik.removeCssClasses(e,["rwNormalWindow","rwMinimizedWindow","rwMinimizedWindowShadow"]);
Sys.UI.DomElement.addCssClass(e,"rwMaximizedWindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var c=e._hideWindowedElementsIFrame;
if(c){Sys.UI.DomElement.removeCssClass(c,"rwMinimizedWindowOverlay");
this._popupBehavior._handleElementResize();
}if(!this.isActive()){this.setActive(true);
}if(!this.isActive()){this.setActive(true);
}if(this.get_showOnTopWhenMaximized()){var f=e.style.zIndex;
if(f){this._restoreZindex=f;
}e.style.zIndex=100000;
}this._updateTitleWidth();
},setActive:function(c){var e=this._popupElement;
if(!c){Sys.UI.DomElement.addCssClass(e,"rwInactiveWindow");
}else{if(!this.isMaximized()){var d=parseInt(e.style.zIndex);
var f=(this.get_stylezindex())?this.get_stylezindex():b.RadWindowUtils.get_newZindex(d);
e.style.zIndex=""+f;
}this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){return;
}Sys.UI.DomElement.removeCssClass(e,"rwInactiveWindow");
}},togglePin:function(){if(!this.isCreated()){return;
}var d=this.onCommand("Pin");
if(!d){return;
}var c=this._getTitleCommandButton("Pin");
var e=this.isPinned();
var f=e?this._getLocalizationString("PinOn"):this._getLocalizationString("PinOff");
if(c){Sys.UI.DomElement.toggleCssClass(c,"on");
}this._registerTitlebarHandlersButton("Pin",f,this.togglePin);
b.RadWindowUtils.setPinned(!e,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();
}catch(c){this._onWindowUrlChanged();
}},fire:function(c){if(c&&typeof(this[c])=="function"){this[c]();
}else{var d=this.get_windowManager();
if(!d){return;
}if(c&&typeof(d[c])=="function"){d[c]();
}}},_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(f){if(this.isClosed()){return;
}var e=new Sys.CancelEventArgs();
var c=(typeof(f)!="undefined"&&!(f instanceof Sys.UI.DomEvent))?f:null;
e._argument=c;
e.get_argument=function(){return this._argument;
};
this.raiseEvent("beforeClose",e);
if(e.get_cancel()){return;
}this.hide();
var d=new Sys.EventArgs();
d._argument=c;
d.get_argument=function(){return this._argument;
};
this.raiseEvent("close",d);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(f instanceof Sys.UI.DomEvent){f=null;
}this._invokeDialogCallBackFunction(f);
if(this.get_destroyOnClose()&&!this._dockMode){this.dispose();
}},_invokeDialogCallBackFunction:function(c){var d=this.get_clientCallBackFunction();
if(d){if("string"==typeof(d)){d=eval(d);
}if("function"==typeof(d)){d(this,c);
}}},onCommand:function(c){var d=new Sys.CancelEventArgs();
d._commandName=c;
d.get_commandName=function(){return this._commandName;
};
this.raise_command(d);
if(d.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(f){var d=null;
try{d=this._iframe.contentWindow.document;
if(d.domain!=document.domain){return;
}}catch(c){return;
}if(null==d){return;
}if(f){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(c){this._registerChildPageHandlers(false);
if(this._removeFromDOM&&!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=false;
var d=this._popupElement;
if(d&&d.parentNode){d.parentNode.removeChild(d);
}}},_onChildPageClick:function(c){if(!this.isVisible()||this.isClosed()){return;
}var d=c.target?c.target:c.srcElement;
if(d){if(d.tagName=="INPUT"&&d.type=="button"){return;
}else{if(d.tagName=="BUTTON"||d.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 f=this.get_animation()!=b.WindowAnimation.None;
this.autoSize(f);
}var d=null;
try{d=this._iframe.contentWindow;
var e=d.document;
}catch(c){return false;
}d.close=Function.createDelegate(this,function(){this.close();
});
},_onWindowUrlChanging:function(){if(this.get_showContentDuringLoad()){var e=this._getStatusMessageElement();
if(e){Sys.UI.DomElement.addCssClass(e,"rwLoading");
}}else{var d=this._iframe.style;
d.position="absolute";
d.top="-10000px";
if(this._isWindowRightToLeft()&&$telerik.isChrome){d.width="1px";
}var c=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(c,"rwLoading");
}},_onWindowUrlChanged:function(){var g=this._getStatusMessageElement();
if(this.get_showContentDuringLoad()){if(g){Sys.UI.DomElement.removeCssClass(g,"rwLoading");
}}else{this._iframe.style.position="";
if(this._isWindowRightToLeft()&&$telerik.isChrome){this._iframe.style.width="100%";
}var c=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(c,"rwLoading");
if($telerik.isIE9){if(this.isMaximized()){this._maintainMaximizedSize();
}else{if(!this.isMinimized()){this._updateWindowSize(this.get_height());
}}}}if(g){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(d){}},_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 parseInt($telerik.getCurrentStyle(this.get_element(),"zIndex"));
},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(h){if(null==h){return false;
}if(this.isMaximized()){return false;
}var f=this.get_minWidth();
if(f&&f>h){h=f;
}var c=parseInt(this.get_maxWidth());
if(c&&c<h){h=c;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}h=this._fixSizeValue(h);
var i=this._popupElement;
if(i){var d=$telerik.getBounds(i);
var e=parseInt(h);
if(isNaN(e)){e=d.width;
}var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d.x,d.y,e,d.height));
if(!g){return false;
}}if(this._width!=h){this._width=h;
}if(this._dockMode){this.setWidthDockMode(this.get_width());
}if(i){this._deleteStoredBounds();
i.style.width=this._width;
this._updatePopupZindex();
}this._updateTitleWidth();
this._manageVisibilityFirefox(true);
return true;
},get_minWidth:function(){var d=parseInt(this._minWidth);
if(!this.isCreated()){return d;
}var c=this.get_defaultMinWidth();
return(d&&(d>c))?d:c;
},set_minWidth:function(c){if(this._minWidth!=c){this._minWidth=c;
}},get_minHeight:function(){var d=parseInt(this._minHeight);
if(!this.isCreated()){return d;
}var c=this.get_defaultMinHeight();
return(d&&(d>c))?d:c;
},set_minHeight:function(c){if(this._minHeight!=c){this._minHeight=c;
}},get_height:function(){return parseInt(this._height);
},set_height:function(e){if(null==e){return false;
}if(this.isMaximized()){return false;
}var h=this.get_minHeight();
if(h&&h>e){e=h;
}var g=parseInt(this.get_maxHeight());
if(g&&g<e){e=g;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}e=this._fixSizeValue(e);
var f=this._popupElement;
if(f){this._firstShow=false;
var c=$telerik.getBounds(f);
var d=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(c.x,c.y,c.width,parseInt(e)));
if(!d){return false;
}}if(this._height!=e){this._height=e;
}if(this._dockMode){this.setHeightDockMode(this.get_height());
}if(f){this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}this._manageVisibilityFirefox(true);
return true;
},_updateWindowSize:function(f,c){var e=this._tableElement;
var d=f?f:e.style.height;
if(true==c){d=e.offsetHeight+"px";
}if(parseInt(d)==0){return;
}e.style.height=d;
this._fixIeHeight(e,d);
e.parentNode.style.height=d;
},get_behaviors:function(){return this._behaviors;
},set_behaviors:function(l){if(this._behaviors!=l){this._behaviors=l;
}if(null==this._titlebarElement){return;
}this._enableMoveResize(false);
this._enableMoveResize(true);
if(this._buttonsArray&&this._buttonsArray.length>0){var h=this._buttonsArray.length;
for(var k=0;
k<h;
k++){var f=this._buttonsArray[k];
$clearHandlers(f);
}this._buttonsArray=[];
var e=this._getTitleCommandButtonsHolder();
e.innerHTML="";
}if(b.WindowBehaviors.None==this._behaviors){return;
}else{var p=b.WindowBehaviors;
var g=[[this.isBehaviorEnabled(p.Pin),"rwPinButton",this._getLocalizationString("PinOn"),this.togglePin],[this.isBehaviorEnabled(p.Reload),"rwReloadButton",this._getLocalizationString("Reload"),this.reload],[this.isBehaviorEnabled(p.Minimize),"rwMinimizeButton",this._getLocalizationString("Minimize"),this.minimize],[this.isBehaviorEnabled(p.Maximize),"rwMaximizeButton",this._getLocalizationString("Maximize"),this.maximize],[this.isBehaviorEnabled(p.Close),"rwCloseButton",this._getLocalizationString("Close"),this.close]];
for(var n=0;
n<g.length;
n++){var m=g[n];
if(!m[0]){continue;
}var c=document.createElement("li");
var d=document.createElement("a");
d.href="javascript:void(0);";
d.className=m[1];
d.setAttribute("title",m[2]);
var o=document.createElement("span");
o.innerHTML=m[2];
d.appendChild(o);
$addHandlers(d,{click:m[3],dblclick:this._cancelEvent,mousedown:this._cancelEvent},this);
$addHandler(d,"click",this._cancelEvent);
c.appendChild(d);
this._buttonsElement.appendChild(c);
this._buttonsArray[this._buttonsArray.length]=d;
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";
}},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";
}},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_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(c){var d=this._getStatusMessageElement();
if(d){window.setTimeout(function(){d.value=c;
},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 d=["position"];
var c={};
for(var e=0;
e<d.length;
e++){c[d[e]]=this["get_"+d[e]]();
}return Sys.Serialization.JavaScriptSerializer.serialize(c);
}};
a.registerControlProperties(b.RadWindow,{minimizeZoneID:null,restrictionZoneID:"",minimizeIconUrl:null,iconUrl:null,clientCallBackFunction:null,navigateUrl:null,localization:null,shortcuts:null,initialBehaviors:b.WindowBehaviors.None,destroyOnClose:false,reloadOnShow:false,showContentDuringLoad:true,visibleOnPageLoad:false,showOnTopWhenMaximized:true,animation:b.WindowAnimation.None,animationDuration:500,autoSize:false,autoSizeBehaviors:b.WindowAutoSizeBehaviors.Default,windowManager:null,cssClass:"",name:null,skin:"Deafult",formID:null,enableShadow:false,enableAriaSupport:false,maxWidth:null,maxHeight:null});
a.registerControlEvents(b.RadWindow,["command","dragStart","dragEnd","activate","beforeShow","show","pageLoad","close","beforeClose","resizeStart","resizeEnd","autoSizeEnd"]);
b.RadWindow.registerClass("Telerik.Web.UI.RadWindow",b.RadWebControl);
b.RadWindowUtils._zIndex=3000;
b.RadWindowUtils.get_newZindex=function(c){c=parseInt(c);
if(null==c||isNaN(c)){c=0;
}if(b.RadWindowUtils._zIndex<c){b.RadWindowUtils._zIndex=c;
}b.RadWindowUtils._zIndex++;
return b.RadWindowUtils._zIndex;
};
b.RadWindowUtils._pinnedList={};
b.RadWindowUtils.setPinned=function(c,g){if(c){var f=g._getViewportBounds();
var h=g._getCurrentBounds();
g.LeftOffset=h.x-f.scrollLeft;
g.TopOffset=h.y-f.scrollTop;
var i=window.setInterval(function(){b.RadWindowUtils._updatePinnedElementPosition(g);
},100);
b.RadWindowUtils._pinnedList[i]=g;
}else{var d=null;
var j=b.RadWindowUtils._pinnedList;
for(var e in j){if(j[e]==g){d=e;
break;
}}if(null!=d){window.clearInterval(d);
b.RadWindowUtils._pinnedList[d]=null;
}g.TopOffset=null;
g.LeftOffset=null;
}};
b.RadWindowUtils._updatePinnedElementPosition=function(g){if(g.isMaximized()||!g.isVisible()){return;
}var e=g._getViewportBounds();
var c=g._getCurrentBounds();
var f=(g.LeftOffset!=null)?g.LeftOffset+e.scrollLeft:c.x;
var d=(g.TopOffset!=null)?g.TopOffset+e.scrollTop:c.y;
if(c.x!=f||c.y!=d){g.moveTo(f,d);
}};
})();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.WindowShortCutManager=function(a){this._shortcuts=[];
this.addShortCuts(a);
};
Telerik.Web.UI.WindowShortCutManager.prototype={addShortCuts:function(b){if(typeof(b)=="string"){b=Sys.Serialization.JavaScriptSerializer.deserialize(b);
}for(var a=0;
a<b.length;
a++){this.addShortCut(b[a][0],b[a][1]);
}},addShortCut:function(c,b){var a=new Telerik.Web.UI.WindowShortCut(c,b);
a.HashValue=this._getShortCutHashValue(a);
this._shortcuts[a.HashValue]=a;
},removeShortCut:function(a){var b=this.findShortCutByName(a);
if(b){this._shortcuts[b.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(c,a,e,f,g,d,b){var h=this._getHashValue(c,a,e,f,g,d,b);
return this._shortcuts[h];
},_getHashValue:function(e,a,g,h,i,f,d){var c=e&65535;
var b=0;
b|=(a?(1<<0):0);
b|=(h?(1<<2):0);
b|=(f?(1<<4):0);
c|=(b<<16);
return c;
},_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();
