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._autoSize=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._animation||this._animation==0){
this._afterHide();
}else{
var fnc=Function.createDelegate(this,this._afterHide);
$telerik.$(this._popupElement).stop().fadeOut(500,fnc);
}
},_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 _2d=Function.createDelegate(this,function(){
var _2e=this._getCalculatedPopupBounds();
this._setPopupVisible(_2e.x,_2e.y);
var _2f=$telerik.getBounds(this._popupElement);
var _30=this.get_offsetElementID();
if(_30){
var _31=$get(_30);
if(_31){
var _32=$telerik.getBounds(_31);
_2f.x=_32.x;
_2f.y=_32.y;
}
}
$telerik.$(this._popupElement).hide();
return _2f;
});
var _33=this._popupElement;
var _34=this._animation;
startBounds=this._openerElement?$telerik.getBounds(this._openerElement):null;
var _35=_2d();
var _36=""+this._position;
onAnimationStart=null;
var _37=Function.createDelegate(this,function(){
this._popupElement.style.filter="";
this.get_popupElement().style.opacity="";
this._show();
this._afterShow();
});
Telerik.Web.UI.Animations.playJQueryAnimation(_33,_34,startBounds,_35,_36,onAnimationStart,_37);
},_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(_3a){
var str="rwndrnd="+Math.random();
if(_3a.indexOf("?")>-1){
str="&"+str;
}else{
str="?"+str;
}
_3a+=str;
return _3a;
},_getPropertiesParameter:function(){
if(!this._propertiesParameter){
var _3c={};
for(var _3d in Telerik.Web.UI.RadWindow.prototype){
var _3e=this[_3d];
if(typeof (_3e)=="function"&&_3d.indexOf("get_")==0){
var _3f=_3d.substring(4);
if(null==this["set_"+_3f]){
continue;
}
var _40=_3e.call(this);
if(null==_40){
continue;
}
_3c[_3f]=_40;
if(_3f=="skin"){
break;
}
}
}
this._propertiesParameter=_3c;
}
var _41=this._cloneObject(this._propertiesParameter);
return _41;
},_getEventsParameter:function(){
if(!this._eventsParameter){
var _42={};
var _43=this.get_events();
var _44=this._eventNames;
for(var i=0;i<_44.length;i++){
var _46=_44[i];
var _47=_43.getHandler(_46);
if(_47&&typeof (eval(_47))=="function"){
_42[_46]=eval(_47);
}
}
this._eventsParameter=_42;
}
return this._eventsParameter;
},_cloneObject:function(_48){
var _49={};
for(var _4a in _48){
_49[_4a]=_48[_4a];
}
return _49;
},getWindowBounds:function(){
return this._getCalculatedPopupBounds();
},toString:function(){
return "[RadWindow id="+this.get_id()+"]";
},center:function(){
var _4b=this._getCentralBounds();
this.moveTo(_4b.x,_4b.y);
},moveTo:function(x,y){
var _4e=this._popupElement;
if(_4e){
var _4f=$telerik.getBounds(_4e);
var _50=this._getRestrictionZoneBounds();
if(_50){
var _51=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(x+_50.x,y+_50.y,_4f.width,_4f.height));
if(!_51){
return false;
}
}
}
x=parseInt(x);
y=parseInt(y);
this._createUI();
this._setPopupVisible(x,y);
this._storeBounds();
return true;
},setSize:function(_52,_53){
this._firstShow=false;
this.set_width(_52);
this.set_height(_53);
this._storeBounds();
},autoSize:function(){
if(this.isClosed()){
return;
}
var _54=this.get_contentFrame();
var _55=null;
try{
_55=_54.contentWindow.document.documentElement;
}
catch(ex){
return false;
}
var _56=$telerik.getBounds(_54.parentNode);
var _57=this.getWindowBounds();
_54.style.width="1px";
_54.style.height="1px";
var _58=_55.scrollHeight;
var _59=_55.scrollWidth;
var _5a=this._getRestrictionZoneBounds();
var _5b=_5a?_5a:this._getViewportBounds();
var _5c=_57.width-_56.width+_59;
var _5d=_57.height-_56.height+_58;
var _5e=Math.min(_5c,_5b.width);
var _5f=Math.min(_5d,_5b.height);
var _60=this.get_keepInScreenBounds();
if(!_5a){
this.set_keepInScreenBounds(true);
}
var _61=16;
if(_5f<_58){
_5e=Math.min(_5e+_61,_5b.width);
}
if(_5e<_59){
_5f=Math.min(_5f+_61,_5b.height);
}
var _62=this.calcPosition(_57.x,_57.width,_5e,_5b.width);
var _63=this.calcPosition(_57.y,_57.height,_5f,_5b.height);
var _64={x:_62+_5b.scrollLeft,y:_63+_5b.scrollTop,width:_5e,height:_5f};
this.setBounds(_64);
_54.style.width="100%";
_54.style.height="100%";
if($telerik.isIE){
_54.style.overflow="hidden";
setTimeout(function(){
_54.style.overflow="";
},0);
}
this.set_keepInScreenBounds(_60);
return true;
},setBounds:function(_65){
if(!_65){
return;
}
this._checkRestrictionZoneBounds=function(){
return true;
};
this.moveTo(_65.x,_65.y);
this.setSize(_65.width,_65.height);
this._checkRestrictionZoneBounds=Telerik.Web.UI.RadWindow.prototype._checkRestrictionZoneBounds;
},calcPosition:function(pos,_67,_68,_69){
var _6a=pos+Math.round((_67-_68)/2);
if(_6a<0||_6a+_67>_69){
_6a=Math.round(Math.abs((_69-_68)/2));
}
return _6a;
},_maintainMaximizedSize:function(){
if(!this.isMaximized()){
return;
}
var _6b=this._popupElement;
if(!_6b){
return;
}
var _6c=this._getViewportBounds();
_6b.style.top=(_6c.scrollTop+_6c.y)+"px";
_6b.style.left=(_6c.scrollLeft+_6c.x)+"px";
$telerik.setSize(_6b,{width:_6c.width,height:_6c.height});
var _6d=this._getRestrictionZoneBounds();
if(!_6d){
this._enablePageScrolling(false);
}
var _6e=this._tableElement;
_6c=$telerik.getContentSize(_6b);
var _6f=$telerik.getBorderBox(_6e);
var _70=$telerik.getPaddingBox(_6e);
var _71=_6c.height-_6f.vertical-_70.vertical;
_6e.style.height=_71+"px";
this._fixIeHeight(_6e,_71);
},_enablePageScrolling:function(_72){
var _73=document.body;
var doc=document.documentElement;
if(_72){
if(null!=this._documentOverflow){
doc.style.overflow=this._documentOverflow;
}
if(null!=this._bodyOverflow){
_73.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=_73.style.overflow;
}
_73.style.overflow="hidden";
doc.style.overflow="hidden";
}
},_getRestrictionZoneBounds:function(){
var _75=null;
if(this.get_restrictionZoneID()){
var _76=$get(this.get_restrictionZoneID());
if(_76){
_75=$telerik.getBounds(_76);
_75.scrollLeft=0;
_75.scrollTop=0;
}
}
return _75;
},_storeBounds:function(){
if(!this.isCreated()){
return;
}
var _77=this._getCurrentBounds();
if(this.isMaximized()){
return false;
}
if(this.isMinimized()){
if(this._restoreRect){
_77.width=this._restoreRect.width;
_77.height=this._restoreRect.height;
}else{
_77.width=this.get_width();
_77.height=this.get_height();
}
}
this._restoreRect=_77;
},_restoreBounds:function(){
if(!this._restoreRect){
return;
}
var _78=this._restoreRect;
this.setSize(_78.width,_78.height);
this.moveTo(_78.x,_78.y);
},_getStoredBounds:function(){
if(this._restoreRect){
return this._restoreRect;
}
},_deleteStoredBounds:function(){
this._restoreRect=null;
},_getCurrentBounds:function(){
var _79=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){
this._updateWindowSize(this._height);
this._firstShow=true;
}
var _7a=$telerik.getBounds(this._popupElement);
if(_79){
this._popupElement.style.display="none";
}
var _7b=this._getRestrictionZoneBounds();
if(_7b){
_7a.x-=_7b.x;
_7a.y-=_7b.y;
}
return _7a;
},_getCentralBounds:function(){
var _7c=this._getCurrentBounds();
var _7d=this._getViewportBounds();
var x=parseInt((_7d.width-_7c.width)/2);
var y=parseInt((_7d.height-_7c.height)/2);
_7c.x=x+_7d.scrollLeft;
_7c.y=y+_7d.scrollTop;
return _7c;
},_getViewportBounds:function(){
var _80=this._getRestrictionZoneBounds();
if(_80){
return _80;
}
var _81=$telerik.getClientBounds();
var _82=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body);
var _83=document.documentElement.scrollTop||document.body.scrollTop;
_81.scrollLeft=_82;
_81.scrollTop=_83;
if(this.isIE){
if(_81.width==0){
_81.width=document.body.clientWidth;
}
if(_81.height==0){
_81.height=document.body.clientHeight;
}
}
return _81;
},_getCalculatedPopupBounds:function(){
var _84=this._getStoredBounds();
if(_84){
return _84;
}
var _85=this._getCurrentBounds();
var _86=this._offsetElement;
if(!this._top&&!this._left&&!_86){
_85=this._getCentralBounds();
}else{
if(_86){
_85.y=0;
_85.x=0;
}else{
var _87=this._getViewportBounds();
_85.x=_87.scrollLeft;
_85.y=_87.scrollTop;
}
var _88=this._left?this._left:0;
_85.x+=_88;
var top=this._top?this._top:0;
_85.y+=top;
}
return _85;
},_checkRestrictionZoneBounds:function(_8a,_8b){
var _8c=_8a;
if(!_8c){
_8c=this._getRestrictionZoneBounds();
if(!_8c){
return true;
}
}
return Telerik.Web.UI.ResizeExtender.containsBounds(_8c,_8b);
},_reSetWindowPosition:function(){
var _8d=this._getCalculatedPopupBounds();
this._setPopupVisible(_8d.x,_8d.y);
},_fixIeHeight:function(_8e,_8f){
if("CSS1Compat"==document.compatMode){
var _90=(_8e.offsetHeight-parseInt(_8f));
if(_90>0){
var _91=(parseInt(_8e.style.height)-_90);
if(_91>0){
_8e.style.height=_91+"px";
}
}
}
},_setPopupVisible:function(x,y){
var _94=this._getRestrictionZoneBounds();
if(_94){
x+=_94.x;
y+=_94.y;
}
this._popupBehavior._setCoordinates(x,y);
this._popupBehavior.show();
if(!this.get_width()){
this._popupElement.style.width="";
}
this._updateTitleWidth();
},_createDefaultTable:function(){
var _95=document.createElement("TABLE");
_95.align="left";
_95.cellSpacing=0;
_95.cellPadding=0;
_95.insertRow(-1);
return _95;
},_isWindowRightToLeft:function(){
var _96=this._isRightToLeft;
if(_96==null){
var _97=this.get_element();
var _98=_97.parentNode?_97:this._getDefaultParent();
_96=this._isRightToLeft=$telerik.isRightToLeft(_98);
}
return _96;
},_createStatusbarResizer:function(_99){
var _9a=_99.rows[0].insertCell(-1);
_9a.style.width="15px";
var _9b=document.createElement("DIV");
_9a.appendChild(_9b);
this._bottomResizer=_9b;
},_createStatusbarMessageCell:function(_9c){
var _9d=_9c.rows[0].insertCell(-1);
_9d.style.width="100%";
var _9e=this._getStatusMessageElement();
_9d.appendChild(_9e);
},_createUI:function(){
if(!this._popupElement){
var _9f=this.get_id();
var _a0="RadWindowWrapper_"+_9f;
var _a1=this._isWindowRightToLeft();
var _a2=document.createElement("DIV");
_a2.id=_a0;
_a2.className=this._getFullSkinName();
if(_a1){
Sys.UI.DomElement.addCssClass(_a2,"RadWindow_rtl");
}
_a2.style.width=this._width;
_a2.style.height=this._height;
_a2.setAttribute("unselectable","on");
this._popupElement=_a2;
var _a3=document.createElement("TABLE");
_a3.cellSpacing=0;
_a3.cellPadding=0;
this._tableElement=_a3;
var _a4=[];
if(_a1){
classNames=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"];
}else{
classNames=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"];
}
var _a5=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var _a6=0;
for(var i=0;i<4;i++){
var row=_a3.insertRow(-1);
row.className=_a5[i];
for(var j=1;j<=3;j++){
var _aa=row.insertCell(-1);
_aa.innerHTML="&nbsp;";
_aa.className=classNames[_a6];
_a6++;
}
}
var _ab=_a3.rows[0].cells[1];
_ab.innerHTML="";
this._titleCell=_ab;
var _ac=document.createElement("DIV");
_ac.className="rwTopResize";
_ac.innerHTML="<!-- / -->";
this._topResizer=_ac;
this._titleCell.appendChild(this._topResizer);
var _ad=this._createDefaultTable();
_ad.className="rwTitlebarControls";
this._titlebarElement=_ad;
this._titleCell.appendChild(this._titlebarElement);
var _ae=this._getTitleIcon();
var _af=this._titlebarElement.rows[0].insertCell(-1);
_af.appendChild(_ae);
var _b0=this._getTitleElement();
var _ab=this._titlebarElement.rows[0].insertCell(-1);
_ab.appendChild(_b0);
this.set_title(this._title);
var _b1=this._titlebarElement.rows[0].insertCell(-1);
_b1.noWrap=true;
_b1.style.whiteSpace="nowrap";
_b1.appendChild(this._getTitleCommandButtonsHolder());
var _b2=_a3.rows[1].cells[1];
_b2.vAlign="top";
_b2.innerHTML="";
this._contentCell=_b2;
var _b3=this.get_name();
var _b4=($telerik.isIE)?document.createElement("<iframe name='"+_b3+"'>"):document.createElement("iframe");
_b4.name=_b3;
_b4.src="javascript:'<html></html>';";
_b4.style.width="100%";
_b4.style.height="100%";
_b4.style.border="0px";
_b4.frameBorder="0";
if($telerik.isIE8){
_b4.style.display="block";
}
this._iframe=_b4;
this._contentCell.appendChild(this._iframe);
var _b5=this._createDefaultTable();
_b5.style.width="100%";
this._statusCell=_a3.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(_b5);
if(_a1){
this._createStatusbarResizer(_b5);
this._createStatusbarMessageCell(_b5);
}else{
this._createStatusbarMessageCell(_b5);
this._createStatusbarResizer(_b5);
}
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 _b6=this._formID?document.getElementById(this._formID):null;
if(!_b6){
if(document.forms&&document.forms.length>0){
_b6=document.forms[0];
}else{
_b6=document.body;
}
}
return _b6;
},_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="rwControlButtons";
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 _b9=document.createElement("A");
this._titleIconElement=_b9;
_b9.className="rwIcon";
if(this.get_iconUrl()){
_b9.style.background="transparent url("+this.get_iconUrl()+") no-repeat scroll 0px 0px";
}
}
return this._titleIconElement;
},_getTitleCommandButton:function(_ba){
if(!_ba||!this._buttonsArray){
return null;
}
var _bb=_ba.toLowerCase();
_bb=_bb.charAt(0).toUpperCase()+_bb.substring(1);
_ba="rw"+_bb+"Button";
var _bc=this._buttonsArray.length;
for(var i=0;i<_bc;i++){
var _be=this._buttonsArray[i];
if(_be&&Sys.UI.DomElement.containsCssClass(_be,_ba)){
return _be;
}
}
return null;
},_updateTitleWidth:function(){
if(this._visibleTitlebar){
var _bf=this._getTitleElement();
if(!_bf){
return;
}
var _c0=this._getTitleCommandButtonsHolder();
var _c1=_c0.offsetWidth;
if(_c1>0){
var lis=_c0.getElementsByTagName("LI");
if(lis[0]&&lis[0].offsetWidth>0){
_c1=lis.length*lis[0].offsetWidth;
}
_c0.style.width=_c1+"px";
}
var _c3=this._getTitleIcon();
var _c4=_c3.offsetWidth;
if(_c4>0&&_c3.parentNode.tagName=="TD"){
_c3.parentNode.style.width=_c4+"px";
}
}
},_addWindowToDocument:function(){
var _c5=this._getDefaultParent();
_c5.insertBefore(this._popupElement,_c5.firstChild);
},_createBackReference:function(){
var _c6=this;
if(!_c6.Argument){
_c6.Argument={};
}
var _c7=this._iframe;
try{
_c7.radWindow=_c6;
if(_c7.contentWindow!=null){
_c7.contentWindow.radWindow=_c6;
}
}
catch(e){
}
},_getFullSkinName:function(){
return "RadWindow RadWindow_"+this._skin+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(_c8){
var loc=this._getLocalization();
var _ca=(true==_c8)?loc["Restore"]:loc["Minimize"];
var _cb=(true==_c8)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",_ca,_cb);
},_configureMaximizeButton:function(_cc){
var loc=this._getLocalization();
var _ce=(true==_cc)?loc["Restore"]:loc["Maximize"];
var _cf=(true==_cc)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",_ce,_cf);
},_registerTitlebarHandlersButton:function(_d0,_d1,_d2){
var _d3=this._getTitleCommandButton(_d0);
if(_d3){
var loc=this._getLocalization();
_d3.setAttribute("title",_d1);
_d3.innerHTML=_d1;
$clearHandlers(_d3);
$addHandlers(_d3,{"click":_d2},this);
$addHandler(_d3,"dblclick",this._cancelEvent);
$addHandler(_d3,"mousedown",this._cancelEvent);
}
},isCloned:function(){
return this._isCloned;
},isBehaviorEnabled:function(_d5){
return _d5&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(_d6){
return _d6&this._initialBehaviors?true:false;
},setVisible:function(_d7){
if(this._popupBehavior){
if(_d7){
this._popupBehavior.show();
}else{
this._popupBehavior.hide();
}
}
},isVisible:function(){
return this._popupVisible;
},isModal:function(){
return this._modal;
},isActive:function(){
return (this._popupElement&&!Sys.UI.DomElement.containsCssClass(this._popupElement,"rwInactiveWindow"));
},isPinned:function(){
var _d8=this._getTitleCommandButton("Pin");
return (_d8&&Sys.UI.DomElement.containsCssClass(_d8,"on"));
},isClosed:function(){
return (!this.isVisible());
},isMinimized:function(){
return (this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMinimizedWindow"));
},isMaximized:function(){
return (this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMaximizedWindow"));
},_moveToMinimizeZone:function(){
var _d9=$get(this.get_minimizeZoneID());
if(_d9){
if(this.isPinned()){
this._isPinned=true;
this.togglePin();
}
var _da=this._popupElement;
if(_da.parentNode!=_d9){
_da.parentNode.removeChild(_da);
_d9.appendChild(_da);
this.setVisible(true);
_da.style.position="static";
if(this.isIE){
_da.style.display="inline";
}else{
_da.style.cssFloat="left";
}
}
}
},_moveToDocument:function(){
var _db=this._popupElement;
_db.parentNode.removeChild(_db);
_db.style.position="absolute";
if(this.isIE){
_db.style.display="";
}else{
_db.style.cssFloat="";
}
this._addWindowToDocument();
if(this._isPinned){
this._isPinned=false;
this.togglePin();
}
},minimize:function(){
if(!this.isCreated()){
return;
}
var _dc=this.onCommand("Minimize");
if(!_dc){
return;
}
if(this.isMaximized()){
this._restoreBounds();
}
var _dd=this._popupElement;
$telerik.removeCssClasses(_dd,["rwNormalWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(_dd,"rwMinimizedWindow");
var _de=_dd._hideWindowedElementsIFrame;
if(_de){
Sys.UI.DomElement.addCssClass(_de,"rwMinimizedWindowOverlay_"+this._skin);
}
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
if(this.get_minimizeZoneID()){
this._moveToMinimizeZone();
}
},restore:function(){
if(!this.isCreated()||this.isClosed()){
return;
}
var _df=this.onCommand("Restore");
if(!_df){
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 _e0=this.onCommand("Maximize");
if(!_e0){
return;
}
this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _e1=this._popupElement;
$telerik.removeCssClasses(_e1,["rwNormalWindow","rwMinimizedWindow"]);
Sys.UI.DomElement.addCssClass(_e1,"rwMaximizedWindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var _e2=_e1._hideWindowedElementsIFrame;
if(_e2){
$telerik.removeCssClasses(_e2,["rwMinimizedWindowOverlay_"+this._skin]);
this._popupBehavior._handleElementResize();
}
if(!this.isActive()){
this.setActive(true);
}
if(!this._getRestrictionZoneBounds()){
var _e3=_e1.style.zIndex;
if(_e3){
this._restoreZindex=_e3;
}
_e1.style.zIndex=100000;
}
},setActive:function(_e4){
var _e5=this._popupElement;
if(!_e4){
Sys.UI.DomElement.addCssClass(_e5,"rwInactiveWindow");
}else{
if(!this.isMaximized()){
var _e6=parseInt(_e5.style.zIndex);
var _e7=Telerik.Web.UI.RadWindowUtils.get_newZindex(_e6);
_e5.style.zIndex=""+_e7;
}
this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){
return;
}
$telerik.removeCssClasses(_e5,["rwInactiveWindow"]);
}
},togglePin:function(){
if(!this.isCreated()){
return;
}
var _e8=this.onCommand("Pin");
if(!_e8){
return;
}
var _e9=this._getTitleCommandButton("Pin");
var loc=this._getLocalization();
var _eb=this.isPinned();
var _ec=_eb?loc["PinOn"]:loc["PinOff"];
if(_e9){
Sys.UI.DomElement.toggleCssClass(_e9,"on");
}
this._registerTitlebarHandlersButton("Pin",_ec,this.togglePin);
Telerik.Web.UI.RadWindowUtils.setPinned(!_eb,this);
},reload:function(){
if(!this.isCreated()){
return;
}
var _ed=this.onCommand("Reload");
if(!_ed){
return;
}
if(!this._iframe){
return;
}
this._onWindowUrlChanging();
try{
this._iframe.contentWindow.location.reload();
}
catch(e){
this._onWindowUrlChanged();
}
},_normalizeWindowRootCss:function(){
var _ee=this._popupElement;
if(_ee){
$telerik.removeCssClasses(_ee,["rwMinimizedWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(_ee,"rwNormalWindow");
var _ef=_ee._hideWindowedElementsIFrame;
if(_ef){
$telerik.removeCssClasses(_ef,["rwMinimizedWindowOverlay_"+this._skin]);
}
}
},close:function(_f0){
if(this.isClosed()){
return;
}
var _f1=new Sys.CancelEventArgs();
this.raiseEvent("beforeClose",_f1);
if(_f1.get_cancel()){
return;
}
this.hide();
var arg=new Sys.EventArgs();
arg._argument=(_f0&&!(_f0 instanceof Sys.UI.DomEvent))?_f0:null;
arg.get_argument=function(){
return this._argument;
};
this.raiseEvent("close",arg);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(_f0 instanceof Sys.UI.DomEvent){
_f0=null;
}
this._invokeDialogCallBackFunction(_f0);
if(this._destroyOnClose){
this.dispose();
}
},_invokeDialogCallBackFunction:function(_f3){
var _f4=this.get_clientCallBackFunction();
if(_f4){
if("string"==typeof (_f4)){
_f4=eval(_f4);
}
if("function"==typeof (_f4)){
_f4(this,_f3);
}
}
},onCommand:function(_f5){
var _f6=new Sys.CancelEventArgs();
_f6._commandName=_f5;
_f6.get_commandName=function(){
return this._commandName;
};
this.raise_command(_f6);
if(_f6.get_cancel()){
return false;
}
return true;
},setUrl:function(url){
this._createUI();
this._navigateUrl=url;
var _f8=url;
if(this._reloadOnShow){
_f8=this._getReloadOnShowUrl(_f8);
}
this._iframe.src=_f8;
this._onWindowUrlChanging();
if(!this._loaded){
this._registerIframeLoadHandler(true);
}
this._loaded=true;
},_registerChildPageHandlers:function(_f9){
var _fa=null;
try{
_fa=this._iframe.contentWindow.document;
if(_fa.domain!=document.domain){
return;
}
}
catch(e){
return;
}
if(null==_fa){
return;
}
if(_f9){
this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){
_fa.onunload=this._onChildPageUnloadDelegate;
}else{
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(_fa,"click",this._onChildPageClickDelegate);
}else{
if(this._onChildPageClickDelegate){
$telerik.removeExternalHandler(_fa,"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());
if(this.get_autoSize()){
this.autoSize();
}
},_onWindowUrlChanging:function(){
var _fe=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||_fe){
var _ff=this._getStatusMessageElement();
if(_ff){
Sys.UI.DomElement.addCssClass(_ff,"rwLoading");
}
}else{
var _100=this._iframe.style;
_100.position="absolute";
_100.top="-10000px";
_100.left="-10000px";
var td=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(td,"rwLoading");
}
},_onWindowUrlChanged:function(){
var _102=this._getStatusMessageElement();
var _103=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||_103){
if(_102){
Sys.UI.DomElement.removeCssClass(_102,"rwLoading");
}
}else{
this._iframe.style.position="";
var td=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(td,"rwLoading");
}
if(_102){
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(_105){
if(this._minimizeZoneID!=_105){
this._minimizeZoneID=_105;
}
},get_restrictionZoneID:function(){
return this._restrictionZoneID;
},set_restrictionZoneID:function(_106){
if(this._restrictionZoneID!=_106){
this._restrictionZoneID=_106;
}
},get_minimizeIconUrl:function(){
return this._minimizeIconUrl;
},set_minimizeIconUrl:function(_107){
if(this._minimizeIconUrl!=_107){
this._minimizeIconUrl=_107;
}
},get_iconUrl:function(){
return this._iconUrl;
},set_iconUrl:function(_108){
if(this._iconUrl!=_108){
this._iconUrl=_108;
}
},get_clientCallBackFunction:function(){
return this._clientCallBackFunction;
},set_clientCallBackFunction:function(_109){
if(this._clientCallBackFunction!=_109){
this._clientCallBackFunction=_109;
}
},get_navigateUrl:function(){
return this._navigateUrl;
},set_navigateUrl:function(_10a){
if(this._navigateUrl!=_10a){
this._navigateUrl=_10a;
}
},get_targetControl:function(){
return this._openerElement;
},set_targetControl:function(_10b){
if(this._openerElement!=_10b){
this._openerElement=_10b;
}
},get_name:function(){
return this._name;
},set_name:function(_10c){
if(this._name!=_10c){
this._name=_10c;
}
},get_formID:function(){
return this._formID;
},set_formID:function(_10d){
if(this._formID!=_10d){
this._formID=_10d;
}
},get_offsetElementID:function(){
return this._offsetElementID;
},set_offsetElementID:function(_10e){
if(this._offsetElementID!=_10e){
this._offsetElementID=_10e;
}
if(this.isVisible()){
this._deleteStoredBounds();
this._offsetSet=false;
this._show();
}
},get_openerElementID:function(){
return this._openerElementID;
},set_openerElementID:function(_10f){
if(this._openerElementID!=_10f){
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}
this._openerElementID=_10f;
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(_110){
if(this._left!=_110){
this._left=parseInt(_110);
}
},get_top:function(){
return this._top;
},set_top:function(_111){
if(this._top!=_111){
this._top=parseInt(_111);
}
},get_title:function(){
return this._title;
},set_title:function(_112){
if(this._title!=_112){
this._title=_112;
}
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){
return parseInt(this._width);
},_fixSizeValue:function(_113){
_113=""+_113;
if(-1==_113.indexOf("px")){
_113=parseInt(_113);
if(!isNaN(_113)){
_113=_113+"px";
}else{
_113="";
}
}
return _113;
},set_width:function(_114){
if(null==_114){
return false;
}
if(this.isMaximized()){
return false;
}
_114=this._fixSizeValue(_114);
var _115=this._popupElement;
if(_115){
var _116=$telerik.getBounds(_115);
var _117=parseInt(_114);
if(isNaN(_117)){
_117=_116.width;
}
var _118=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_116.x,_116.y,_117,_116.height));
if(!_118){
return false;
}
}
if(this._width!=_114){
this._width=_114;
}
if(_115){
this._deleteStoredBounds();
_115.style.width=this._width;
this._updatePopupZindex();
}
return true;
},get_height:function(){
return parseInt(this._height);
},set_height:function(_119){
if(null==_119){
return false;
}
if(this.isMaximized()){
return false;
}
_119=this._fixSizeValue(_119);
var _11a=this._popupElement;
if(_11a){
var _11b=$telerik.getBounds(_11a);
var _11c=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(_11b.x,_11b.y,_11b.width,parseInt(_119)));
if(!_11c){
return false;
}
}
if(this._height!=_119){
this._height=_119;
}
if(_11a){
this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}
return true;
},_updateWindowSize:function(_11d,_11e){
var _11f=this._tableElement;
var _120=_11d?_11d:_11f.style.height;
if(true==_11e){
_120=_11f.offsetHeight+"px";
}
if(parseInt(_120)==0){
return;
}
_11f.style.height=_120;
this._fixIeHeight(_11f,_120);
_11f.parentNode.style.height=_120;
},get_initialBehaviors:function(){
return this._initialBehaviors;
},set_initialBehaviors:function(_121){
if(this._initialBehaviors!=_121){
this._initialBehaviors=_121;
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_122){
if(this._behaviors!=_122){
this._behaviors=_122;
}
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 _125=this._buttonsArray[i];
$clearHandlers(_125);
}
this._buttonsArray=[];
var _126=this._getTitleCommandButtonsHolder();
_126.innerHTML="";
}
if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){
return;
}else{
var loc=this._getLocalization();
var _128=Telerik.Web.UI.WindowBehaviors;
var _129=[[this.isBehaviorEnabled(_128.Pin),"rwPinButton",loc["PinOn"],this.togglePin],[this.isBehaviorEnabled(_128.Reload),"rwReloadButton",loc["Reload"],this.reload],[this.isBehaviorEnabled(_128.Minimize),"rwMinimizeButton",loc["Minimize"],this.minimize],[this.isBehaviorEnabled(_128.Maximize),"rwMaximizeButton",loc["Maximize"],this.maximize],[this.isBehaviorEnabled(_128.Close),"rwCloseButton",loc["Close"],this.close]];
for(var i=0;i<_129.length;i++){
var info=_129[i];
if(!info[0]){
continue;
}
var li=document.createElement("LI");
var _12c=document.createElement("A");
_12c.href="javascript:void(0);";
_12c.className=info[1];
_12c.setAttribute("title",info[2]);
var _12d=document.createElement("SPAN");
_12d.innerHTML=info[2];
_12c.appendChild(_12d);
$addHandlers(_12c,{"click":info[3],"dblclick":this._cancelEvent,"mousedown":this._cancelEvent},this);
$addHandler(_12c,"click",this._cancelEvent);
li.appendChild(_12c);
this._buttonsElement.appendChild(li);
this._buttonsArray[this._buttonsArray.length]=_12c;
}
}
},get_modal:function(){
return this._modal;
},set_modal:function(_12e){
if(this._modal!=_12e){
this._modal=_12e;
}
this._makeModal(this._modal);
if(this.isVisible()){
this._afterShow();
}
},get_destroyOnClose:function(){
return this._destroyOnClose;
},set_destroyOnClose:function(_12f){
if(this._destroyOnClose!=_12f){
this._destroyOnClose=_12f;
}
},get_reloadOnShow:function(){
return this._reloadOnShow;
},set_reloadOnShow:function(_130){
if(this._reloadOnShow!=_130){
this._reloadOnShow=_130;
}
},get_showContentDuringLoad:function(){
return this._showContentDuringLoad;
},set_showContentDuringLoad:function(_131){
if(this._showContentDuringLoad!=_131){
this._showContentDuringLoad=_131;
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_132){
if(this._visibleOnPageLoad!=_132){
this._visibleOnPageLoad=_132;
}
},get_visibleTitlebar:function(){
return this._visibleTitlebar;
},set_visibleTitlebar:function(_133){
if(this._visibleTitlebar!=_133){
this._visibleTitlebar=_133;
}
if(this._titlebarElement){
this._titlebarElement.style.display=_133?"":"none";
}
},get_visibleStatusbar:function(){
return this._visibleStatusbar;
},set_visibleStatusbar:function(_134){
if(this._visibleStatusbar!=_134){
this._visibleStatusbar=_134;
}
if(this._statusCell){
this._statusCell.parentNode.style.display=_134?"":"none";
}
},get_animation:function(){
return this._animation;
},set_animation:function(_135){
if(this._animation!=_135){
this._animation=_135;
}
},get_overlay:function(){
return this._overlay;
},set_overlay:function(_136){
this._overlay=_136;
if(this._popupBehavior){
this._popupBehavior.set_overlay(this._overlay);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_keepInScreenBounds:function(){
return this._keepInScreenBounds;
},set_keepInScreenBounds:function(_137){
this._keepInScreenBounds=_137;
if(this._popupBehavior){
this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}
if(this.isVisible()){
this._reSetWindowPosition();
}
},get_autoSize:function(){
return this._autoSize;
},set_autoSize:function(_138){
if(this._autoSize!=_138){
this._autoSize=_138;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_139){
if(_139&&this._skin!=_139){
this._skin=_139;
}
},get_popupElement:function(){
return this._popupElement;
},get_windowManager:function(){
return this._windowManager;
},set_windowManager:function(_13a){
this._windowManager=_13a;
},set_status:function(_13b){
var _13c=this._getStatusMessageElement();
if(_13c){
window.setTimeout(function(){
_13c.value=_13b;
},0);
}
},get_status:function(){
var _13d=this._getStatusMessageElement();
if(_13d){
return _13d.value;
}
},add_command:function(_13e){
this.get_events().addHandler("command",_13e);
},remove_command:function(_13f){
this.get_events().removeHandler("command",_13f);
},raise_command:function(args){
this.raiseEvent("command",args);
},add_dragStart:function(_141){
this.get_events().addHandler("dragStart",_141);
},remove_dragStart:function(_142){
this.get_events().removeHandler("dragStart",_142);
},add_dragEnd:function(_143){
this.get_events().addHandler("dragEnd",_143);
},remove_dragEnd:function(_144){
this.get_events().removeHandler("dragEnd",_144);
},add_activate:function(_145){
this.get_events().addHandler("activate",_145);
},remove_activate:function(_146){
this.get_events().removeHandler("activate",_146);
},add_beforeShow:function(_147){
this.get_events().addHandler("beforeShow",_147);
},remove_beforeShow:function(_148){
this.get_events().removeHandler("beforeShow",_148);
},add_show:function(_149){
this.get_events().addHandler("show",_149);
},remove_show:function(_14a){
this.get_events().removeHandler("show",_14a);
},add_pageLoad:function(_14b){
this.get_events().addHandler("pageLoad",_14b);
},remove_pageLoad:function(_14c){
this.get_events().removeHandler("pageLoad",_14c);
},add_close:function(_14d){
this.get_events().addHandler("close",_14d);
},remove_close:function(_14e){
this.get_events().removeHandler("close",_14e);
},add_beforeClose:function(_14f){
this.get_events().addHandler("beforeClose",_14f);
},remove_beforeClose:function(_150){
this.get_events().removeHandler("beforeClose",_150);
},add_resize:function(_151){
this.get_events().addHandler("resize",_151);
},remove_resize:function(_152){
this.get_events().removeHandler("resize",_152);
},saveClientState:function(){
var _153=["position"];
var _154={};
for(var i=0;i<_153.length;i++){
_154[_153[i]]=this["get_"+_153[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_154);
}};
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(_156){
_156=parseInt(_156);
if(null==_156||isNaN(_156)){
_156=0;
}
if(Telerik.Web.UI.RadWindowUtils._zIndex<_156){
Telerik.Web.UI.RadWindowUtils._zIndex=_156;
}
Telerik.Web.UI.RadWindowUtils._zIndex++;
return Telerik.Web.UI.RadWindowUtils._zIndex;
};
Telerik.Web.UI.RadWindowUtils._pinnedList={};
Telerik.Web.UI.RadWindowUtils.setPinned=function(_157,oWnd){
if(_157){
var _159=oWnd._getViewportBounds();
var _15a=oWnd._getCurrentBounds();
oWnd.LeftOffset=_15a.x-_159.scrollLeft;
oWnd.TopOffset=_15a.y-_159.scrollTop;
var _15b=window.setInterval(function(){
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(oWnd);
},100);
Telerik.Web.UI.RadWindowUtils._pinnedList[_15b]=oWnd;
}else{
var _15c=null;
var _15d=Telerik.Web.UI.RadWindowUtils._pinnedList;
for(var name in _15d){
if(_15d[name]==oWnd){
_15c=name;
break;
}
}
if(null!=_15c){
window.clearInterval(_15c);
Telerik.Web.UI.RadWindowUtils._pinnedList[_15c]=null;
}
oWnd.TopOffset=null;
oWnd.LeftOffset=null;
}
};
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition=function(oWnd){
if(oWnd.isMaximized()||!oWnd.isVisible()){
return;
}
var _160=oWnd._getViewportBounds();
var _161=oWnd._getCurrentBounds();
var left=(oWnd.LeftOffset!=null)?oWnd.LeftOffset+_160.scrollLeft:_161.x;
var top=(oWnd.TopOffset!=null)?oWnd.TopOffset+_160.scrollTop:_161.y;
oWnd.moveTo(left,top);
};


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();