nm3clol-archived-russellcou.../mirror/www.russellcountyva.us/ScriptResourceeb2d.axd

1659 lines
69 KiB
Plaintext

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._isiOS5Safari=navigator.userAgent.match(/OS 5_\d like Mac OS X/i);
this._iframeWrapper=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{$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(c){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!c){if(this._bottomResizer&&!this.isBehaviorEnabled(a.WindowBehaviors.Resize)){this._bottomResizer.style.display="none";
}return;
}if(!this._popupElement){return;
}var g=this._tableElement.rows;
var f={};
var d=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(a.WindowBehaviors.Resize)){if(!this._bottomResizer){this._createStatusbarResizer(this._statusCell.firstChild);
}this._bottomResizer.style.display="";
if(d){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 e=this._dockMode?null:this._iframe;
this._resizeExtender.set_iframeToSkip(e);
},_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(f){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,f)){this._manageVisibilityFirefox(false);
if(this._isiOS5Safari){this.setContentFixedHeight(f.height,this._iframeWrapper);
}if(this._dockMode){this.setWidthDockMode(f.width-1);
this.setHeightDockMode(f.height-1);
}else{this._setResizeOverlaySize();
}var i=this._getCurrentBounds();
var e=this.get_minWidth();
var k=parseInt(this.get_maxWidth());
var h=this.get_minHeight();
var d=parseInt(this.get_maxHeight());
var j=false;
if(f.width<e||k&&f.width>k){var c=e;
if(f.width<e){f.width=e;
}else{f.width=k;
c=k;
}var g=this._resizeExtender._originalBounds;
if(this._resizeExtender._resizeDir.west){f.x=g.x+(g.width-c);
if(this._cachedDragZoneBounds){f.x-=this._cachedDragZoneBounds.x;
}}else{f.x=i.x;
}f.y=i.y;
f.height=i.height;
j=true;
}if(f.height<h||d&&f.height>d){f.height=(f.height<h)?h:d;
f.x=i.x;
f.y=i.y;
f.width=i.width;
j=true;
}if(j){this.setSize(f.width,f.height);
this._manageVisibilityFirefox(false);
this._setPopupVisible(f.x,f.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");
var c=this.get_element();
if(c.innerHTML.toLowerCase().indexOf("thank you for using the trial version of radcontrols for asp.net ajax")>0){c.style.display="";
}if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show();
}),0);
}this._registerWindowResizeHandler(true);
var d=this.get_element().className;
if(d){this.set_cssClass(d.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 p=this._getCalculatedPopupBounds();
this._setPopupVisible(p.x,p.y);
var m=$telerik.getBounds(this._popupElement);
var n=this.get_offsetElementID();
if(n){var o=$get(n);
if(o){var l=$telerik.getBounds(o);
m.x=l.x;
m.y=l.y;
}}$telerik.$(this._popupElement).hide();
return m;
});
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 k=""+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();
});
a.Animations.playJQueryAnimation(d,i,f,c,k,e,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(c,d){var f=this._popupElement;
if(this.isVisible()){this._manageVisibilityFirefox(false);
}if(f){var e=$telerik.getBounds(f);
var h=this._getRestrictionZoneBounds();
if(h){var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(c+h.x,d+h.y,e.width,e.height));
if(!g){return false;
}}}c=parseInt(c);
d=parseInt(d);
this._createUI();
this._setPopupVisible(c,d);
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()-this._getHandlesWidth();
var c=this._getTitleElement();
if(c){c.style.width="1px";
}var n;
var r;
f.style.height="1px";
f.style.width="1px";
if(this._dockMode){var o=f.scrollWidth;
r=o>t?o:t;
n=f.scrollHeight;
Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading");
}else{r=d.scrollWidth;
if(r<t){f.style.width=t+"px";
r=d.scrollWidth;
}n=d.scrollHeight;
}var p=this._getRestrictionZoneBounds();
var s=p?p:this._getViewportBounds();
var g=this._getHandlesWidth()+r;
var l=this.get_defaultMinHeight()+n;
if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){var k=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
if(k>0){l-=k;
}}var i=Math.min(g,s.width);
var j=Math.min(l,s.height);
var e=this.get_minWidth();
var m=this.get_minHeight();
var q=parseInt(this.get_maxHeight());
var h=parseInt(this.get_maxWidth());
if(e>i){i=e;
}if(m>j){j=m;
}if(q&&q<j){j=q;
}if(h&&h<i){i=h;
}return{width:i,height:j,contentPageWidth:r,contentPageHeight:n};
},_autoSizeBehaviorBounds:function(d,i){var f=this._getRestrictionZoneBounds();
var g=f?f:this._getViewportBounds();
var c=d;
if(f){c.y-=f.y;
c.x-=f.x;
}if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.WidthProportional)){c.x=this.calcPosition(d.x,d.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(d.y,d.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 e=parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height());
c.height-=e;
}}}return c;
},autoSize:function(l){if(this.isClosed()||this.isMinimized()||this.isMaximized()){return;
}this.setOverflowVisible(true);
this._autoSizeInProgress=!this.get_autoSize();
var k=this.get_contentFrame();
var g=this.get_popupElement();
var i=$telerik.getBounds(g);
var e=$telerik.getBorderBox(g);
i.width-=e.horizontal;
i.height-=e.vertical;
var f=null;
var d=this.get_keepInScreenBounds();
var j=this.get_contentElement();
if(!this._dockMode){try{f=k.contentWindow.document.documentElement;
if(!f){return;
}}catch(h){return false;
}j=f;
if($telerik.isIE||$telerik.isFirefox){j=k;
}}var m=this._calculateBoundsToFit(j,f);
var c=this._autoSizeBehaviorBounds(i,m);
c.width+=e.horizontal;
c.height+=e.vertical;
this.setOverflowVisible(false);
if(l){this._autoSizeWithAnimation(c);
}else{this._restoreRect=null;
this.setBounds(c);
this.setOverflowVisible(true);
Sys.UI.DomElement.removeCssClass(this._contentCell,"rwLoading");
this.raiseEvent("autoSizeEnd",new Sys.EventArgs());
}if($telerik.isIE&&k){k.style.overflow="hidden";
setTimeout(function(){k.style.overflow="";
},0);
}this.set_keepInScreenBounds(d);
if(k){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(d){var c=this.get_contentElement();
if(!this._dockMode||!c){return;
}this.setContentFixedHeight(d,c);
},setContentFixedHeight:function(g,d){if(!d){return;
}var f=this._substractWrappersBorder(g);
var e=this.isVisible();
var c=this._tableElement.rows[3].cells[1];
var h=this._tableElement.rows[0].cells[1];
var i=this._tableElement.rows[2].cells[1];
f-=e?parseInt($telerik.getBounds(c).height):parseInt($telerik.getCurrentStyle(c,"height"));
if(this._visibleTitlebar){f-=e?parseInt($telerik.getBounds(this._titlebarElement).height):parseInt($telerik.getCurrentStyle(this._titlebarElement,"height"));
f-=e?parseInt($telerik.getBounds(this._topResizer).height):parseInt($telerik.getCurrentStyle(this._topResizer,"height"));
}else{f-=e?parseInt($telerik.getBounds(h).height):parseInt($telerik.getCurrentStyle(h,"height"));
}if(this._visibleStatusbar){f-=e?parseInt($telerik.getBounds(i).height):parseInt($telerik.getCurrentStyle(i,"height"));
}if(f>0){d.style.height=f+"px";
}},calcPosition:function(d,e,c,f,h){var i=d+Math.round((e-c)/2);
if(i<0||i+e>f){i=Math.round(Math.abs((f-c)/2));
if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.Default)){var g=this._dockMode?window:this.BrowserWindow;
i+=h?Math.max(g.document.documentElement.scrollTop,g.document.body.scrollTop):Math.max(g.document.documentElement.scrollLeft,g.document.body.scrollLeft);
}}return i;
},_maintainMaximizedSize:function(){if(this.isVisible()&&this._getRestrictionZoneBounds()){this._reSetWindowPosition();
}if(!this.isMaximized()){return;
}var f=this._popupElement;
if(!f){return;
}var j=this._getViewportBounds();
f.style.top=(j.scrollTop+j.y)+"px";
f.style.left=(j.scrollLeft+j.x)+"px";
var i=parseInt(this.get_maxWidth());
var c=parseInt(this.get_maxHeight());
if(i){j.width=i;
}if(c){j.height=c;
}$telerik.setSize(f,{width:j.width,height:j.height});
var k=this._getRestrictionZoneBounds();
if(!k){this._enablePageScrolling(false);
}var d=this._tableElement;
j=$telerik.getContentSize(f);
var h=$telerik.getBorderBox(d);
var e=$telerik.getPaddingBox(d);
var g=j.height-h.vertical-e.vertical;
d.style.height=g+"px";
this._fixIeHeight(d,g);
if(this._dockMode){this.setWidthDockMode(j.width);
this.setHeightDockMode(j.height);
}this._updateTitleWidth();
if(this._isiOS5Safari){this.setContentFixedHeight(j.height,this._iframeWrapper);
}},_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 h=this.get_id();
var u="RadWindowWrapper_"+h;
var E=this._isWindowRightToLeft();
var y=document.createElement("div");
y.id=u;
y.className=this._getFullSkinName();
var t=this.get_cssClass();
if(t){Sys.UI.DomElement.addCssClass(y,t);
}if(E){Sys.UI.DomElement.addCssClass(y,"RadWindow_rtl");
}if(!this._visibleTitlebar){Sys.UI.DomElement.addCssClass(y,"rwNoTitleBar");
}y.style.width=this._width;
y.style.height=this._height;
y.setAttribute("unselectable","on");
this._popupElement=y;
var q=document.createElement("table");
q.cellSpacing=0;
q.cellPadding=0;
Sys.UI.DomElement.addCssClass(q,"rwTable");
this._tableElement=q;
var d=[];
if(E){d=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"];
}else{d=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"];
}var s=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var c=0;
for(var n=0;
n<4;
n++){var z=q.insertRow(-1);
z.className=s[n];
for(var o=1;
o<=3;
o++){var k=z.insertCell(-1);
k.innerHTML="&nbsp;";
k.className=d[c];
c++;
}}var B=q.rows[0].cells[1];
B.innerHTML="";
this._titleCell=B;
var x=document.createElement("div");
x.className="rwTopResize";
x.innerHTML="<!-- / -->";
this._topResizer=x;
this._titleCell.appendChild(this._topResizer);
var l=this._createDefaultTable();
l.className="rwTitlebarControls";
this._titlebarElement=l;
this._titleCell.appendChild(this._titlebarElement);
var C=this._getTitleIcon();
var A=this._titlebarElement.rows[0].insertCell(-1);
A.appendChild(C);
this.set_iconUrl(this.get_iconUrl());
var m=this._getTitleElement();
var p=this._titlebarElement.rows[0].insertCell(-1);
p.appendChild(m);
this.set_title(this._title);
var g=this._titlebarElement.rows[0].insertCell(-1);
g.noWrap=true;
g.style.whiteSpace="nowrap";
g.appendChild(this._getTitleCommandButtonsHolder());
var w=q.rows[1].cells[1];
w.vAlign="top";
w.innerHTML="";
this._contentCell=w;
if(!(this._dockMode||this._isPredefined)){Sys.UI.DomElement.addCssClass(this._contentCell,"rwExternalContent");
}if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true);
}var D=this.get_name();
var r=this._createDefaultTable();
r.style.width="100%";
this._statusCell=q.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(r);
if(!E){this._createStatusbarMessageCell(r);
}if(this.isBehaviorEnabled(a.WindowBehaviors.Resize)){this._createStatusbarResizer(r);
}if(E){this._createStatusbarMessageCell(r);
}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 f=$get(this.get_id()+"_C");
if(f&&f.innerHTML){f.style.overflow="auto";
f.style.border="0px";
this.set_contentElement(f);
this.setWidthDockMode(this.get_width());
this.setHeightDockMode(this.get_height());
}}else{var e=($telerik.isIE&&!$telerik.isIE9Mode)?document.createElement("<iframe name='"+D+"'>"):document.createElement("iframe");
e.name=D;
e.src="javascript:'<html></html>';";
e.style.width="100%";
e.style.height="100%";
e.style.border="0px";
e.frameBorder="0";
if($telerik.isIE8){e.style.display="block";
}this._iframe=e;
if($telerik.isMobileSafari&&!this._isPredefined){var v=document.createElement("div");
v.style.width="100%";
v.style.height="100%";
v.style.overflow="hidden";
v.appendChild(this._iframe);
this._contentCell.appendChild(v);
if(this._isiOS5Safari){this.setContentFixedHeight(this.get_height(),v);
}this._iframeWrapper=v;
}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 f=this._buttonsArray.length;
for(var e=0;
e<f;
e++){var c=this._buttonsArray[e];
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 e=this._getTitleElement();
var d=e.style.width;
if(e){e.style.width="1px";
}if(this._dockMode){this._contentElement.style.width="1px";
}g.style.width="1px";
var c=this._titleCell.offsetWidth;
e.style.width=d;
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 j="hidden";
var i;
var d;
if(!this._dockMode){try{var h=this.get_contentFrame();
if(h){h.style.overflow=f?"":"hidden";
}i=h.contentWindow.document.documentElement;
if(!i){return;
}d=h.contentWindow.document.body;
if(!f){this._oldBodyOverflow=d.style.overflow;
this._oldDocOverflow=i.style.overflow;
this._overflowHidden=true;
}}catch(e){}}if(f){g=this._oldBodyOverflow;
j=this._oldDocOverflow;
c="auto";
this._overflowHidden=false;
}if(this._dockMode){this.get_contentElement().style.overflow=c;
}else{if(i&&d){if(j||j==""){i.style.overflow=j;
}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 j=this._getTitleCommandButtonsHolder();
var h=j.offsetWidth;
if(h>0){var g=j.getElementsByTagName("LI");
if(g[0]&&g[0].offsetWidth>0){h=g.length*g[0].offsetWidth;
}j.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 k=0;
var e=this._titlebarElement;
k=e?e.offsetWidth-c:c;
if(k>0){i.style.width=k+"px";
}}},_addWindowToDocument:function(){var c=this._getDefaultParent();
c.insertBefore(this._popupElement,c.firstChild);
},_createBackReference:function(){var f=this;
if(!f.Argument){f.Argument={};
}var d=this._iframe;
try{d.radWindow=f;
if(d.contentWindow!=null){d.contentWindow.radWindow=f;
}}catch(c){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(e){var d=(true==e)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize");
var g=(true==e)?this.restore:this.minimize;
var f=this._getTitleCommandButton("Minimize");
if(!(this.isBehaviorEnabled(a.WindowBehaviors.Close))&&f){var c=f.parentNode;
var h=this._isWindowRightToLeft()?"right":"left";
if(true==e){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 c=this.onCommand("Reload");
if(!c){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(d){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;
c.close=Function.createDelegate(this,function(){this.close();
});
}catch(e){return false;
}},_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&&i>e){c=i;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}c=this._fixSizeValue(c);
var f=this._popupElement;
if(f){var d=$telerik.getBounds(f);
var h=parseInt(c);
if(isNaN(h)){h=d.width;
}var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d.x,d.y,h,d.height));
if(!g){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 h=this.get_minHeight();
if(h&&h>c&&(!e||(e&&e>=h))){c=h;
}var e=parseInt(this.get_maxHeight());
if(e&&e<c){c=e;
}if(this.isVisible()){this._manageVisibilityFirefox(false);
}c=this._fixSizeValue(c);
var g=this._popupElement;
if(g){this._firstShow=false;
var d=this.get_contentElement();
if(this._dockMode&&d){d.style.height="";
}var f=$telerik.getBounds(g);
var i=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(f.x,f.y,f.width,parseInt(c)));
if(!i){return false;
}}if(this._height!=c){this._height=c;
}if(this._dockMode){this.setHeightDockMode(this.get_height());
}if(g){this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}this._manageVisibilityFirefox(true);
if(this._isiOS5Safari){this.setContentFixedHeight(this.get_height(),this._iframeWrapper);
}return true;
},_updateWindowSize:function(d,e){var c=this._tableElement;
var g=d?d:c.style.height;
if(true==e){g=c.offsetHeight+"px";
}if(parseInt(g)==0){return;
}var f=$telerik.getBorderBox(this.get_popupElement()).vertical;
g=parseInt(g)>f?(parseInt(g)-f)+"px":g;
c.style.height=g;
this._fixIeHeight(c,g);
c.parentNode.style.height=g;
},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 h=this._buttonsArray.length;
for(var e=0;
e<h;
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 l=0;
l<p.length;
l++){var k=p[l];
if(!k[0]){continue;
}var m=document.createElement("li");
var n=document.createElement("a");
n.href="javascript:void(0);";
n.className=k[1];
n.setAttribute("title",k[2]);
if(this.get_enableAriaSupport()){m.setAttribute("role","presentation");
n.setAttribute("role","button");
}var g=document.createElement("span");
g.innerHTML=k[2];
n.appendChild(g);
$addHandlers(n,{click:k[3],dblclick:this._cancelEvent,mousedown:this._cancelEvent},this);
$addHandler(n,"click",this._cancelEvent);
m.appendChild(n);
this._buttonsElement.appendChild(m);
this._buttonsArray[this._buttonsArray.length]=n;
this._updateTitleWidth();
this._defaultMinWidth=null;
}}},addShortcut:function(d,c){if(this._shortCutManager){this._shortCutManager.addShortCut(d.toLowerCase(),c);
}else{if(!this.get_shortcuts()){this._shortcuts="[['"+d.toLowerCase()+"', '"+c+"']]";
}this._registerGlobalBodyEventHandlers(true);
}},removeShortcut:function(c){if(this._shortCutManager){this._shortCutManager.removeShortCut(c.toLowerCase());
}},getShortcutString:function(d){if(!this._shortCutManager){return null;
}var c=this._shortCutManager.findShortCutByName(d.toLowerCase());
return(c&&c.get_shortCutString())?c.get_shortCutString():null;
},isShortcutAdded:function(c){return this.getShortcutString(c.toLowerCase())?true:false;
},removeAllShortcutsCommand:function(c){while(this.isShortcutAdded(c)){this.removeShortcut(c.toLowerCase());
}},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 d=["position"];
var e={};
for(var c=0;
c<d.length;
c++){e[d[c]]=this["get_"+d[c]]();
}return Sys.Serialization.JavaScriptSerializer.serialize(e);
},_applyAriaForLayoutTables:function(){var k=this._tableElement;
if(k){k.setAttribute("role","presentation");
}var e=k.getElementsByTagName("tr");
for(var g=0;
g<e.length;
g++){var c=e[g];
c.setAttribute("role","presentation");
var l=c.getElementsByTagName("td");
for(var d=0;
d<l.length;
d++){l[d].setAttribute("role","presentation");
}}var m=this._titlebarElement;
if(m){m.setAttribute("role","presentation");
}var h=this._statusCell;
if(h){var f=h.getElementsByTagName("table")[0];
if(f){f.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,d){var a=f&65535;
var e=0;
e|=(i?(1<<0):0);
e|=(c?(1<<2):0);
e|=(g?(1<<4):0);
a|=(e<<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"};
}}};