﻿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.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={};
if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){
_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(_16){
if(!this._cachedDragZoneBounds){
return true;
}
return this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,_16);
},onResizeEnd:function(){
this._cachedDragWindowBounds=null;
var _17=this._getCurrentBounds();
this.moveTo(_17.x,_17.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(_18){
this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){
this._popupBehavior._onMove();
}
this.raiseEvent("dragEnd",new Sys.EventArgs());
var _19=this._getCurrentBounds();
this.moveTo(_19.x,_19.y);
this.setActive(true);
},onDrag:function(_1a){
if(!this._cachedDragZoneBounds){
return true;
}
var _1b=this._cachedDragWindowBounds;
var _1c=this._cachedDragZoneBounds;
_1a.width=_1b.width;
_1a.height=_1b.height;
var _1d=this._checkRestrictionZoneBounds(_1c,_1a);
if(!_1d){
if(_1a.x<=_1c.x){
_1a.x=_1c.x;
}else{
if(_1c.x+_1c.width<=_1a.x+_1b.width){
_1a.x=_1c.x+_1c.width-_1b.width;
}
}
if(_1a.y<=_1c.y){
_1a.y=_1c.y;
}else{
if(_1c.y+_1c.height<=_1a.y+_1b.height){
_1a.y=_1c.y+_1c.height-_1b.height;
}
}
_1d=true;
}
return _1d;
},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 _1e=this.get_windowManager();
if(_1e){
if(_1e.get_preserveClientState()){
_1e.saveWindowState(this);
}
if(this._destroyOnClose){
_1e.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 _1f=this._iframe;
if(_1f){
_1f.radWindow=null;
_1f.src="javascript:'<html></html>';";
_1f.name="";
_1f.removeAttribute("name");
_1f.removeAttribute("NAME");
}
if(this._contentElement){
this._contentElement.innerHTML="";
}
var _20=this._popupElement;
if(_20&&_20.parentNode){
_20.parentNode.removeChild(_20);
}
Telerik.Web.UI.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){
this._hide();
return true;
},clone:function(_21,_22){
if(!_21){
alert("Telerik.Web.UI.RadWindow.clone called without providing a name argument");
return;
}
var evs=(_22!=false)?this._getEventsParameter():null;
var _24=this._getPropertiesParameter();
var _25=document.createElement("SPAN");
_25.setAttribute("id",_21);
var wnd=$create(Telerik.Web.UI.RadWindow,_24,evs,null,_25);
wnd.set_name(_21);
wnd._isCloned=true;
return wnd;
},set_contentElement:function(_27){
this._createUI();
if(this._iframe){
this._iframe.style.display="none";
}
if(_27.parentNode&&_27.parentNode.removeChild){
_27.parentNode.removeChild(_27);
}
this._contentCell.appendChild(_27);
_27.style.display="";
this._contentElement=_27;
},get_contentElement:function(){
return this._contentElement;
},isCreated:function(){
return this._popupElement!=null;
},show:function(){
var _28=this.isCreated();
this._createUI();
if(this._navigateUrl&&(!_28||this._reloadOnShow)){
this.setUrl(this._navigateUrl);
}
if(!_28&&(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 _29=$get(this.get_offsetElementID());
if(_29){
this._offsetElement=_29;
}
}
var _2a=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(_2a!=this._popupBehavior.get_parentElement()){
this._popupBehavior.set_parentElement(_2a);
}
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._restoreBounds();
}
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 _2b=function(){
var wnd=this.controller;
var _2d=wnd._getCalculatedPopupBounds();
wnd._setPopupVisible(_2d.x,_2d.y);
var _2e=$telerik.getBounds(wnd._popupElement);
wnd._popupBehavior.hide();
this.set_endBounds(_2e);
};
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=_2b;
}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=_2b;
}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=_2b;
}
}
}
}
}
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(_31){
var str="rwndrnd="+Math.random();
if(_31.indexOf("?")>-1){
str="&"+str;
}else{
str="?"+str;
}
_31+=str;
return _31;
},_getPropertiesParameter:function(){
if(!this._propertiesParameter){
var _33={};
for(var _34 in Telerik.Web.UI.RadWindow.prototype){
var _35=this[_34];
if(typeof (_35)=="function"&&_34.indexOf("get_")==0){
var _36=_34.substring(4);
if(null==this["set_"+_36]){
continue;
}
var _37=_35.call(this);
if(null==_37){
continue;
}
_33[_36]=_37;
if(_36=="skin"){
break;
}
}
}
this._propertiesParameter=_33;
}
var _38=this._cloneObject(this._propertiesParameter);
return _38;
},_getEventsParameter:function(){
if(!this._eventsParameter){
var _39={};
var _3a=this.get_events();
var _3b=this._eventNames;
for(var i=0;i<_3b.length;i++){
var _3d=_3b[i];
var _3e=_3a.getHandler(_3d);
if(_3e&&typeof (eval(_3e))=="function"){
_39[_3d]=eval(_3e);
}
}
this._eventsParameter=_39;
}
return this._eventsParameter;
},_cloneObject:function(_3f){
var _40={};
for(var _41 in _3f){
_40[_41]=_3f[_41];
}
return _40;
},getWindowBounds:function(){
return this._getCalculatedPopupBounds();
},toString:function(){
return "[RadWindow id="+this.get_id()+"]";
},center:function(){
var _42=this._getCentralBounds();
this.moveTo(_42.x,_42.y);
},moveTo:function(x,y){
var _45=this._popupElement;
if(_45){
var _46=$telerik.getBounds(_45);
var _47=this._getRestrictionZoneBounds();
if(_47){
var _48=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(x+_47.x,y+_47.y,_46.width,_46.height));
if(!_48){
return false;
}
}
}
x=parseInt(x);
y=parseInt(y);
this._createUI();
this._setPopupVisible(x,y);
this._storeBounds();
return true;
},setSize:function(_49,_4a){
this._firstShow=false;
this.set_width(_49);
this.set_height(_4a);
this._storeBounds();
},_maintainMaximizedSize:function(){
if(!this.isMaximized()){
return;
}
var _4b=this._popupElement;
if(!_4b){
return;
}
var _4c=this._getViewportBounds();
_4b.style.top=(_4c.scrollTop+_4c.y)+"px";
_4b.style.left=(_4c.scrollLeft+_4c.x)+"px";
$telerik.setSize(_4b,{width:_4c.width,height:_4c.height});
var _4d=this._getRestrictionZoneBounds();
if(!_4d){
this._enablePageScrolling(false);
}
var _4e=this._tableElement;
_4c=$telerik.getContentSize(_4b);
var _4f=$telerik.getBorderBox(_4e);
var _50=$telerik.getPaddingBox(_4e);
var _51=_4c.height-_4f.vertical-_50.vertical;
_4e.style.height=_51+"px";
this._fixIeHeight(_4e,_51);
},_enablePageScrolling:function(_52){
var _53=document.body;
var doc=document.documentElement;
if(_52){
if(null!=this._documentOverflow){
doc.style.overflow=this._documentOverflow;
}
if(null!=this._bodyOverflow){
_53.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=_53.style.overflow;
}
_53.style.overflow="hidden";
doc.style.overflow="hidden";
}
},_getRestrictionZoneBounds:function(){
var _55=null;
if(this.get_restrictionZoneID()){
var _56=$get(this.get_restrictionZoneID());
if(_56){
_55=$telerik.getBounds(_56);
_55.scrollLeft=0;
_55.scrollTop=0;
}
}
return _55;
},_storeBounds:function(){
if(!this.isCreated()){
return;
}
var _57=this._getCurrentBounds();
if(this.isMaximized()){
return false;
}
if(this.isMinimized()){
if(this._restoreRect){
_57.width=this._restoreRect.width;
_57.height=this._restoreRect.height;
}else{
_57.width=this.get_width();
_57.height=this.get_height();
}
}
this._restoreRect=_57;
},_restoreBounds:function(){
if(!this._restoreRect){
return;
}
var _58=this._restoreRect;
this.setSize(_58.width,_58.height);
this.moveTo(_58.x,_58.y);
},_getStoredBounds:function(){
if(this._restoreRect){
return this._restoreRect;
}
},_deleteStoredBounds:function(){
this._restoreRect=null;
},_getCurrentBounds:function(){
var _59=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){
this._updateWindowSize(this._height);
this._firstShow=true;
}
var _5a=$telerik.getBounds(this._popupElement);
if(_59){
this._popupElement.style.display="none";
}
var _5b=this._getRestrictionZoneBounds();
if(_5b){
_5a.x-=_5b.x;
_5a.y-=_5b.y;
}
return _5a;
},_getCentralBounds:function(){
var _5c=this._getCurrentBounds();
var _5d=this._getViewportBounds();
var x=parseInt((_5d.width-_5c.width)/2);
var y=parseInt((_5d.height-_5c.height)/2);
_5c.x=x+_5d.scrollLeft;
_5c.y=y+_5d.scrollTop;
return _5c;
},_getViewportBounds:function(){
var _60=this._getRestrictionZoneBounds();
if(_60){
return _60;
}
var _61=$telerik.getClientBounds();
var _62=document.documentElement.scrollLeft||document.body.scrollLeft;
var _63=document.documentElement.scrollTop||document.body.scrollTop;
_61.scrollLeft=_62;
_61.scrollTop=_63;
if(this.isIE){
if(_61.width==0){
_61.width=document.body.clientWidth;
}
if(_61.height==0){
_61.height=document.body.clientHeight;
}
}
return _61;
},_getCalculatedPopupBounds:function(){
var _64=this._getStoredBounds();
if(_64){
return _64;
}
var _65=this._getCurrentBounds();
var _66=this._offsetElement;
if(!this._top&&!this._left&&!_66){
_65=this._getCentralBounds();
}else{
if(_66){
_65.y=0;
_65.x=0;
}else{
var _67=this._getViewportBounds();
_65.x=_67.scrollLeft;
_65.y=_67.scrollTop;
}
var _68=this._left?this._left:0;
_65.x+=_68;
var top=this._top?this._top:0;
_65.y+=top;
}
return _65;
},_checkRestrictionZoneBounds:function(_6a,_6b){
var _6c=_6a;
if(!_6c){
_6c=this._getRestrictionZoneBounds();
if(!_6c){
return true;
}
}
return Telerik.Web.UI.ResizeExtender.containsBounds(_6c,_6b);
},_reSetWindowPosition:function(){
var _6d=this._getCalculatedPopupBounds();
this._setPopupVisible(_6d.x,_6d.y);
},_fixIeHeight:function(_6e,_6f){
if("CSS1Compat"==document.compatMode){
var _70=(_6e.offsetHeight-parseInt(_6f));
if(_70>0){
var _71=(parseInt(_6e.style.height)-_70);
if(_71>0){
_6e.style.height=_71+"px";
}
}
}
},_setPopupVisible:function(x,y){
var _74=this._getRestrictionZoneBounds();
if(_74){
x+=_74.x;
y+=_74.y;
}
this._popupBehavior._setCoordinates(x,y);
this._popupBehavior.show();
if(!this.get_width()){
this._popupElement.style.width="";
}
this._updateTitleWidth();
},_createDefaultTable:function(){
var _75=document.createElement("TABLE");
_75.align="left";
_75.cellSpacing=0;
_75.cellPadding=0;
_75.insertRow(-1);
return _75;
},_createUI:function(){
if(!this._popupElement){
var _76=this.get_id();
var _77="RadWindowWrapper_"+_76;
var _78=document.createElement("DIV");
_78.id=_77;
_78.className=this._getFullSkinName();
_78.style.width=this._width;
_78.style.height=this._height;
_78.setAttribute("unselectable","on");
this._popupElement=_78;
var _79=document.createElement("TABLE");
_79.cellSpacing=0;
_79.cellPadding=0;
this._tableElement=_79;
var _7a=["corner topleft","titlebar","corner topright","corner bodyleft","windowcontent","corner bodyright","corner bodyleft","statusbar","corner bodyright","corner footerleft","footercenter","corner footerright"];
var _7b=["titlerow","contentrow","statusbarrow","footerrow"];
var _7c=0;
for(var i=0;i<4;i++){
var row=_79.insertRow(-1);
row.className=_7b[i];
for(var j=1;j<=3;j++){
var _80=row.insertCell(-1);
_80.innerHTML="&nbsp;";
_80.className=_7a[_7c];
_7c++;
}
}
var _81=_79.rows[0].cells[1];
_81.innerHTML="";
this._titleCell=_81;
var _82=document.createElement("DIV");
_82.className="topresize";
_82.innerHTML="<!-- / -->";
this._topResizer=_82;
this._titleCell.appendChild(this._topResizer);
var _83=this._createDefaultTable();
_83.className="titlebarcontrols";
this._titlebarElement=_83;
this._titleCell.appendChild(this._titlebarElement);
var _84=this._getTitleIcon();
var _85=this._titlebarElement.rows[0].insertCell(-1);
_85.appendChild(_84);
var _86=this._getTitleElement();
var _81=this._titlebarElement.rows[0].insertCell(-1);
_81.appendChild(_86);
this.set_title(this._title);
var _87=this._titlebarElement.rows[0].insertCell(-1);
_87.noWrap=true;
_87.style.whiteSpace="nowrap";
_87.appendChild(this._getTitleCommandButtonsHolder());
var _88=_79.rows[1].cells[1];
_88.vAlign="top";
_88.innerHTML="";
this._contentCell=_88;
var _89=this.get_name();
var _8a=($telerik.isIE)?document.createElement("<iframe name='"+_89+"'>"):document.createElement("iframe");
_8a.name=_89;
_8a.src="javascript:'<html></html>';";
_8a.style.width="100%";
_8a.style.height="100%";
_8a.style.border="0px";
_8a.frameBorder="0";
this._iframe=_8a;
this._contentCell.appendChild(this._iframe);
var _8b=this._createDefaultTable();
_8b.style.width="100%";
this._statusCell=_79.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(_8b);
var _8c=_8b.rows[0].insertCell(-1);
_8c.style.width="100%";
var _8d=this._getStatusMessageElement();
_8c.appendChild(_8d);
var _8e=_8b.rows[0].insertCell(-1);
_8e.style.width="15px";
var _8f=document.createElement("DIV");
_8e.appendChild(_8f);
this._bottomResizer=_8f;
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 _92=document.createElement("A");
this._titleIconElement=_92;
_92.className="windowicon";
if(this.get_iconUrl()){
_92.style.background="transparent url("+this.get_iconUrl()+") no-repeat scroll 0px 0px";
}
}
return this._titleIconElement;
},_getTitleCommandButton:function(_93){
if(!_93||!this._buttonsArray){
return null;
}
_93=_93.toLowerCase()+"button";
var _94=this._buttonsArray.length;
for(var i=0;i<_94;i++){
var _96=this._buttonsArray[i];
if(_96&&Sys.UI.DomElement.containsCssClass(_96,_93)){
return _96;
}
}
return null;
},_updateTitleWidth:function(){
if(this._visibleTitlebar){
var _97=this._getTitleElement();
if(!_97){
return;
}
var _98=this._getTitleCommandButtonsHolder();
var _99=_98.offsetWidth;
if(_99>0){
var lis=_98.getElementsByTagName("LI");
if(lis[0]&&lis[0].offsetWidth>0){
_99=lis.length*lis[0].offsetWidth;
}
_98.style.width=_99+"px";
}
var _9b=this._getTitleIcon();
var _9c=_9b.offsetWidth;
if(_9c>0&&_9b.parentNode.tagName=="TD"){
_9b.parentNode.style.width=_9c+"px";
}
}
},_addWindowToDocument:function(){
var _9d=document.getElementById(this._formID);
if(!_9d){
_9d=document.forms[0];
}
_9d.insertBefore(this._popupElement,_9d.firstChild);
},_invokeDialogCallBackFunction:function(_9e,_9f){
if(true!=_9f){
this.close();
}
var _a0=this.get_clientCallBackFunction();
if(_a0){
if("string"==typeof (_a0)){
_a0=eval(_a0);
}
if("function"==typeof (_a0)){
_a0(this,_9e);
}
}
},_createBackReference:function(){
var _a1=this;
if(!_a1.Argument){
_a1.Argument={};
}
var _a2=this._iframe;
try{
_a2.radWindow=_a1;
if(_a2.contentWindow!=null){
_a2.contentWindow.radWindow=_a1;
}
}
catch(e){
}
},_getFullSkinName:function(){
return "radwindow radwindow_"+this._skin+" normalwindow transparentwindow";
},_configureMinimizeButton:function(_a3){
var loc=this._getLocalization();
var _a5=(true==_a3)?loc["Restore"]:loc["Minimize"];
var _a6=(true==_a3)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",_a5,_a6);
},_configureMaximizeButton:function(_a7){
var loc=this._getLocalization();
var _a9=(true==_a7)?loc["Restore"]:loc["Maximize"];
var _aa=(true==_a7)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",_a9,_aa);
},_registerTitlebarHandlersButton:function(_ab,_ac,_ad){
var _ae=this._getTitleCommandButton(_ab);
if(_ae){
var loc=this._getLocalization();
_ae.setAttribute("title",_ac);
_ae.innerHTML=_ac;
$clearHandlers(_ae);
$addHandlers(_ae,{"click":_ad},this);
$addHandler(_ae,"dblclick",this._cancelEvent);
$addHandler(_ae,"mousedown",this._cancelEvent);
}
},isCloned:function(){
return this._isCloned;
},isBehaviorEnabled:function(_b0){
return _b0&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(_b1){
return _b1&this._initialBehaviors?true:false;
},setVisible:function(_b2){
if(this._popupBehavior){
if(_b2){
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 _b3=this._getTitleCommandButton("Pin");
return (_b3&&Sys.UI.DomElement.containsCssClass(_b3,"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 _b4=$get(this.get_minimizeZoneID());
if(_b4){
if(this.isPinned()){
this._isPinned=true;
this.togglePin();
}
var _b5=this._popupElement;
if(_b5.parentNode!=_b4){
_b5.parentNode.removeChild(_b5);
_b4.appendChild(_b5);
this.setVisible(true);
_b5.style.position="static";
if(this.isIE){
_b5.style.display="inline";
}else{
_b5.style.cssFloat="left";
}
}
}
},_moveToDocument:function(){
var _b6=this._popupElement;
_b6.parentNode.removeChild(_b6);
_b6.style.position="absolute";
if(this.isIE){
_b6.style.display="";
}else{
_b6.style.cssFloat="";
}
this._addWindowToDocument();
if(this._isPinned){
this._isPinned=false;
this.togglePin();
}
},minimize:function(){
if(!this.isCreated()){
return;
}
var _b7=this.onCommand("Minimize");
if(!_b7){
return;
}
if(this.isMaximized()){
this._restoreBounds();
}
var _b8=this._popupElement;
$telerik.removeCssClasses(_b8,["normalwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_b8,"minimizedwindow");
var _b9=_b8._hideWindowedElementsIFrame;
if(_b9){
Sys.UI.DomElement.addCssClass(_b9,"minimizedwindowoverlay_"+this._skin);
}
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
if(this.get_minimizeZoneID()){
this._moveToMinimizeZone();
}
},restore:function(){
if(!this.isCreated()){
return;
}
var _ba=this.onCommand("Restore");
if(!_ba){
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 _bb=this.onCommand("Maximize");
if(!_bb){
return;
}
if(!this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){
return;
}
this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _bc=this._popupElement;
$telerik.removeCssClasses(_bc,["normalwindow","minimizedwindow"]);
Sys.UI.DomElement.addCssClass(_bc,"maximizedwindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var _bd=_bc._hideWindowedElementsIFrame;
if(_bd){
$telerik.removeCssClasses(_bd,["minimizedwindowoverlay_"+this._skin]);
this._popupBehavior._handleElementResize();
}
if(!this.isActive()){
this.setActive(true);
}
var _be=_bc.style.zIndex;
if(_be){
this._restoreZindex=_be;
}
_bc.style.zIndex=100000;
},setActive:function(_bf){
var _c0=this._popupElement;
if(!_bf){
Sys.UI.DomElement.addCssClass(_c0,"inactivewindow");
}else{
if(!this.isMaximized()){
var _c1=parseInt(_c0.style.zIndex);
var _c2=Telerik.Web.UI.RadWindowUtils.get_newZindex(_c1);
_c0.style.zIndex=""+_c2;
}
this._getWindowController().set_activeWindow(this);
if(this.isActive()){
return;
}
$telerik.removeCssClasses(_c0,["inactivewindow"]);
this.raiseEvent("activate",new Sys.EventArgs());
}
},togglePin:function(){
if(!this.isCreated()){
return;
}
var _c3=this.onCommand("Pin");
if(!_c3){
return;
}
var _c4=this._getTitleCommandButton("Pin");
var loc=this._getLocalization();
var _c6=this.isPinned();
var _c7=_c6?loc["PinOn"]:loc["PinOff"];
if(_c4){
Sys.UI.DomElement.toggleCssClass(_c4,"on");
}
this._registerTitlebarHandlersButton("Pin",_c7,this.togglePin);
Telerik.Web.UI.RadWindowUtils.setPinned(!_c6,this);
},reload:function(){
if(!this.isCreated()){
return;
}
var _c8=this.onCommand("Reload");
if(!_c8){
return;
}
if(!this._iframe){
return;
}
this._onWindowUrlChanging();
try{
this._iframe.contentWindow.location.reload();
}
catch(e){
this._onWindowUrlChanged();
}
},_normalizeWindowRootCss:function(){
var _c9=this._popupElement;
if(_c9){
$telerik.removeCssClasses(_c9,["minimizedwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_c9,"normalwindow");
var _ca=_c9._hideWindowedElementsIFrame;
if(_ca){
$telerik.removeCssClasses(_ca,["minimizedwindowoverlay_"+this._skin]);
}
}
},close:function(_cb){
if(this.isClosed()){
return;
}
this.hide();
this.raiseEvent("close",new Sys.EventArgs());
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(null!=_cb&&!(_cb instanceof Sys.UI.DomEvent)){
this._invokeDialogCallBackFunction(_cb);
}
if(this._destroyOnClose){
this.dispose();
}
},onCommand:function(_cc){
var _cd=new Sys.CancelEventArgs();
_cd._commandName=_cc;
_cd.get_commandName=function(){
return this._commandName;
};
this.raise_command(_cd);
if(_cd.get_cancel()){
return false;
}
return true;
},setUrl:function(url){
this._createUI();
this._navigateUrl=url;
var _cf=url;
if(this._reloadOnShow){
_cf=this._getReloadOnShowUrl(_cf);
}
this._iframe.src=_cf;
this._onWindowUrlChanging();
if(!this._loaded){
this._registerIframeLoadHandler(true);
}
this._loaded=true;
},_registerChildPageHandlers:function(_d0){
var _d1=null;
try{
_d1=this._iframe.contentWindow.document;
if(_d1.domain!=document.domain){
return;
}
}
catch(e){
return;
}
if(null==_d1){
return;
}
if(_d0){
this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){
_d1.onunload=this._onChildPageUnloadDelegate;
}else{
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(_d1,"click",this._onChildPageClickDelegate);
}else{
if(this._onChildPageClickDelegate){
$telerik.removeExternalHandler(_d1,"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 _d5=this._getStatusMessageElement();
if(_d5){
Sys.UI.DomElement.addCssClass(_d5,"loading");
}
if(!this._showContentDuringLoad){
this._iframe.style.width="0px";
this._iframe.style.height="0px";
}
},_onWindowUrlChanged:function(){
var _d6=this._getStatusMessageElement();
if(_d6){
Sys.UI.DomElement.removeCssClass(_d6,"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(_d7){
if(this._minimizeZoneID!=_d7){
this._minimizeZoneID=_d7;
}
},get_restrictionZoneID:function(){
return this._restrictionZoneID;
},set_restrictionZoneID:function(_d8){
if(this._restrictionZoneID!=_d8){
this._restrictionZoneID=_d8;
}
},get_minimizeIconUrl:function(){
return this._minimizeIconUrl;
},set_minimizeIconUrl:function(_d9){
if(this._minimizeIconUrl!=_d9){
this._minimizeIconUrl=_d9;
}
},get_iconUrl:function(){
return this._iconUrl;
},set_iconUrl:function(_da){
if(this._iconUrl!=_da){
this._iconUrl=_da;
}
},get_clientCallBackFunction:function(){
return this._clientCallBackFunction;
},set_clientCallBackFunction:function(_db){
if(this._clientCallBackFunction!=_db){
this._clientCallBackFunction=_db;
}
},get_navigateUrl:function(){
return this._navigateUrl;
},set_navigateUrl:function(_dc){
if(this._navigateUrl!=_dc){
this._navigateUrl=_dc;
}
},get_targetControl:function(){
return this._openerElement;
},set_targetControl:function(_dd){
if(this._openerElement!=_dd){
this._openerElement=_dd;
}
},get_name:function(){
return this._name;
},set_name:function(_de){
if(this._name!=_de){
this._name=_de;
}
},get_formID:function(){
return this._formID;
},set_formID:function(_df){
if(this._formID!=_df){
this._formID=_df;
}
},get_offsetElementID:function(){
return this._offsetElementID;
},set_offsetElementID:function(_e0){
if(this._offsetElementID!=_e0){
this._offsetElementID=_e0;
}
if(this.isVisible()){
this._deleteStoredBounds();
this._offsetSet=false;
this._show();
}
},get_openerElementID:function(){
return this._openerElementID;
},set_openerElementID:function(_e1){
if(this._openerElementID!=_e1){
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}
this._openerElementID=_e1;
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(_e2){
if(this._left!=_e2){
this._left=parseInt(_e2);
}
},get_top:function(){
return this._top;
},set_top:function(_e3){
if(this._top!=_e3){
this._top=parseInt(_e3);
}
},get_title:function(){
return this._title;
},set_title:function(_e4){
if(this._title!=_e4){
this._title=_e4;
}
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){
return parseInt(this._width);
},_fixSizeValue:function(_e5){
_e5=""+_e5;
if(-1==_e5.indexOf("px")){
_e5=parseInt(_e5);
if(!isNaN(_e5)){
_e5=_e5+"px";
}else{
_e5="";
}
}
return _e5;
},set_width:function(_e6){
if(null==_e6){
return false;
}
if(this.isMaximized()){
return false;
}
_e6=this._fixSizeValue(_e6);
var _e7=this._popupElement;
if(_e7){
var _e8=$telerik.getBounds(_e7);
var _e9=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_e8.x,_e8.y,parseInt(_e6),_e8.height));
if(!_e9){
return false;
}
}
if(this._width!=_e6){
this._width=_e6;
}
if(_e7){
this._deleteStoredBounds();
_e7.style.width=this._width;
this._updatePopupZindex();
}
return true;
},get_height:function(){
return parseInt(this._height);
},set_height:function(_ea){
if(null==_ea){
return false;
}
if(this.isMaximized()){
return false;
}
_ea=this._fixSizeValue(_ea);
var _eb=this._popupElement;
if(_eb){
var _ec=$telerik.getBounds(_eb);
var _ed=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_ec.x,_ec.y,_ec.width,parseInt(_ea)));
if(!_ed){
return false;
}
}
if(this._height!=_ea){
this._height=_ea;
}
if(_eb){
this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}
return true;
},_updateWindowSize:function(_ee,_ef){
var _f0=this._tableElement;
var _f1=_ee?_ee:_f0.style.height;
if(true==_ef){
_f1=_f0.offsetHeight+"px";
}
if(parseInt(_f1)==0){
return;
}
_f0.style.height=_f1;
this._fixIeHeight(_f0,_f1);
_f0.parentNode.style.height=_f1;
},get_initialBehaviors:function(){
return this._initialBehaviors;
},set_initialBehaviors:function(_f2){
if(this._initialBehaviors!=_f2){
this._initialBehaviors=_f2;
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_f3){
if(this._behaviors!=_f3){
this._behaviors=_f3;
}
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 _f6=this._buttonsArray[i];
$clearHandlers(_f6);
}
this._buttonsArray=[];
var _f7=this._getTitleCommandButtonsHolder();
_f7.innerHTML="";
}
if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){
return;
}else{
var loc=this._getLocalization();
var _f9=Telerik.Web.UI.WindowBehaviors;
var _fa=[[this.isBehaviorEnabled(_f9.Pin),"pinbutton",loc["PinOn"],this.togglePin],[this.isBehaviorEnabled(_f9.Reload),"reloadbutton",loc["Reload"],this.reload],[this.isBehaviorEnabled(_f9.Minimize),"minimizebutton",loc["Minimize"],this.minimize],[this.isBehaviorEnabled(_f9.Maximize),"maximizebutton",loc["Maximize"],this.maximize],[this.isBehaviorEnabled(_f9.Close),"closebutton",loc["Close"],this.close]];
for(var i=0;i<_fa.length;i++){
var _fb=_fa[i];
if(!_fb[0]){
continue;
}
var li=document.createElement("LI");
var _fd=document.createElement("A");
_fd.href="javascript:void(0);";
_fd.className=_fb[1];
_fd.setAttribute("title",_fb[2]);
var _fe=document.createElement("SPAN");
_fe.innerHTML=_fb[2];
_fd.appendChild(_fe);
$addHandlers(_fd,{"click":_fb[3],"dblclick":this._cancelEvent,"mousedown":this._cancelEvent},this);
$addHandler(_fd,"click",this._cancelEvent);
li.appendChild(_fd);
this._buttonsElement.appendChild(li);
this._buttonsArray[this._buttonsArray.length]=_fd;
}
}
},get_modal:function(){
return this._modal;
},set_modal:function(_ff){
if(this._modal!=_ff){
this._modal=_ff;
}
this._makeModal(this._modal);
if(this.isVisible()){
this._afterShow();
}
},get_destroyOnClose:function(){
return this._destroyOnClose;
},set_destroyOnClose:function(_100){
if(this._destroyOnClose!=_100){
this._destroyOnClose=_100;
}
},get_reloadOnShow:function(){
return this._reloadOnShow;
},set_reloadOnShow:function(_101){
if(this._reloadOnShow!=_101){
this._reloadOnShow=_101;
}
},get_showContentDuringLoad:function(){
return this._showContentDuringLoad;
},set_showContentDuringLoad:function(_102){
if(this._showContentDuringLoad!=_102){
this._showContentDuringLoad=_102;
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_103){
if(this._visibleOnPageLoad!=_103){
this._visibleOnPageLoad=_103;
}
},get_visibleTitlebar:function(){
return this._visibleTitlebar;
},set_visibleTitlebar:function(_104){
if(this._visibleTitlebar!=_104){
this._visibleTitlebar=_104;
}
if(this._titlebarElement){
this._titlebarElement.style.display=_104?"":"none";
}
},get_visibleStatusbar:function(){
return this._visibleStatusbar;
},set_visibleStatusbar:function(_105){
if(this._visibleStatusbar!=_105){
this._visibleStatusbar=_105;
}
if(this._statusCell){
this._statusCell.parentNode.style.display=_105?"":"none";
}
},get_animation:function(){
return this._animation;
},set_animation:function(_106){
if(this._animation!=_106){
this._animation=_106;
}
},get_overlay:function(){
return this._overlay;
},set_overlay:function(_107){
this._overlay=_107;
if(this._popupBehavior){
this._popupBehavior.set_overlay(this._overlay);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_keepInScreenBounds:function(){
return this._keepInScreenBounds;
},set_keepInScreenBounds:function(_108){
this._keepInScreenBounds=_108;
if(this._popupBehavior){
this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_skin:function(){
return this._skin;
},set_skin:function(_109){
if(_109&&this._skin!=_109){
this._skin=_109;
}
},get_popupElement:function(){
return this._popupElement;
},get_windowManager:function(){
return this._windowManager;
},set_windowManager:function(_10a){
this._windowManager=_10a;
},set_status:function(_10b){
var _10c=this._getStatusMessageElement();
if(_10c){
window.setTimeout(function(){
_10c.value=_10b;
},0);
}
},get_status:function(){
var _10d=this._getStatusMessageElement();
if(_10d){
return _10d.value;
}
},add_command:function(_10e){
this.get_events().addHandler("command",_10e);
},remove_command:function(_10f){
this.get_events().removeHandler("command",_10f);
},raise_command:function(args){
this.raiseEvent("command",args);
},add_dragStart:function(_111){
this.get_events().addHandler("dragStart",_111);
},remove_dragStart:function(_112){
this.get_events().removeHandler("dragStart",_112);
},add_dragEnd:function(_113){
this.get_events().addHandler("dragEnd",_113);
},remove_dragEnd:function(_114){
this.get_events().removeHandler("dragEnd",_114);
},add_activate:function(_115){
this.get_events().addHandler("activate",_115);
},remove_activate:function(_116){
this.get_events().removeHandler("activate",_116);
},add_beforeShow:function(_117){
this.get_events().addHandler("beforeShow",_117);
},remove_beforeShow:function(_118){
this.get_events().removeHandler("beforeShow",_118);
},add_show:function(_119){
this.get_events().addHandler("show",_119);
},remove_show:function(_11a){
this.get_events().removeHandler("show",_11a);
},add_pageLoad:function(_11b){
this.get_events().addHandler("pageLoad",_11b);
},remove_pageLoad:function(_11c){
this.get_events().removeHandler("pageLoad",_11c);
},add_close:function(_11d){
this.get_events().addHandler("close",_11d);
},remove_close:function(_11e){
this.get_events().removeHandler("close",_11e);
},add_resize:function(_11f){
this.get_events().addHandler("resize",_11f);
},remove_resize:function(_120){
this.get_events().removeHandler("resize",_120);
},saveClientState:function(){
var _121=["position"];
var _122={};
for(var i=0;i<_121.length;i++){
_122[_121[i]]=this["get_"+_121[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_122);
}};
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(_124){
_124=parseInt(_124);
if(null==_124||isNaN(_124)){
_124=0;
}
if(Telerik.Web.UI.RadWindowUtils._zIndex<_124){
Telerik.Web.UI.RadWindowUtils._zIndex=_124;
}
Telerik.Web.UI.RadWindowUtils._zIndex++;
return Telerik.Web.UI.RadWindowUtils._zIndex;
};
Telerik.Web.UI.RadWindowUtils._pinnedList={};
Telerik.Web.UI.RadWindowUtils.setPinned=function(_125,oWnd){
if(_125){
var _127=oWnd._getViewportBounds();
var _128=oWnd._getCurrentBounds();
oWnd.LeftOffset=_128.x-_127.scrollLeft;
oWnd.TopOffset=_128.y-_127.scrollTop;
var _129=window.setInterval(function(){
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(oWnd);
},100);
Telerik.Web.UI.RadWindowUtils._pinnedList[_129]=oWnd;
}else{
var _12a=null;
var _12b=Telerik.Web.UI.RadWindowUtils._pinnedList;
for(var name in _12b){
if(_12b[name]==oWnd){
_12a=name;
break;
}
}
if(null!=_12a){
window.clearInterval(_12a);
Telerik.Web.UI.RadWindowUtils._pinnedList[_12a]=null;
}
oWnd.TopOffset=null;
oWnd.LeftOffset=null;
}
};
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition=function(oWnd){
if(oWnd.isMaximized()||!oWnd.isVisible()){
return;
}
var _12e=oWnd._getViewportBounds();
var _12f=oWnd._getCurrentBounds();
var left=(oWnd.LeftOffset!=null)?oWnd.LeftOffset+_12e.scrollLeft:_12f.x;
var top=(oWnd.TopOffset!=null)?oWnd.TopOffset+_12e.scrollTop:_12f.y;
oWnd.moveTo(left,top);
};


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();