﻿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._browserWindow=window;
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.setActive(true);
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();
var _79=_78.parentNode?_78:this._getDefaultParent();
_77=this._isRightToLeft=$telerik.isRightToLeft(_79);
}
return _77;
},_createStatusbarResizer:function(_7a){
var _7b=_7a.rows[0].insertCell(-1);
_7b.style.width="15px";
var _7c=document.createElement("DIV");
_7b.appendChild(_7c);
this._bottomResizer=_7c;
},_createStatusbarMessageCell:function(_7d){
var _7e=_7d.rows[0].insertCell(-1);
_7e.style.width="100%";
var _7f=this._getStatusMessageElement();
_7e.appendChild(_7f);
},_createUI:function(){
if(!this._popupElement){
var _80=this.get_id();
var _81="RadWindowWrapper_"+_80;
var _82=this._isWindowRightToLeft();
var _83=document.createElement("DIV");
_83.id=_81;
_83.className=this._getFullSkinName();
if(_82){
Sys.UI.DomElement.addCssClass(_83,"radwindow_rtl");
}
_83.style.width=this._width;
_83.style.height=this._height;
_83.setAttribute("unselectable","on");
this._popupElement=_83;
var _84=document.createElement("TABLE");
_84.cellSpacing=0;
_84.cellPadding=0;
this._tableElement=_84;
var _85=[];
if(_82){
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 _86=["titlerow","contentrow","statusbarrow","footerrow"];
var _87=0;
for(var i=0;i<4;i++){
var row=_84.insertRow(-1);
row.className=_86[i];
for(var j=1;j<=3;j++){
var _8b=row.insertCell(-1);
_8b.innerHTML="&nbsp;";
_8b.className=classNames[_87];
_87++;
}
}
var _8c=_84.rows[0].cells[1];
_8c.innerHTML="";
this._titleCell=_8c;
var _8d=document.createElement("DIV");
_8d.className="topresize";
_8d.innerHTML="<!-- / -->";
this._topResizer=_8d;
this._titleCell.appendChild(this._topResizer);
var _8e=this._createDefaultTable();
_8e.className="titlebarcontrols";
this._titlebarElement=_8e;
this._titleCell.appendChild(this._titlebarElement);
var _8f=this._getTitleIcon();
var _90=this._titlebarElement.rows[0].insertCell(-1);
_90.appendChild(_8f);
var _91=this._getTitleElement();
var _8c=this._titlebarElement.rows[0].insertCell(-1);
_8c.appendChild(_91);
this.set_title(this._title);
var _92=this._titlebarElement.rows[0].insertCell(-1);
_92.noWrap=true;
_92.style.whiteSpace="nowrap";
_92.appendChild(this._getTitleCommandButtonsHolder());
var _93=_84.rows[1].cells[1];
_93.vAlign="top";
_93.innerHTML="";
this._contentCell=_93;
var _94=this.get_name();
var _95=($telerik.isIE)?document.createElement("<iframe name='"+_94+"'>"):document.createElement("iframe");
_95.name=_94;
_95.src="javascript:'<html></html>';";
_95.style.width="100%";
_95.style.height="100%";
_95.style.border="0px";
_95.frameBorder="0";
this._iframe=_95;
this._contentCell.appendChild(this._iframe);
var _96=this._createDefaultTable();
_96.style.width="100%";
this._statusCell=_84.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(_96);
if(_82){
this._createStatusbarResizer(_96);
this._createStatusbarMessageCell(_96);
}else{
this._createStatusbarMessageCell(_96);
this._createStatusbarResizer(_96);
}
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);
}
},_getDefaultParent:function(){
var _97=this._formID?document.getElementById(this._formID):null;
if(!_97){
if(document.forms&&document.forms.length>0){
_97=document.forms[0];
}else{
_97=document.body;
}
}
return _97;
},_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 _9a=document.createElement("A");
this._titleIconElement=_9a;
_9a.className="windowicon";
if(this.get_iconUrl()){
_9a.style.background="transparent url("+this.get_iconUrl()+") no-repeat scroll 0px 0px";
}
}
return this._titleIconElement;
},_getTitleCommandButton:function(_9b){
if(!_9b||!this._buttonsArray){
return null;
}
_9b=_9b.toLowerCase()+"button";
var _9c=this._buttonsArray.length;
for(var i=0;i<_9c;i++){
var _9e=this._buttonsArray[i];
if(_9e&&Sys.UI.DomElement.containsCssClass(_9e,_9b)){
return _9e;
}
}
return null;
},_updateTitleWidth:function(){
if(this._visibleTitlebar){
var _9f=this._getTitleElement();
if(!_9f){
return;
}
var _a0=this._getTitleCommandButtonsHolder();
var _a1=_a0.offsetWidth;
if(_a1>0){
var lis=_a0.getElementsByTagName("LI");
if(lis[0]&&lis[0].offsetWidth>0){
_a1=lis.length*lis[0].offsetWidth;
}
_a0.style.width=_a1+"px";
}
var _a3=this._getTitleIcon();
var _a4=_a3.offsetWidth;
if(_a4>0&&_a3.parentNode.tagName=="TD"){
_a3.parentNode.style.width=_a4+"px";
}
}
},_addWindowToDocument:function(){
var _a5=this._getDefaultParent();
_a5.insertBefore(this._popupElement,_a5.firstChild);
},_createBackReference:function(){
var _a6=this;
if(!_a6.Argument){
_a6.Argument={};
}
var _a7=this._iframe;
try{
_a7.radWindow=_a6;
if(_a7.contentWindow!=null){
_a7.contentWindow.radWindow=_a6;
}
}
catch(e){
}
},_getFullSkinName:function(){
return "radwindow radwindow_"+this._skin+" normalwindow transparentwindow";
},_configureMinimizeButton:function(_a8){
var loc=this._getLocalization();
var _aa=(true==_a8)?loc["Restore"]:loc["Minimize"];
var _ab=(true==_a8)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",_aa,_ab);
},_configureMaximizeButton:function(_ac){
var loc=this._getLocalization();
var _ae=(true==_ac)?loc["Restore"]:loc["Maximize"];
var _af=(true==_ac)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",_ae,_af);
},_registerTitlebarHandlersButton:function(_b0,_b1,_b2){
var _b3=this._getTitleCommandButton(_b0);
if(_b3){
var loc=this._getLocalization();
_b3.setAttribute("title",_b1);
_b3.innerHTML=_b1;
$clearHandlers(_b3);
$addHandlers(_b3,{"click":_b2},this);
$addHandler(_b3,"dblclick",this._cancelEvent);
$addHandler(_b3,"mousedown",this._cancelEvent);
}
},isCloned:function(){
return this._isCloned;
},isBehaviorEnabled:function(_b5){
return _b5&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(_b6){
return _b6&this._initialBehaviors?true:false;
},setVisible:function(_b7){
if(this._popupBehavior){
if(_b7){
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 _b8=this._getTitleCommandButton("Pin");
return (_b8&&Sys.UI.DomElement.containsCssClass(_b8,"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 _b9=$get(this.get_minimizeZoneID());
if(_b9){
if(this.isPinned()){
this._isPinned=true;
this.togglePin();
}
var _ba=this._popupElement;
if(_ba.parentNode!=_b9){
_ba.parentNode.removeChild(_ba);
_b9.appendChild(_ba);
this.setVisible(true);
_ba.style.position="static";
if(this.isIE){
_ba.style.display="inline";
}else{
_ba.style.cssFloat="left";
}
}
}
},_moveToDocument:function(){
var _bb=this._popupElement;
_bb.parentNode.removeChild(_bb);
_bb.style.position="absolute";
if(this.isIE){
_bb.style.display="";
}else{
_bb.style.cssFloat="";
}
this._addWindowToDocument();
if(this._isPinned){
this._isPinned=false;
this.togglePin();
}
},minimize:function(){
if(!this.isCreated()){
return;
}
var _bc=this.onCommand("Minimize");
if(!_bc){
return;
}
if(this.isMaximized()){
this._restoreBounds();
}
var _bd=this._popupElement;
$telerik.removeCssClasses(_bd,["normalwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_bd,"minimizedwindow");
var _be=_bd._hideWindowedElementsIFrame;
if(_be){
Sys.UI.DomElement.addCssClass(_be,"minimizedwindowoverlay_"+this._skin);
}
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
if(this.get_minimizeZoneID()){
this._moveToMinimizeZone();
}
},restore:function(){
if(!this.isCreated()||this.isClosed()){
return;
}
var _bf=this.onCommand("Restore");
if(!_bf){
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 _c0=this.onCommand("Maximize");
if(!_c0){
return;
}
this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _c1=this._popupElement;
$telerik.removeCssClasses(_c1,["normalwindow","minimizedwindow"]);
Sys.UI.DomElement.addCssClass(_c1,"maximizedwindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var _c2=_c1._hideWindowedElementsIFrame;
if(_c2){
$telerik.removeCssClasses(_c2,["minimizedwindowoverlay_"+this._skin]);
this._popupBehavior._handleElementResize();
}
if(!this.isActive()){
this.setActive(true);
}
if(!this._getRestrictionZoneBounds()){
var _c3=_c1.style.zIndex;
if(_c3){
this._restoreZindex=_c3;
}
_c1.style.zIndex=100000;
}
},setActive:function(_c4){
var _c5=this._popupElement;
if(!_c4){
Sys.UI.DomElement.addCssClass(_c5,"inactivewindow");
}else{
if(!this.isMaximized()){
var _c6=parseInt(_c5.style.zIndex);
var _c7=Telerik.Web.UI.RadWindowUtils.get_newZindex(_c6);
_c5.style.zIndex=""+_c7;
}
this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){
return;
}
$telerik.removeCssClasses(_c5,["inactivewindow"]);
}
},togglePin:function(){
if(!this.isCreated()){
return;
}
var _c8=this.onCommand("Pin");
if(!_c8){
return;
}
var _c9=this._getTitleCommandButton("Pin");
var loc=this._getLocalization();
var _cb=this.isPinned();
var _cc=_cb?loc["PinOn"]:loc["PinOff"];
if(_c9){
Sys.UI.DomElement.toggleCssClass(_c9,"on");
}
this._registerTitlebarHandlersButton("Pin",_cc,this.togglePin);
Telerik.Web.UI.RadWindowUtils.setPinned(!_cb,this);
},reload:function(){
if(!this.isCreated()){
return;
}
var _cd=this.onCommand("Reload");
if(!_cd){
return;
}
if(!this._iframe){
return;
}
this._onWindowUrlChanging();
try{
this._iframe.contentWindow.location.reload();
}
catch(e){
this._onWindowUrlChanged();
}
},_normalizeWindowRootCss:function(){
var _ce=this._popupElement;
if(_ce){
$telerik.removeCssClasses(_ce,["minimizedwindow","maximizedwindow"]);
Sys.UI.DomElement.addCssClass(_ce,"normalwindow");
var _cf=_ce._hideWindowedElementsIFrame;
if(_cf){
$telerik.removeCssClasses(_cf,["minimizedwindowoverlay_"+this._skin]);
}
}
},close:function(_d0){
if(this.isClosed()){
return;
}
var _d1=new Sys.CancelEventArgs();
this.raiseEvent("beforeClose",_d1);
if(_d1.get_cancel()){
return;
}
this.hide();
var arg=new Sys.EventArgs();
arg._argument=(_d0&&!(_d0 instanceof Sys.UI.DomEvent))?_d0:null;
arg.get_argument=function(){
return this._argument;
};
this.raiseEvent("close",arg);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(_d0 instanceof Sys.UI.DomEvent){
_d0=null;
}
this._invokeDialogCallBackFunction(_d0);
if(this._destroyOnClose){
this.dispose();
}
},_invokeDialogCallBackFunction:function(_d3){
var _d4=this.get_clientCallBackFunction();
if(_d4){
if("string"==typeof (_d4)){
_d4=eval(_d4);
}
if("function"==typeof (_d4)){
_d4(this,_d3);
}
}
},onCommand:function(_d5){
var _d6=new Sys.CancelEventArgs();
_d6._commandName=_d5;
_d6.get_commandName=function(){
return this._commandName;
};
this.raise_command(_d6);
if(_d6.get_cancel()){
return false;
}
return true;
},setUrl:function(url){
this._createUI();
this._navigateUrl=url;
var _d8=url;
if(this._reloadOnShow){
_d8=this._getReloadOnShowUrl(_d8);
}
this._iframe.src=_d8;
this._onWindowUrlChanging();
if(!this._loaded){
this._registerIframeLoadHandler(true);
}
this._loaded=true;
},_registerChildPageHandlers:function(_d9){
var _da=null;
try{
_da=this._iframe.contentWindow.document;
if(_da.domain!=document.domain){
return;
}
}
catch(e){
return;
}
if(null==_da){
return;
}
if(_d9){
this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){
_da.onunload=this._onChildPageUnloadDelegate;
}else{
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(_da,"click",this._onChildPageClickDelegate);
}else{
if(this._onChildPageClickDelegate){
$telerik.removeExternalHandler(_da,"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 _de=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||_de){
var _df=this._getStatusMessageElement();
if(_df){
Sys.UI.DomElement.addCssClass(_df,"loading");
}
}else{
var _e0=this._iframe.style;
_e0.position="absolute";
_e0.top="-10000px";
_e0.left="-10000px";
var td=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(td,"loading");
}
},_onWindowUrlChanged:function(){
var _e2=this._getStatusMessageElement();
var _e3=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||_e3){
if(_e2){
Sys.UI.DomElement.removeCssClass(_e2,"loading");
}
}else{
this._iframe.style.position="";
var td=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(td,"loading");
}
if(_e2){
this.set_status(this._navigateUrl);
}
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_browserWindow:function(){
return this._browserWindow;
},get_contentFrame:function(){
return this._iframe;
},get_minimizeZoneID:function(){
return this._minimizeZoneID;
},set_minimizeZoneID:function(_e5){
if(this._minimizeZoneID!=_e5){
this._minimizeZoneID=_e5;
}
},get_restrictionZoneID:function(){
return this._restrictionZoneID;
},set_restrictionZoneID:function(_e6){
if(this._restrictionZoneID!=_e6){
this._restrictionZoneID=_e6;
}
},get_minimizeIconUrl:function(){
return this._minimizeIconUrl;
},set_minimizeIconUrl:function(_e7){
if(this._minimizeIconUrl!=_e7){
this._minimizeIconUrl=_e7;
}
},get_iconUrl:function(){
return this._iconUrl;
},set_iconUrl:function(_e8){
if(this._iconUrl!=_e8){
this._iconUrl=_e8;
}
},get_clientCallBackFunction:function(){
return this._clientCallBackFunction;
},set_clientCallBackFunction:function(_e9){
if(this._clientCallBackFunction!=_e9){
this._clientCallBackFunction=_e9;
}
},get_navigateUrl:function(){
return this._navigateUrl;
},set_navigateUrl:function(_ea){
if(this._navigateUrl!=_ea){
this._navigateUrl=_ea;
}
},get_targetControl:function(){
return this._openerElement;
},set_targetControl:function(_eb){
if(this._openerElement!=_eb){
this._openerElement=_eb;
}
},get_name:function(){
return this._name;
},set_name:function(_ec){
if(this._name!=_ec){
this._name=_ec;
}
},get_formID:function(){
return this._formID;
},set_formID:function(_ed){
if(this._formID!=_ed){
this._formID=_ed;
}
},get_offsetElementID:function(){
return this._offsetElementID;
},set_offsetElementID:function(_ee){
if(this._offsetElementID!=_ee){
this._offsetElementID=_ee;
}
if(this.isVisible()){
this._deleteStoredBounds();
this._offsetSet=false;
this._show();
}
},get_openerElementID:function(){
return this._openerElementID;
},set_openerElementID:function(_ef){
if(this._openerElementID!=_ef){
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}
this._openerElementID=_ef;
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(_f0){
if(this._left!=_f0){
this._left=parseInt(_f0);
}
},get_top:function(){
return this._top;
},set_top:function(_f1){
if(this._top!=_f1){
this._top=parseInt(_f1);
}
},get_title:function(){
return this._title;
},set_title:function(_f2){
if(this._title!=_f2){
this._title=_f2;
}
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){
return parseInt(this._width);
},_fixSizeValue:function(_f3){
_f3=""+_f3;
if(-1==_f3.indexOf("px")){
_f3=parseInt(_f3);
if(!isNaN(_f3)){
_f3=_f3+"px";
}else{
_f3="";
}
}
return _f3;
},set_width:function(_f4){
if(null==_f4){
return false;
}
if(this.isMaximized()){
return false;
}
_f4=this._fixSizeValue(_f4);
var _f5=this._popupElement;
if(_f5){
var _f6=$telerik.getBounds(_f5);
var _f7=parseInt(_f4);
if(isNaN(_f7)){
_f7=_f6.width;
}
var _f8=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_f6.x,_f6.y,_f7,_f6.height));
if(!_f8){
return false;
}
}
if(this._width!=_f4){
this._width=_f4;
}
if(_f5){
this._deleteStoredBounds();
_f5.style.width=this._width;
this._updatePopupZindex();
}
return true;
},get_height:function(){
return parseInt(this._height);
},set_height:function(_f9){
if(null==_f9){
return false;
}
if(this.isMaximized()){
return false;
}
_f9=this._fixSizeValue(_f9);
var _fa=this._popupElement;
if(_fa){
var _fb=$telerik.getBounds(_fa);
var _fc=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_fb.x,_fb.y,_fb.width,parseInt(_f9)));
if(!_fc){
return false;
}
}
if(this._height!=_f9){
this._height=_f9;
}
if(_fa){
this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}
return true;
},_updateWindowSize:function(_fd,_fe){
var _ff=this._tableElement;
var _100=_fd?_fd:_ff.style.height;
if(true==_fe){
_100=_ff.offsetHeight+"px";
}
if(parseInt(_100)==0){
return;
}
_ff.style.height=_100;
this._fixIeHeight(_ff,_100);
_ff.parentNode.style.height=_100;
},get_initialBehaviors:function(){
return this._initialBehaviors;
},set_initialBehaviors:function(_101){
if(this._initialBehaviors!=_101){
this._initialBehaviors=_101;
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_102){
if(this._behaviors!=_102){
this._behaviors=_102;
}
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 _105=this._buttonsArray[i];
$clearHandlers(_105);
}
this._buttonsArray=[];
var _106=this._getTitleCommandButtonsHolder();
_106.innerHTML="";
}
if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){
return;
}else{
var loc=this._getLocalization();
var _108=Telerik.Web.UI.WindowBehaviors;
var _109=[[this.isBehaviorEnabled(_108.Pin),"pinbutton",loc["PinOn"],this.togglePin],[this.isBehaviorEnabled(_108.Reload),"reloadbutton",loc["Reload"],this.reload],[this.isBehaviorEnabled(_108.Minimize),"minimizebutton",loc["Minimize"],this.minimize],[this.isBehaviorEnabled(_108.Maximize),"maximizebutton",loc["Maximize"],this.maximize],[this.isBehaviorEnabled(_108.Close),"closebutton",loc["Close"],this.close]];
for(var i=0;i<_109.length;i++){
var info=_109[i];
if(!info[0]){
continue;
}
var li=document.createElement("LI");
var _10c=document.createElement("A");
_10c.href="javascript:void(0);";
_10c.className=info[1];
_10c.setAttribute("title",info[2]);
var _10d=document.createElement("SPAN");
_10d.innerHTML=info[2];
_10c.appendChild(_10d);
$addHandlers(_10c,{"click":info[3],"dblclick":this._cancelEvent,"mousedown":this._cancelEvent},this);
$addHandler(_10c,"click",this._cancelEvent);
li.appendChild(_10c);
this._buttonsElement.appendChild(li);
this._buttonsArray[this._buttonsArray.length]=_10c;
}
}
},get_modal:function(){
return this._modal;
},set_modal:function(_10e){
if(this._modal!=_10e){
this._modal=_10e;
}
this._makeModal(this._modal);
if(this.isVisible()){
this._afterShow();
}
},get_destroyOnClose:function(){
return this._destroyOnClose;
},set_destroyOnClose:function(_10f){
if(this._destroyOnClose!=_10f){
this._destroyOnClose=_10f;
}
},get_reloadOnShow:function(){
return this._reloadOnShow;
},set_reloadOnShow:function(_110){
if(this._reloadOnShow!=_110){
this._reloadOnShow=_110;
}
},get_showContentDuringLoad:function(){
return this._showContentDuringLoad;
},set_showContentDuringLoad:function(_111){
if(this._showContentDuringLoad!=_111){
this._showContentDuringLoad=_111;
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_112){
if(this._visibleOnPageLoad!=_112){
this._visibleOnPageLoad=_112;
}
},get_visibleTitlebar:function(){
return this._visibleTitlebar;
},set_visibleTitlebar:function(_113){
if(this._visibleTitlebar!=_113){
this._visibleTitlebar=_113;
}
if(this._titlebarElement){
this._titlebarElement.style.display=_113?"":"none";
}
},get_visibleStatusbar:function(){
return this._visibleStatusbar;
},set_visibleStatusbar:function(_114){
if(this._visibleStatusbar!=_114){
this._visibleStatusbar=_114;
}
if(this._statusCell){
this._statusCell.parentNode.style.display=_114?"":"none";
}
},get_animation:function(){
return this._animation;
},set_animation:function(_115){
if(this._animation!=_115){
this._animation=_115;
}
},get_overlay:function(){
return this._overlay;
},set_overlay:function(_116){
this._overlay=_116;
if(this._popupBehavior){
this._popupBehavior.set_overlay(this._overlay);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_keepInScreenBounds:function(){
return this._keepInScreenBounds;
},set_keepInScreenBounds:function(_117){
this._keepInScreenBounds=_117;
if(this._popupBehavior){
this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_skin:function(){
return this._skin;
},set_skin:function(_118){
if(_118&&this._skin!=_118){
this._skin=_118;
}
},get_popupElement:function(){
return this._popupElement;
},get_windowManager:function(){
return this._windowManager;
},set_windowManager:function(_119){
this._windowManager=_119;
},set_status:function(_11a){
var _11b=this._getStatusMessageElement();
if(_11b){
window.setTimeout(function(){
_11b.value=_11a;
},0);
}
},get_status:function(){
var _11c=this._getStatusMessageElement();
if(_11c){
return _11c.value;
}
},add_command:function(_11d){
this.get_events().addHandler("command",_11d);
},remove_command:function(_11e){
this.get_events().removeHandler("command",_11e);
},raise_command:function(args){
this.raiseEvent("command",args);
},add_dragStart:function(_120){
this.get_events().addHandler("dragStart",_120);
},remove_dragStart:function(_121){
this.get_events().removeHandler("dragStart",_121);
},add_dragEnd:function(_122){
this.get_events().addHandler("dragEnd",_122);
},remove_dragEnd:function(_123){
this.get_events().removeHandler("dragEnd",_123);
},add_activate:function(_124){
this.get_events().addHandler("activate",_124);
},remove_activate:function(_125){
this.get_events().removeHandler("activate",_125);
},add_beforeShow:function(_126){
this.get_events().addHandler("beforeShow",_126);
},remove_beforeShow:function(_127){
this.get_events().removeHandler("beforeShow",_127);
},add_show:function(_128){
this.get_events().addHandler("show",_128);
},remove_show:function(_129){
this.get_events().removeHandler("show",_129);
},add_pageLoad:function(_12a){
this.get_events().addHandler("pageLoad",_12a);
},remove_pageLoad:function(_12b){
this.get_events().removeHandler("pageLoad",_12b);
},add_close:function(_12c){
this.get_events().addHandler("close",_12c);
},remove_close:function(_12d){
this.get_events().removeHandler("close",_12d);
},add_beforeClose:function(_12e){
this.get_events().addHandler("beforeClose",_12e);
},remove_beforeClose:function(_12f){
this.get_events().removeHandler("beforeClose",_12f);
},add_resize:function(_130){
this.get_events().addHandler("resize",_130);
},remove_resize:function(_131){
this.get_events().removeHandler("resize",_131);
},saveClientState:function(){
var _132=["position"];
var _133={};
for(var i=0;i<_132.length;i++){
_133[_132[i]]=this["get_"+_132[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_133);
}};
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(_135){
_135=parseInt(_135);
if(null==_135||isNaN(_135)){
_135=0;
}
if(Telerik.Web.UI.RadWindowUtils._zIndex<_135){
Telerik.Web.UI.RadWindowUtils._zIndex=_135;
}
Telerik.Web.UI.RadWindowUtils._zIndex++;
return Telerik.Web.UI.RadWindowUtils._zIndex;
};
Telerik.Web.UI.RadWindowUtils._pinnedList={};
Telerik.Web.UI.RadWindowUtils.setPinned=function(_136,oWnd){
if(_136){
var _138=oWnd._getViewportBounds();
var _139=oWnd._getCurrentBounds();
oWnd.LeftOffset=_139.x-_138.scrollLeft;
oWnd.TopOffset=_139.y-_138.scrollTop;
var _13a=window.setInterval(function(){
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(oWnd);
},100);
Telerik.Web.UI.RadWindowUtils._pinnedList[_13a]=oWnd;
}else{
var _13b=null;
var _13c=Telerik.Web.UI.RadWindowUtils._pinnedList;
for(var name in _13c){
if(_13c[name]==oWnd){
_13b=name;
break;
}
}
if(null!=_13b){
window.clearInterval(_13b);
Telerik.Web.UI.RadWindowUtils._pinnedList[_13b]=null;
}
oWnd.TopOffset=null;
oWnd.LeftOffset=null;
}
};
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition=function(oWnd){
if(oWnd.isMaximized()||!oWnd.isVisible()){
return;
}
var _13f=oWnd._getViewportBounds();
var _140=oWnd._getCurrentBounds();
var left=(oWnd.LeftOffset!=null)?oWnd.LeftOffset+_13f.scrollLeft:_140.x;
var top=(oWnd.TopOffset!=null)?oWnd.TopOffset+_13f.scrollTop:_140.y;
oWnd.moveTo(left,top);
};


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();