﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadWindowControllerClass=function(){
this._activeWindow=null;
this._historyStack=[];
this._registerGlobalBodyEventHandlers();
};
Telerik.Web.UI.RadWindowControllerClass.prototype={getInstance:function(){
return this;
},_registerGlobalBodyEventHandlers:function(){
var _1=Function.createDelegate(null,function(e){
if(e.keyCode==27){
Telerik.Web.UI.RadWindowController.hideCurrentWindowIfNonModal();
}
});
$addHandler(document.documentElement,"keydown",_1);
Sys.Application.add_unload(function(){
$removeHandler(document.documentElement,"keydown",_1);
});
},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(_3){
if(_3==this._activeWindow){
return;
}
this.inactivateCurrentWindow();
this._activeWindow=_3;
Array.remove(this._historyStack,_3);
Array.add(this._historyStack,_3);
},notifyWindowClosed:function(_4){
if(this._activeWindow==_4){
this._activeWindow=null;
}
Array.remove(this._historyStack,_4);
this._activatePreviousWindow();
},_activatePreviousWindow:function(){
var _5=this._historyStack;
var i=_5.length-1;
for(;i>=0;i--){
var _7=_5[i];
if(!_7){
return;
}
if(_7.isCreated()&&!_7.isClosed()&&!_7.isMinimized()){
_7.setActive(true);
break;
}else{
Array.removeAt(_5,i);
}
}
},get_activeWindow:function(){
return this._activeWindow;
}};
Telerik.Web.UI.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null);
if(!Telerik.Web.UI.RadWindowController){
Telerik.Web.UI.RadWindowController=new Telerik.Web.UI.RadWindowControllerClass();
}
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.RadWindowUtils");
Telerik.Web.UI.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"};
Telerik.Web.UI.RadWindow=function(_8){
Telerik.Web.UI.RadWindow.initializeBase(this,[_8]);
this._eventNames=["resize","activate","dragStart","dragEnd","show","pageLoad","close","command"];
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._buttonsElement=null;
this._buttonsArray=[];
this.isIE=($telerik.isIE);
this._openerElementID=null;
this._offsetElementID=null;
this._behaviors=Telerik.Web.UI.WindowBehaviors.Default;
this._initialBehaviors=Telerik.Web.UI.WindowBehaviors.None;
this._navigateUrl=null;
this._left="";
this._top="";
this._formID=null;
this._skin="Default";
this._title="";
this._width="300px";
this._height="300px";
this._minimizeZoneID=null;
this._restrictionZoneID="";
this._clientCallBackFunction=null;
this._reloadOnShow=false;
this._visibleOnPageLoad=false;
this._destroyOnClose=false;
this._visibleTitlebar=true;
this._visibleStatusbar=true;
this._showContentDuringLoad=true;
this._modal=false;
this._overlay=false;
this._keepInScreenBounds=false;
this._iconUrl=null;
this._minimizeIconUrl=null;
this._animation=Telerik.Web.UI.WindowAnimation.None;
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._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._loaded=false;
this._isCloned=false;
this._restoreRect=null;
this._popupBehavior=null;
this._popupVisible=false;
this._windowManager;
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;
};
Telerik.Web.UI.RadWindow.prototype={_getLocalization:function(){
return Telerik.Web.UI.RadWindowUtils.Localization;
},_registerIframeLoadHandler:function(_9){
if(!this._iframe){
return;
}
if(_9){
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(_a){
if(_a){
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(_b,_c){
if(!_b){
return;
}
if(true==_c){
this._onClickDelegate=Function.createDelegate(this,this._onClick);
$addHandler(_b,"click",this._onClickDelegate);
}else{
var _d=$removeHandler(_b,"click",this._onClickDelegate);
this._onClickDelegate=null;
}
},_registerTitlebarHandlers:function(_e){
var _f=this._titleCell;
if(_e){
this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){
if(this.isMinimized()){
this.restore();
}else{
if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){
if(this.isMaximized()){
this.restore();
}else{
this.maximize();
}
}
}
});
this._onTitlebarClickDelegate=Function.createDelegate(this,function(){
this.setActive(true);
});
$addHandler(_f,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(_f,"click",this._onTitlebarClickDelegate);
}else{
if(_f){
if(this._onTitlebarDblclickDelegate){
$removeHandler(_f,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}
if(this._onTitlebarClickDelegate){
$removeHandler(_f,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}
$clearHandlers(_f);
}
}
},_makeModal:function(_10){
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(!_10){
return;
}
if(typeof (Telerik.Web.UI.RadWindowManager)!="undefined"&&Telerik.Web.UI.RadWindowManager.isInstanceOfType(this)){
return;
}
this._onModalShowHandler=function(_11){
if(!_11._modalExtender){
_11._modalExtender=new Telerik.Web.UI.ModalExtender(_11._popupElement);
}
_11._modalExtender.show();
_11.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(_12){
window.setTimeout(function(){
if(_12._modalExtender){
_12._modalExtender.hide();
}
},10);
};
this.add_close(this._onModalCloseHandler);
},_enableMoveResize:function(_13){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_13){
return;
}
if(!this._popupElement){
return;
}
var _14=this._tableElement.rows;
var _15={};
var _16=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){
if(_16){
_15={nw:_14[0].cells[2],n:this._topResizer,ne:_14[0].cells[0],w:[_14[1].cells[2],_14[2].cells[2]],e:[_14[1].cells[0],_14[2].cells[0]],sw:_14[3].cells[2],s:_14[3].cells[1],se:[_14[3].cells[0],this._bottomResizer]};
}else{
_15={nw:_14[0].cells[0],n:this._topResizer,ne:_14[0].cells[2],w:[_14[1].cells[0],_14[2].cells[0]],e:[_14[1].cells[2],_14[2].cells[2]],sw:_14[3].cells[0],s:_14[3].cells[1],se:[_14[3].cells[2],this._bottomResizer]};
}
}
if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Move)){
_15["move"]=this._titleCell;
}
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._popupElement,_15,this._tableElement);
},onResizeStart:function(){
if(this.isMaximized()){
return false;
}
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
},onResizing:function(_17){
if(!this._cachedDragZoneBounds){
return true;
}
return this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,_17);
},onResizeEnd:function(){
this._cachedDragWindowBounds=null;
var _18=this._getCurrentBounds();
this.moveTo(_18.x,_18.y);
if(this._overlay&&$telerik.isFirefox){
this._popupBehavior._onMove();
}
this.raiseEvent("resize",new Sys.EventArgs());
},onDragStart:function(){
this.setActive(true);
if(this.isPinned()||this.isMaximized()){
return false;
}
if(this.isMinimized()&&this.get_minimizeZoneID()){
return false;
}
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
this._cachedDragWindowBounds=$telerik.getBounds(this._popupElement);
this.raiseEvent("dragStart",new Sys.EventArgs());
return true;
},onDragEnd:function(_19){
this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){
this._popupBehavior._onMove();
}
this.raiseEvent("dragEnd",new Sys.EventArgs());
var _1a=this._getCurrentBounds();
this.moveTo(_1a.x,_1a.y);
this.setActive(true);
},onDrag:function(_1b){
if(!this._cachedDragZoneBounds){
return true;
}
var _1c=this._cachedDragWindowBounds;
var _1d=this._cachedDragZoneBounds;
_1b.width=_1c.width;
_1b.height=_1c.height;
var _1e=this._checkRestrictionZoneBounds(_1d,_1b);
if(!_1e){
if(_1b.x<=_1d.x){
_1b.x=_1d.x;
}else{
if(_1d.x+_1d.width<=_1b.x+_1c.width){
_1b.x=_1d.x+_1d.width-_1c.width;
}
}
if(_1b.y<=_1d.y){
_1b.y=_1d.y;
}else{
if(_1d.y+_1d.height<=_1b.y+_1c.height){
_1b.y=_1d.y+_1d.height-_1c.height;
}
}
_1e=true;
}
return _1e;
},initialize:function(){
Telerik.Web.UI.RadWindow.callBaseMethod(this,"initialize");
if(this._visibleOnPageLoad){
setTimeout(Function.createDelegate(this,function(){
this.show();
}),0);
}
this._registerWindowResizeHandler(true);
},dispose:function(){
var _1f=this.get_windowManager();
if(_1f){
if(_1f.get_preserveClientState()){
_1f.saveWindowState(this);
}
if(this._destroyOnClose){
_1f.removeWindow(this);
}
}
if(this._windowAnimation){
this._windowAnimation.dispose();
}
this._enableMoveResize(false);
this._makeModal(false);
this._registerTitlebarHandlers(false);
this._registerWindowResizeHandler(false);
this._registerIframeLoadHandler(false);
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
}
this.set_behaviors(Telerik.Web.UI.WindowBehaviors.None);
var _20=this._iframe;
if(_20){
_20.radWindow=null;
_20.src="javascript:'<html></html>';";
_20.name="";
_20.removeAttribute("name");
_20.removeAttribute("NAME");
}
if(this._contentElement){
this._contentElement.innerHTML="";
}
var _21=this._popupElement;
if(_21&&_21.parentNode){
_21.parentNode.removeChild(_21);
}
Telerik.Web.UI.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){
this._hide();
return true;
},clone:function(_22,_23){
if(!_22){
alert("Telerik.Web.UI.RadWindow.clone called without providing a name argument");
return;
}
var evs=(_23!=false)?this._getEventsParameter():null;
var _25=this._getPropertiesParameter();
var _26=document.createElement("SPAN");
_26.setAttribute("id",_22);
var wnd=$create(Telerik.Web.UI.RadWindow,_25,evs,null,_26);
wnd.set_name(_22);
wnd._isCloned=true;
return wnd;
},set_contentElement:function(_28){
this._createUI();
if(this._iframe){
this._iframe.style.display="none";
}
if(_28.parentNode&&_28.parentNode.removeChild){
_28.parentNode.removeChild(_28);
}
this._contentCell.appendChild(_28);
_28.style.display="";
this._contentElement=_28;
},get_contentElement:function(){
return this._contentElement;
},isCreated:function(){
return this._popupElement!=null;
},show:function(){
var _29=this.isCreated();
this._createUI();
if(this._navigateUrl&&(!_29||this._reloadOnShow)){
this.setUrl(this._navigateUrl);
}
if(!_29&&(this._initialBehaviors!=Telerik.Web.UI.WindowBehaviors.None)){
this._show();
this._afterShow();
if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Minimize)){
this.minimize();
}
if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){
this.maximize();
}
if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Pin)){
this.togglePin();
}
return;
}
if(this._animation==Telerik.Web.UI.WindowAnimation.None){
this._show();
this._afterShow();
}else{
this._playAnimation();
}
},_show:function(){
this.raiseEvent("beforeShow",new Sys.EventArgs());
if(this.get_offsetElementID()&&!this._offsetElement){
var _2a=$get(this.get_offsetElementID());
if(_2a){
this._offsetElement=_2a;
}
}
var _2b=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(_2b!=this._popupBehavior.get_parentElement()){
this._popupBehavior.set_parentElement(_2b);
}
this._popupVisible=true;
},_hide:function(){
if(this._windowAnimation){
this._windowAnimation.stop();
}
if(this._windowAnimation){
this._windowAnimation.play(true);
}else{
this._afterHide();
}
},_afterHide:function(){
if(!this._popupBehavior){
return;
}
if(this.isMaximized()){
this.restore();
}
this._popupBehavior.hide(true);
this._popupVisible=false;
this._getWindowController().notifyWindowClosed(this);
},_afterShow:function(){
this.setActive(true);
this._storeBounds();
this.raiseEvent("show",new Sys.EventArgs());
},_playAnimation:function(){
var _2c=function(){
var wnd=this.controller;
var _2e=wnd._getCalculatedPopupBounds();
wnd._setPopupVisible(_2e.x,_2e.y);
var _2f=$telerik.getBounds(wnd._popupElement);
wnd._popupBehavior.hide();
this.set_endBounds(_2f);
};
if(!this._windowAnimation){
if(this._animation==Telerik.Web.UI.WindowAnimation.Fade){
this._windowAnimation=new Telerik.Web.UI.Animations.FadeAnimation(this,0.4,null,this._popupElement,null,this._openerElement);
this._windowAnimation.onShowStart=function(){
this.controller._show();
};
}else{
if(this._animation==Telerik.Web.UI.WindowAnimation.Slide){
this._windowAnimation=new Telerik.Web.UI.Animations.SlideAnimation(this,0.2,null,this._popupElement,null,this._openerElement);
this._windowAnimation.onShowStart=_2c;
}else{
if(this._animation==Telerik.Web.UI.WindowAnimation.FlyIn){
this._windowAnimation=new Telerik.Web.UI.Animations.FlyInAnimation(this,null,null,this._popupElement,null,this._openerElement);
this._windowAnimation.onShowStart=_2c;
}else{
if(this._animation==Telerik.Web.UI.WindowAnimation.Resize){
this._windowAnimation=new Telerik.Web.UI.Animations.ResizeAnimation(this,0.2,50,this._popupElement,null,this._openerElement);
this._windowAnimation.onShowStart=_2c;
}
}
}
}
}
if(this._windowAnimation){
this._windowAnimation.onShowEnd=function(){
this.controller._show();
this.controller._afterShow();
};
this._windowAnimation.onHideEnd=function(){
this.controller._afterHide();
};
this._windowAnimation.play();
}
},_onClick:function(e){
this.show();
return this._cancelEvent(e);
},_cancelEvent:function(e){
if(e){
e.returnValue=false;
e.cancelBubble=true;
e.preventDefault();
e.stopPropagation();
}
return false;
},_getWindowController:function(){
return Telerik.Web.UI.RadWindowController.getInstance();
},_getReloadOnShowUrl:function(_32){
var str="rwndrnd="+Math.random();
if(_32.indexOf("?")>-1){
str="&"+str;
}else{
str="?"+str;
}
_32+=str;
return _32;
},_getPropertiesParameter:function(){
if(!this._propertiesParameter){
var _34={};
for(var _35 in Telerik.Web.UI.RadWindow.prototype){
var _36=this[_35];
if(typeof (_36)=="function"&&_35.indexOf("get_")==0){
var _37=_35.substring(4);
if(null==this["set_"+_37]){
continue;
}
var _38=_36.call(this);
if(null==_38){
continue;
}
_34[_37]=_38;
if(_37=="skin"){
break;
}
}
}
this._propertiesParameter=_34;
}
var _39=this._cloneObject(this._propertiesParameter);
return _39;
},_getEventsParameter:function(){
if(!this._eventsParameter){
var _3a={};
var _3b=this.get_events();
var _3c=this._eventNames;
for(var i=0;i<_3c.length;i++){
var _3e=_3c[i];
var _3f=_3b.getHandler(_3e);
if(_3f&&typeof (eval(_3f))=="function"){
_3a[_3e]=eval(_3f);
}
}
this._eventsParameter=_3a;
}
return this._eventsParameter;
},_cloneObject:function(_40){
var _41={};
for(var _42 in _40){
_41[_42]=_40[_42];
}
return _41;
},getWindowBounds:function(){
return this._getCalculatedPopupBounds();
},toString:function(){
return "[RadWindow id="+this.get_id()+"]";
},center:function(){
var _43=this._getCentralBounds();
this.moveTo(_43.x,_43.y);
},moveTo:function(x,y){
var _46=this._popupElement;
if(_46){
var _47=$telerik.getBounds(_46);
var _48=this._getRestrictionZoneBounds();
if(_48){
var _49=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(x+_48.x,y+_48.y,_47.width,_47.height));
if(!_49){
return false;
}
}
}
x=parseInt(x);
y=parseInt(y);
this._createUI();
this._setPopupVisible(x,y);
this._storeBounds();
return true;
},setSize:function(_4a,_4b){
this._firstShow=false;
this.set_width(_4a);
this.set_height(_4b);
this._storeBounds();
},_maintainMaximizedSize:function(){
if(!this.isMaximized()){
return;
}
var _4c=this._popupElement;
if(!_4c){
return;
}
var _4d=this._getViewportBounds();
_4c.style.top=(_4d.scrollTop+_4d.y)+"px";
_4c.style.left=(_4d.scrollLeft+_4d.x)+"px";
$telerik.setSize(_4c,{width:_4d.width,height:_4d.height});
var _4e=this._getRestrictionZoneBounds();
if(!_4e){
this._enablePageScrolling(false);
}
var _4f=this._tableElement;
_4d=$telerik.getContentSize(_4c);
var _50=$telerik.getBorderBox(_4f);
var _51=$telerik.getPaddingBox(_4f);
var _52=_4d.height-_50.vertical-_51.vertical;
_4f.style.height=_52+"px";
this._fixIeHeight(_4f,_52);
},_enablePageScrolling:function(_53){
var _54=document.body;
var doc=document.documentElement;
if(_53){
if(null!=this._documentOverflow){
doc.style.overflow=this._documentOverflow;
}
if(null!=this._bodyOverflow){
_54.style.overflow=this._bodyOverflow;
}
this._documentOverflow=null;
this._bodyOverflow=null;
}else{
if(null==this._documentOverflow){
this._documentOverflow=doc.style.overflow;
}
if(null==this._bodyOverflow){
this._bodyOverflow=_54.style.overflow;
}
_54.style.overflow="hidden";
doc.style.overflow="hidden";
}
},_getRestrictionZoneBounds:function(){
var _56=null;
if(this.get_restrictionZoneID()){
var _57=$get(this.get_restrictionZoneID());
if(_57){
_56=$telerik.getBounds(_57);
_56.scrollLeft=0;
_56.scrollTop=0;
}
}
return _56;
},_storeBounds:function(){
if(!this.isCreated()){
return;
}
var _58=this._getCurrentBounds();
if(this.isMaximized()){
return false;
}
if(this.isMinimized()){
if(this._restoreRect){
_58.width=this._restoreRect.width;
_58.height=this._restoreRect.height;
}else{
_58.width=this.get_width();
_58.height=this.get_height();
}
}
this._restoreRect=_58;
},_restoreBounds:function(){
if(!this._restoreRect){
return;
}
var _59=this._restoreRect;
this.setSize(_59.width,_59.height);
this.moveTo(_59.x,_59.y);
},_getStoredBounds:function(){
if(this._restoreRect){
return this._restoreRect;
}
},_deleteStoredBounds:function(){
this._restoreRect=null;
},_getCurrentBounds:function(){
var _5a=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){
this._updateWindowSize(this._height);
this._firstShow=true;
}
var _5b=$telerik.getBounds(this._popupElement);
if(_5a){
this._popupElement.style.display="none";
}
var _5c=this._getRestrictionZoneBounds();
if(_5c){
_5b.x-=_5c.x;
_5b.y-=_5c.y;
}
return _5b;
},_getCentralBounds:function(){
var _5d=this._getCurrentBounds();
var _5e=this._getViewportBounds();
var x=parseInt((_5e.width-_5d.width)/2);
var y=parseInt((_5e.height-_5d.height)/2);
_5d.x=x+_5e.scrollLeft;
_5d.y=y+_5e.scrollTop;
return _5d;
},_getViewportBounds:function(){
var _61=this._getRestrictionZoneBounds();
if(_61){
return _61;
}
var _62=$telerik.getClientBounds();
var _63=document.documentElement.scrollLeft||document.body.scrollLeft;
var _64=document.documentElement.scrollTop||document.body.scrollTop;
_62.scrollLeft=_63;
_62.scrollTop=_64;
if(this.isIE){
if(_62.width==0){
_62.width=document.body.clientWidth;
}
if(_62.height==0){
_62.height=document.body.clientHeight;
}
}
return _62;
},_getCalculatedPopupBounds:function(){
var _65=this._getStoredBounds();
if(_65){
return _65;
}
var _66=this._getCurrentBounds();
var _67=this._offsetElement;
if(!this._top&&!this._left&&!_67){
_66=this._getCentralBounds();
}else{
if(_67){
_66.y=0;
_66.x=0;
}else{
var _68=this._getViewportBounds();
_66.x=_68.scrollLeft;
_66.y=_68.scrollTop;
}
var _69=this._left?this._left:0;
_66.x+=_69;
var top=this._top?this._top:0;
_66.y+=top;
}
return _66;
},_checkRestrictionZoneBounds:function(_6b,_6c){
var _6d=_6b;
if(!_6d){
_6d=this._getRestrictionZoneBounds();
if(!_6d){
return true;
}
}
return Telerik.Web.UI.ResizeExtender.containsBounds(_6d,_6c);
},_reSetWindowPosition:function(){
var _6e=this._getCalculatedPopupBounds();
this._setPopupVisible(_6e.x,_6e.y);
},_fixIeHeight:function(_6f,_70){
if("CSS1Compat"==document.compatMode){
var _71=(_6f.offsetHeight-parseInt(_70));
if(_71>0){
var _72=(parseInt(_6f.style.height)-_71);
if(_72>0){
_6f.style.height=_72+"px";
}
}
}
},_setPopupVisible:function(x,y){
var _75=this._getRestrictionZoneBounds();
if(_75){
x+=_75.x;
y+=_75.y;
}
this._popupBehavior._setCoordinates(x,y);
this._popupBehavior.show();
if(!this.get_width()){
this._popupElement.style.width="";
}
this._updateTitleWidth();
},_createDefaultTable:function(){
var _76=document.createElement("TABLE");
_76.align="left";
_76.cellSpacing=0;
_76.cellPadding=0;
_76.insertRow(-1);
return _76;
},_isWindowRightToLeft:function(){
var _77=this._isRightToLeft;
if(_77==null){
var _78=this.get_element();
if(!_78){
var _78=this._formID?document.getElementById(this._formID):null;
if(!_78){
if(document.forms&&document.forms.length>0){
_78=document.forms[0];
}else{
_78=document.body;
}
}
}
_77=this._isRightToLeft=$telerik.isRightToLeft(_78);
}
return _77;
},_createStatusbarResizer:function(_79){
var _7a=_79.rows[0].insertCell(-1);
_7a.style.width="15px";
var _7b=document.createElement("DIV");
_7a.appendChild(_7b);
this._bottomResizer=_7b;
},_createStatusbarMessageCell:function(_7c){
var _7d=_7c.rows[0].insertCell(-1);
_7d.style.width="100%";
var _7e=this._getStatusMessageElement();
_7d.appendChild(_7e);
},_createUI:function(){
if(!this._popupElement){
var _7f=this.get_id();
var _80="RadWindowWrapper_"+_7f;
var _81=this._isWindowRightToLeft();
var _82=document.createElement("DIV");
_82.id=_80;
_82.className=this._getFullSkinName();
if(_81){
Sys.UI.DomElement.addCssClass(_82,"radwindow_rtl");
}
_82.style.width=this._width;
_82.style.height=this._height;
_82.setAttribute("unselectable","on");
this._popupElement=_82;
var _83=document.createElement("TABLE");
_83.cellSpacing=0;
_83.cellPadding=0;
this._tableElement=_83;
var _84=[];
if(_81){
classNames=["corner topright","titlebar","corner topleft","corner bodyright","windowcontent","corner bodyleft","corner bodyright","statusbar","corner bodyleft","corner footerright","footercenter","corner footerleft"];
}else{
classNames=["corner topleft","titlebar","corner topright","corner bodyleft","windowcontent","corner bodyright","corner bodyleft","statusbar","corner bodyright","corner footerleft","footercenter","corner footerright"];
}
var _85=["titlerow","contentrow","statusbarrow","footerrow"];
var _86=0;
for(var i=0;i<4;i++){
var row=_83.insertRow(-1);
row.className=_85[i];
for(var j=1;j<=3;j++){
var _8a=row.insertCell(-1);
_8a.innerHTML="&nbsp;";
_8a.className=classNames[_86];
_86++;
}
}
var _8b=_83.rows[0].cells[1];
_8b.innerHTML="";
this._titleCell=_8b;
var _8c=document.createElement("DIV");
_8c.className="topresize";
_8c.innerHTML="<!-- / -->";
this._topResizer=_8c;
this._titleCell.appendChild(this._topResizer);
var _8d=this._createDefaultTable();
_8d.className="titlebarcontrols";
this._titlebarElement=_8d;
this._titleCell.appendChild(this._titlebarElement);
var _8e=this._getTitleIcon();
var _8f=this._titlebarElement.rows[0].insertCell(-1);
_8f.appendChild(_8e);
var _90=this._getTitleElement();
var _8b=this._titlebarElement.rows[0].insertCell(-1);
_8b.appendChild(_90);
this.set_title(this._title);
var _91=this._titlebarElement.rows[0].insertCell(-1);
_91.noWrap=true;
_91.style.whiteSpace="nowrap";
_91.appendChild(this._getTitleCommandButtonsHolder());
var _92=_83.rows[1].cells[1];
_92.vAlign="top";
_92.innerHTML="";
this._contentCell=_92;
var _93=this.get_name();
var _94=($telerik.isIE)?document.createElement("<iframe name='"+_93+"'>"):document.createElement("iframe");
_94.name=_93;
_94.src="javascript:'<html></html>';";
_94.style.width="100%";
_94.style.height="100%";
_94.style.border="0px";
_94.frameBorder="0";
this._iframe=_94;
this._contentCell.appendChild(this._iframe);
var _95=this._createDefaultTable();
_95.style.width="100%";
this._statusCell=_83.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(_95);
if(_81){
this._createStatusbarResizer(_95);
this._createStatusbarMessageCell(_95);
}else{
this._createStatusbarMessageCell(_95);
this._createStatusbarResizer(_95);
}
this._createBackReference();
this._popupElement.appendChild(this._tableElement);
this._popupElement.style.display="none";
this._popupElement.style.position="absolute";
this._addWindowToDocument();
this.set_behaviors(this._behaviors);
this._registerTitlebarHandlers(true);
this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
}
if(!this._popupBehavior){
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{"id":(new Date()-100)+"PopupBehavior","parentElement":null,"overlay":this._overlay,"keepInScreenBounds":this._keepInScreenBounds},null,null,this._popupElement);
}
},_getStatusMessageElement:function(){
if(null==this._statusMessageElement){
var el=document.createElement("INPUT");
el.readOnly="readonly";
el.setAttribute("unselectable","on");
this._statusMessageElement=el;
}
return this._statusMessageElement;
},_getTitleCommandButtonsHolder:function(){
if(null==this._buttonsElement){
var ul=document.createElement("UL");
ul.className="controlbuttons";
this._buttonsElement=ul;
}
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 _98=document.createElement("A");
this._titleIconElement=_98;
_98.className="windowicon";
if(this.get_iconUrl()){
_98.style.background="transparent url("+this.get_iconUrl()+") no-repeat scroll 0px 0px";
}
}
return this._titleIconElement;
},_getTitleCommandButton:function(_99){
if(!_99||!this._buttonsArray){
return null;
}
_99=_99.toLowerCase()+"button";
var _9a=this._buttonsArray.length;
for(var i=0;i<_9a;i++){
var _9c=this._buttonsArray[i];
if(_9c&&Sys.UI.DomElement.containsCssClass(_9c,_99)){
return _9c;
}
}
return null;
},_updateTitleWidth:function(){
if(this._visibleTitlebar){
var _9d=this._getTitleElement();
if(!_9d){
return;
}
var _9e=this._getTitleCommandButtonsHolder();
var _9f=_9e.offsetWidth;
if(_9f>0){
var lis=_9e.getElementsByTagName("LI");
if(lis[0]&&lis[0].offsetWidth>0){
_9f=lis.length*lis[0].offsetWidth;
}
_9e.style.width=_9f+"px";
}
var _a1=this._getTitleIcon();
var _a2=_a1.offsetWidth;
if(_a2>0&&_a1.parentNode.tagName=="TD"){
_a1.parentNode.style.width=_a2+"px";
}
}
},_addWindowToDocument:function(){
var _a3=this._formID?document.getElementById(this._formID):null;
if(!_a3){
if(document.forms&&document.forms.length>0){
_a3=document.forms[0];
}else{
_a3=document.body;
}
}
_a3.insertBefore(this._popupElement,_a3.firstChild);
},_invokeDialogCallBackFunction:function(_a4,_a5){
if(true!=_a5){
this.close();
}
var _a6=this.get_clientCallBackFunction();
if(_a6){
if("string"==typeof (_a6)){
_a6=eval(_a6);
}
if("function"==typeof (_a6)){
_a6(this,_a4);
}
}
},_createBackReference:function(){
var _a7=this;
if(!_a7.Argument){
_a7.Argument={};
}
var _a8=this._iframe;
try{
_a8.radWindow=_a7;
if(_a8.contentWindow!=null){
_a8.contentWindow.radWindow=_a7;
}
}
catch(e){
}
},_getFullSkinName:function(){
return "radwindow radwindow_"+this._skin+" normalwindow transparentwindow";
},_configureMinimizeButton:function(_a9){
var loc=this._getLocalization();
var _ab=(true==_a9)?loc["Restore"]:loc["Minimize"];
var _ac=(true==_a9)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",_ab,_ac);
},_configureMaximizeButton:function(_ad){
var loc=this._getLocalization();
var _af=(true==_ad)?loc["Restore"]:loc["Maximize"];
var _b0=(true==_ad)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",_af,_b0);
},_registerTitlebarHandlersButton:function(_b1,_b2,_b3){
var _b4=this._getTitleCommandButton(_b1);
if(_b4){
var loc=this._getLocalization();
_b4.setAttribute("title",_b2);
_b4.innerHTML=_b2;
$clearHandlers(_b4);
$addHandlers(_b4,{"click":_b3},this);
$addHandler(_b4,"dblclick",this._cancelEvent);
$addHandler(_b4,"mousedown",this._cancelEvent);
}
},isCloned:function(){
return this._isCloned;
},isBehaviorEnabled:function(_b6){
return _b6&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(_b7){
return _b7&this._initialBehaviors?true:false;
},setVisible:function(_b8){
if(this._popupBehavior){
if(_b8){
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,"inactivewindow"));
},isPinned:function(){
var _b9=this._getTitleCommandButton("Pin");
return (_b9&&Sys.UI.DomElement.containsCssClass(_b9,"on"));
},isClosed:function(){
return (!this.isVisible());
},isMinimized:function(){
return (this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"minimizedwindow"));
},isMaximized:function(){
return (this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"maximizedwindow"));
},_moveToMinimizeZone:function(){
var _ba=$get(this.get_minimizeZoneID());
if(_ba){
if(this.isPinned()){
this._isPinned=true;
this.togglePin();
}
var _bb=this._popupElement;
if(_bb.parentNode!=_ba){
_bb.parentNode.removeChild(_bb);
_ba.appendChild(_bb);
this.setVisible(true);
_bb.style.position="static";
if(this.isIE){
_bb.style.display="inline";
}else{
_bb.style.cssFloat="left";
}
}
}
},_moveToDocument:function(){
var _bc=this._popupElement;
_bc.parentNode.removeChild(_bc);
_bc.style.position="absolute";
if(this.isIE){
_bc.style.display="";
}else{
_bc.style.cssFloat="";
}
this._addWindowToDocument();
if(this._isPinned){
this._isPinned=false;
this.togglePin();
}
},minimize:function(){
if(!this.isCreated()){
return;
}
var _bd=this.onCommand("Minimize");
if(!_bd){
return;
}
if(this.isMaximized()){
this._restoreBounds();
}
var _be=this._popupElement;
$telerik.removeCssClasses(_be,["normalwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_be,"minimizedwindow");
var _bf=_be._hideWindowedElementsIFrame;
if(_bf){
Sys.UI.DomElement.addCssClass(_bf,"minimizedwindowoverlay_"+this._skin);
}
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
if(this.get_minimizeZoneID()){
this._moveToMinimizeZone();
}
},restore:function(){
if(!this.isCreated()){
return;
}
var _c0=this.onCommand("Restore");
if(!_c0){
return;
}
this._configureMinimizeButton();
this._configureMaximizeButton();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
this._normalizeWindowRootCss();
this._enablePageScrolling(true);
this._restoreBounds();
this.setVisible(true);
if(this._restoreZindex){
this._popupElement.style.zIndex=this._restoreZindex;
this._restoreZindex=null;
}
this.setVisible(true);
this.setActive(true);
},maximize:function(){
if(!this.isCreated()){
return;
}
var _c1=this.onCommand("Maximize");
if(!_c1){
return;
}
this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _c2=this._popupElement;
$telerik.removeCssClasses(_c2,["normalwindow","minimizedwindow"]);
Sys.UI.DomElement.addCssClass(_c2,"maximizedwindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var _c3=_c2._hideWindowedElementsIFrame;
if(_c3){
$telerik.removeCssClasses(_c3,["minimizedwindowoverlay_"+this._skin]);
this._popupBehavior._handleElementResize();
}
if(!this.isActive()){
this.setActive(true);
}
if(!this._getRestrictionZoneBounds()){
var _c4=_c2.style.zIndex;
if(_c4){
this._restoreZindex=_c4;
}
_c2.style.zIndex=100000;
}
},setActive:function(_c5){
var _c6=this._popupElement;
if(!_c5){
Sys.UI.DomElement.addCssClass(_c6,"inactivewindow");
}else{
if(!this.isMaximized()){
var _c7=parseInt(_c6.style.zIndex);
var _c8=Telerik.Web.UI.RadWindowUtils.get_newZindex(_c7);
_c6.style.zIndex=""+_c8;
}
this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){
return;
}
$telerik.removeCssClasses(_c6,["inactivewindow"]);
}
},togglePin:function(){
if(!this.isCreated()){
return;
}
var _c9=this.onCommand("Pin");
if(!_c9){
return;
}
var _ca=this._getTitleCommandButton("Pin");
var loc=this._getLocalization();
var _cc=this.isPinned();
var _cd=_cc?loc["PinOn"]:loc["PinOff"];
if(_ca){
Sys.UI.DomElement.toggleCssClass(_ca,"on");
}
this._registerTitlebarHandlersButton("Pin",_cd,this.togglePin);
Telerik.Web.UI.RadWindowUtils.setPinned(!_cc,this);
},reload:function(){
if(!this.isCreated()){
return;
}
var _ce=this.onCommand("Reload");
if(!_ce){
return;
}
if(!this._iframe){
return;
}
this._onWindowUrlChanging();
try{
this._iframe.contentWindow.location.reload();
}
catch(e){
this._onWindowUrlChanged();
}
},_normalizeWindowRootCss:function(){
var _cf=this._popupElement;
if(_cf){
$telerik.removeCssClasses(_cf,["minimizedwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_cf,"normalwindow");
var _d0=_cf._hideWindowedElementsIFrame;
if(_d0){
$telerik.removeCssClasses(_d0,["minimizedwindowoverlay_"+this._skin]);
}
}
},close:function(_d1){
if(this.isClosed()){
return;
}
this.hide();
this.raiseEvent("close",new Sys.EventArgs());
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(null!=_d1&&!(_d1 instanceof Sys.UI.DomEvent)){
this._invokeDialogCallBackFunction(_d1);
}
if(this._destroyOnClose){
this.dispose();
}
},onCommand:function(_d2){
var _d3=new Sys.CancelEventArgs();
_d3._commandName=_d2;
_d3.get_commandName=function(){
return this._commandName;
};
this.raise_command(_d3);
if(_d3.get_cancel()){
return false;
}
return true;
},setUrl:function(url){
this._createUI();
this._navigateUrl=url;
var _d5=url;
if(this._reloadOnShow){
_d5=this._getReloadOnShowUrl(_d5);
}
this._iframe.src=_d5;
this._onWindowUrlChanging();
if(!this._loaded){
this._registerIframeLoadHandler(true);
}
this._loaded=true;
},_registerChildPageHandlers:function(_d6){
var _d7=null;
try{
_d7=this._iframe.contentWindow.document;
if(_d7.domain!=document.domain){
return;
}
}
catch(e){
return;
}
if(null==_d7){
return;
}
if(_d6){
this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){
_d7.onunload=this._onChildPageUnloadDelegate;
}else{
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(_d7,"click",this._onChildPageClickDelegate);
}else{
if(this._onChildPageClickDelegate){
$telerik.removeExternalHandler(_d7,"click",this._onChildPageClickDelegate);
this._onChildPageClickDelegate=null;
}
}
},_onChildPageUnload:function(e){
this._registerChildPageHandlers(false);
},_onChildPageClick:function(e){
if(!this.isVisible()||this.isClosed()){
return;
}
var src=e.target?e.target:e.srcElement;
if(src){
if(src.tagName=="INPUT"&&src.type=="button"){
return;
}else{
if(src.tagName=="BUTTON"||src.tagName=="A"){
return;
}
}
}
this.setActive(true);
},_onIframeLoad:function(){
this._onWindowUrlChanged();
this._registerChildPageHandlers(true);
this.raiseEvent("pageLoad",new Sys.EventArgs());
},_onWindowUrlChanging:function(){
var _db=this._getStatusMessageElement();
if(_db){
Sys.UI.DomElement.addCssClass(_db,"loading");
}
if(!this._showContentDuringLoad){
this._iframe.style.width="0px";
this._iframe.style.height="0px";
}
},_onWindowUrlChanged:function(){
var _dc=this._getStatusMessageElement();
if(_dc){
Sys.UI.DomElement.removeCssClass(_dc,"loading");
this.set_status(this._navigateUrl);
}
if(!this._showContentDuringLoad){
this._iframe.style.width="100%";
this._iframe.style.height="100%";
}
try{
if(this._iframe.contentWindow.document.title){
this.set_title(this._iframe.contentWindow.document.title);
}
}
catch(e){
}
},_updatePopupZindex:function(){
if(this._popupBehavior){
if(this.isVisible()){
this._popupBehavior.show();
}
}
},get_zindex:function(){
if(this._popupElement){
return this._popupElement.style.zIndex;
}else{
return -1;
}
},get_contentFrame:function(){
return this._iframe;
},get_minimizeZoneID:function(){
return this._minimizeZoneID;
},set_minimizeZoneID:function(_dd){
if(this._minimizeZoneID!=_dd){
this._minimizeZoneID=_dd;
}
},get_restrictionZoneID:function(){
return this._restrictionZoneID;
},set_restrictionZoneID:function(_de){
if(this._restrictionZoneID!=_de){
this._restrictionZoneID=_de;
}
},get_minimizeIconUrl:function(){
return this._minimizeIconUrl;
},set_minimizeIconUrl:function(_df){
if(this._minimizeIconUrl!=_df){
this._minimizeIconUrl=_df;
}
},get_iconUrl:function(){
return this._iconUrl;
},set_iconUrl:function(_e0){
if(this._iconUrl!=_e0){
this._iconUrl=_e0;
}
},get_clientCallBackFunction:function(){
return this._clientCallBackFunction;
},set_clientCallBackFunction:function(_e1){
if(this._clientCallBackFunction!=_e1){
this._clientCallBackFunction=_e1;
}
},get_navigateUrl:function(){
return this._navigateUrl;
},set_navigateUrl:function(_e2){
if(this._navigateUrl!=_e2){
this._navigateUrl=_e2;
}
},get_targetControl:function(){
return this._openerElement;
},set_targetControl:function(_e3){
if(this._openerElement!=_e3){
this._openerElement=_e3;
}
},get_name:function(){
return this._name;
},set_name:function(_e4){
if(this._name!=_e4){
this._name=_e4;
}
},get_formID:function(){
return this._formID;
},set_formID:function(_e5){
if(this._formID!=_e5){
this._formID=_e5;
}
},get_offsetElementID:function(){
return this._offsetElementID;
},set_offsetElementID:function(_e6){
if(this._offsetElementID!=_e6){
this._offsetElementID=_e6;
}
if(this.isVisible()){
this._deleteStoredBounds();
this._offsetSet=false;
this._show();
}
},get_openerElementID:function(){
return this._openerElementID;
},set_openerElementID:function(_e7){
if(this._openerElementID!=_e7){
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}
this._openerElementID=_e7;
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(_e8){
if(this._left!=_e8){
this._left=parseInt(_e8);
}
},get_top:function(){
return this._top;
},set_top:function(_e9){
if(this._top!=_e9){
this._top=parseInt(_e9);
}
},get_title:function(){
return this._title;
},set_title:function(_ea){
if(this._title!=_ea){
this._title=_ea;
}
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){
return parseInt(this._width);
},_fixSizeValue:function(_eb){
_eb=""+_eb;
if(-1==_eb.indexOf("px")){
_eb=parseInt(_eb);
if(!isNaN(_eb)){
_eb=_eb+"px";
}else{
_eb="";
}
}
return _eb;
},set_width:function(_ec){
if(null==_ec){
return false;
}
if(this.isMaximized()){
return false;
}
_ec=this._fixSizeValue(_ec);
var _ed=this._popupElement;
if(_ed){
var _ee=$telerik.getBounds(_ed);
var _ef=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_ee.x,_ee.y,parseInt(_ec),_ee.height));
if(!_ef){
return false;
}
}
if(this._width!=_ec){
this._width=_ec;
}
if(_ed){
this._deleteStoredBounds();
_ed.style.width=this._width;
this._updatePopupZindex();
}
return true;
},get_height:function(){
return parseInt(this._height);
},set_height:function(_f0){
if(null==_f0){
return false;
}
if(this.isMaximized()){
return false;
}
_f0=this._fixSizeValue(_f0);
var _f1=this._popupElement;
if(_f1){
var _f2=$telerik.getBounds(_f1);
var _f3=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_f2.x,_f2.y,_f2.width,parseInt(_f0)));
if(!_f3){
return false;
}
}
if(this._height!=_f0){
this._height=_f0;
}
if(_f1){
this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}
return true;
},_updateWindowSize:function(_f4,_f5){
var _f6=this._tableElement;
var _f7=_f4?_f4:_f6.style.height;
if(true==_f5){
_f7=_f6.offsetHeight+"px";
}
if(parseInt(_f7)==0){
return;
}
_f6.style.height=_f7;
this._fixIeHeight(_f6,_f7);
_f6.parentNode.style.height=_f7;
},get_initialBehaviors:function(){
return this._initialBehaviors;
},set_initialBehaviors:function(_f8){
if(this._initialBehaviors!=_f8){
this._initialBehaviors=_f8;
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_f9){
if(this._behaviors!=_f9){
this._behaviors=_f9;
}
if(null==this._titlebarElement){
return;
}
this._enableMoveResize(false);
this._enableMoveResize(true);
if(this._buttonsArray&&this._buttonsArray.length>0){
var len=this._buttonsArray.length;
for(var i=0;i<len;i++){
var _fc=this._buttonsArray[i];
$clearHandlers(_fc);
}
this._buttonsArray=[];
var _fd=this._getTitleCommandButtonsHolder();
_fd.innerHTML="";
}
if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){
return;
}else{
var loc=this._getLocalization();
var _ff=Telerik.Web.UI.WindowBehaviors;
var _100=[[this.isBehaviorEnabled(_ff.Pin),"pinbutton",loc["PinOn"],this.togglePin],[this.isBehaviorEnabled(_ff.Reload),"reloadbutton",loc["Reload"],this.reload],[this.isBehaviorEnabled(_ff.Minimize),"minimizebutton",loc["Minimize"],this.minimize],[this.isBehaviorEnabled(_ff.Maximize),"maximizebutton",loc["Maximize"],this.maximize],[this.isBehaviorEnabled(_ff.Close),"closebutton",loc["Close"],this.close]];
for(var i=0;i<_100.length;i++){
var info=_100[i];
if(!info[0]){
continue;
}
var li=document.createElement("LI");
var _103=document.createElement("A");
_103.href="javascript:void(0);";
_103.className=info[1];
_103.setAttribute("title",info[2]);
var _104=document.createElement("SPAN");
_104.innerHTML=info[2];
_103.appendChild(_104);
$addHandlers(_103,{"click":info[3],"dblclick":this._cancelEvent,"mousedown":this._cancelEvent},this);
$addHandler(_103,"click",this._cancelEvent);
li.appendChild(_103);
this._buttonsElement.appendChild(li);
this._buttonsArray[this._buttonsArray.length]=_103;
}
}
},get_modal:function(){
return this._modal;
},set_modal:function(_105){
if(this._modal!=_105){
this._modal=_105;
}
this._makeModal(this._modal);
if(this.isVisible()){
this._afterShow();
}
},get_destroyOnClose:function(){
return this._destroyOnClose;
},set_destroyOnClose:function(_106){
if(this._destroyOnClose!=_106){
this._destroyOnClose=_106;
}
},get_reloadOnShow:function(){
return this._reloadOnShow;
},set_reloadOnShow:function(_107){
if(this._reloadOnShow!=_107){
this._reloadOnShow=_107;
}
},get_showContentDuringLoad:function(){
return this._showContentDuringLoad;
},set_showContentDuringLoad:function(_108){
if(this._showContentDuringLoad!=_108){
this._showContentDuringLoad=_108;
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_109){
if(this._visibleOnPageLoad!=_109){
this._visibleOnPageLoad=_109;
}
},get_visibleTitlebar:function(){
return this._visibleTitlebar;
},set_visibleTitlebar:function(_10a){
if(this._visibleTitlebar!=_10a){
this._visibleTitlebar=_10a;
}
if(this._titlebarElement){
this._titlebarElement.style.display=_10a?"":"none";
}
},get_visibleStatusbar:function(){
return this._visibleStatusbar;
},set_visibleStatusbar:function(_10b){
if(this._visibleStatusbar!=_10b){
this._visibleStatusbar=_10b;
}
if(this._statusCell){
this._statusCell.parentNode.style.display=_10b?"":"none";
}
},get_animation:function(){
return this._animation;
},set_animation:function(_10c){
if(this._animation!=_10c){
this._animation=_10c;
}
},get_overlay:function(){
return this._overlay;
},set_overlay:function(_10d){
this._overlay=_10d;
if(this._popupBehavior){
this._popupBehavior.set_overlay(this._overlay);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_keepInScreenBounds:function(){
return this._keepInScreenBounds;
},set_keepInScreenBounds:function(_10e){
this._keepInScreenBounds=_10e;
if(this._popupBehavior){
this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_skin:function(){
return this._skin;
},set_skin:function(_10f){
if(_10f&&this._skin!=_10f){
this._skin=_10f;
}
},get_popupElement:function(){
return this._popupElement;
},get_windowManager:function(){
return this._windowManager;
},set_windowManager:function(_110){
this._windowManager=_110;
},set_status:function(_111){
var _112=this._getStatusMessageElement();
if(_112){
window.setTimeout(function(){
_112.value=_111;
},0);
}
},get_status:function(){
var _113=this._getStatusMessageElement();
if(_113){
return _113.value;
}
},add_command:function(_114){
this.get_events().addHandler("command",_114);
},remove_command:function(_115){
this.get_events().removeHandler("command",_115);
},raise_command:function(args){
this.raiseEvent("command",args);
},add_dragStart:function(_117){
this.get_events().addHandler("dragStart",_117);
},remove_dragStart:function(_118){
this.get_events().removeHandler("dragStart",_118);
},add_dragEnd:function(_119){
this.get_events().addHandler("dragEnd",_119);
},remove_dragEnd:function(_11a){
this.get_events().removeHandler("dragEnd",_11a);
},add_activate:function(_11b){
this.get_events().addHandler("activate",_11b);
},remove_activate:function(_11c){
this.get_events().removeHandler("activate",_11c);
},add_beforeShow:function(_11d){
this.get_events().addHandler("beforeShow",_11d);
},remove_beforeShow:function(_11e){
this.get_events().removeHandler("beforeShow",_11e);
},add_show:function(_11f){
this.get_events().addHandler("show",_11f);
},remove_show:function(_120){
this.get_events().removeHandler("show",_120);
},add_pageLoad:function(_121){
this.get_events().addHandler("pageLoad",_121);
},remove_pageLoad:function(_122){
this.get_events().removeHandler("pageLoad",_122);
},add_close:function(_123){
this.get_events().addHandler("close",_123);
},remove_close:function(_124){
this.get_events().removeHandler("close",_124);
},add_resize:function(_125){
this.get_events().addHandler("resize",_125);
},remove_resize:function(_126){
this.get_events().removeHandler("resize",_126);
},saveClientState:function(){
var _127=["position"];
var _128={};
for(var i=0;i<_127.length;i++){
_128[_127[i]]=this["get_"+_127[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_128);
}};
Telerik.Web.UI.RadWindow.registerClass("Telerik.Web.UI.RadWindow",Telerik.Web.UI.RadWebControl);
Telerik.Web.UI.WindowAnimation=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.WindowAnimation.prototype={None:0,Resize:1,Fade:2,Slide:4,FlyIn:8};
Telerik.Web.UI.WindowAnimation.registerEnum("Telerik.Web.UI.WindowAnimation",false);
Telerik.Web.UI.WindowMinimizeMode=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.WindowMinimizeMode.prototype={SameLocation:1,MinimizeZone:2,Default:1};
Telerik.Web.UI.WindowMinimizeMode.registerEnum("Telerik.Web.UI.WindowMinimizeMode",false);
Telerik.Web.UI.WindowBehaviors=function(){
throw Error.invalidOperation();
};
Telerik.Web.UI.WindowBehaviors.prototype={None:0,Resize:1,Minimize:2,Close:4,Pin:8,Maximize:16,Move:32,Reload:64,Default:(1+2+4+8+16+32+64)};
Telerik.Web.UI.WindowBehaviors.registerEnum("Telerik.Web.UI.WindowBehaviors",false);
Telerik.Web.UI.RadWindowUtils._zIndex=3000;
Telerik.Web.UI.RadWindowUtils.get_newZindex=function(_12a){
_12a=parseInt(_12a);
if(null==_12a||isNaN(_12a)){
_12a=0;
}
if(Telerik.Web.UI.RadWindowUtils._zIndex<_12a){
Telerik.Web.UI.RadWindowUtils._zIndex=_12a;
}
Telerik.Web.UI.RadWindowUtils._zIndex++;
return Telerik.Web.UI.RadWindowUtils._zIndex;
};
Telerik.Web.UI.RadWindowUtils._pinnedList={};
Telerik.Web.UI.RadWindowUtils.setPinned=function(_12b,oWnd){
if(_12b){
var _12d=oWnd._getViewportBounds();
var _12e=oWnd._getCurrentBounds();
oWnd.LeftOffset=_12e.x-_12d.scrollLeft;
oWnd.TopOffset=_12e.y-_12d.scrollTop;
var _12f=window.setInterval(function(){
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(oWnd);
},100);
Telerik.Web.UI.RadWindowUtils._pinnedList[_12f]=oWnd;
}else{
var _130=null;
var _131=Telerik.Web.UI.RadWindowUtils._pinnedList;
for(var name in _131){
if(_131[name]==oWnd){
_130=name;
break;
}
}
if(null!=_130){
window.clearInterval(_130);
Telerik.Web.UI.RadWindowUtils._pinnedList[_130]=null;
}
oWnd.TopOffset=null;
oWnd.LeftOffset=null;
}
};
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition=function(oWnd){
if(oWnd.isMaximized()||!oWnd.isVisible()){
return;
}
var _134=oWnd._getViewportBounds();
var _135=oWnd._getCurrentBounds();
var left=(oWnd.LeftOffset!=null)?oWnd.LeftOffset+_134.scrollLeft:_135.x;
var top=(oWnd.TopOffset!=null)?oWnd.TopOffset+_134.scrollTop:_135.y;
oWnd.moveTo(left,top);
};


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();