﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadWindowControllerClass=function(){
this._activeWindow=null;
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.hideCurrentWindowUnconditionally();
}
});
$addHandler(document.body,"keydown",_1);
Sys.Application.add_unload(function(){
$removeHandler(document.body,"keydown",_1);
});
},hideCurrentWindowUnconditionally:function(){
if(this._activeWindow!=null){
this._activeWindow.hide();
}
this._activeWindow=null;
},inactivateCurrentWindow:function(){
if(this._activeWindow!=null){
this._activeWindow.setActive(false);
}
this._activeWindow=null;
},notifyWindowClosed:function(_3){
if(this._activeWindow==_3){
this._activeWindow=null;
}
},set_activeWindow:function(_4){
if(_4!=this._activeWindow){
this.inactivateCurrentWindow();
}
this._activeWindow=_4;
if(!this._activeWindow.isActive()){
this._activeWindow.setActive(true);
}
},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.Window");
Telerik.Web.UI.RadWindow=function(_5){
Telerik.Web.UI.RadWindow.initializeBase(this,[_5]);
this._eventNames=["resize","activate","dragStart","dragEnd","show","pageLoad","close","command"];
this._bodyElement=(Telerik.Web.Browser.renderMode==Telerik.Web.Browser.StandardsMode)?document.documentElement:document.body;
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.Web.Browser.agent==Telerik.Web.Browser.InternetExplorer);
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._clientCallBackFunction=null;
this._reloadOnShow=false;
this._visibleOnPageLoad=false;
this._destroyOnClose=false;
this._visibleTitlebar=true;
this._visibleStatusbar=true;
this._showContentDuringLoad=true;
this._modal=false;
this._iconUrl=null;
this._minimizeIconUrl=null;
this._minimizeZoneID=null;
this._animation=Telerik.Web.UI.WindowAnimation.None;
this._windowAnimation=null;
this._onMouseDownDelegate=null;
this._onClickDelegate=null;
this._onTitlebarDblclickDelegate=null;
this._onTitlebarClickDelegate=null;
this._onWindowResizeDelegate=null;
this._onIframeLoadDelegate=null;
this._onChildPageUnloadDelegate=null;
this._onChildPageClickDelegate=null;
this._onModalShowHandler=null;
this._onModalCloseHandler=null;
this._loaded=false;
this._isCloned=false;
this._restoreRect=null;
this._popupBehavior=null;
this._popupVisible=false;
this._windowManager;
this.GetWindowManager=this.get_windowManager;
this.BrowserWindow=window;
this.GetContentFrame=this.get_contentFrame;
this.GetLeftPosition=function(){
this.getWindowBounds().x;
};
this.GetTopPosition=function(){
this.getWindowBounds().y;
};
this.GetTitlebar=function(){
return this._titleCell;
};
this.GetStatusbar=function(){
return this._statusCell;
};
this.SetOpenerElementId=this.set_openerElementID;
this.SetStatus=this.set_status;
this.GetStatus=this.get_status;
this.SetModal=this.set_modal;
this.SetWidth=this.set_width;
this.SetHeight=this.set_height;
this.GetWidth=this.get_width;
this.GetHeight=this.get_height;
this.SetOffsetElementId=this.set_offsetElementID;
this.SetTitle=this.set_title;
this.MoveTo=this.moveTo;
this.Center=this.center;
this.SetVisible=this.setVisible;
this.SetSize=this.setSize;
this.Show=this.show;
this.Hide=this.hide;
this.GetUrl=this.get_navigateUrl;
this.SetUrl=this.setUrl;
this.Reload=this.reload;
this.SetActive=this.setActive;
this.Minimize=this.minimize;
this.Restore=this.restore;
this.Maximize=this.maximize;
this.Close=this.close;
this.TogglePin=this.togglePin;
this.IsMaximized=this.isMaximized;
this.IsMinimized=this.isMinimized;
this.IsModal=this.isModal;
this.IsClosed=this.isClosed;
this.IsPinned=this.isPinned;
this.IsVisible=this.isVisible;
this.IsActive=this.isActive;
this.IsBehaviorEnabled=this.isBehaviorEnabled;
};
Telerik.Web.UI.RadWindow.prototype={_getLocalization:function(){
return {"Close":"Close","Minimize":"Minimize","Maximize":"Maximize","Reload":"Reload","PinOn":"Pin on","PinOff":"Pin off","Restore":"Restore"};
},_registerIframeLoadHandler:function(_6){
if(!this._iframe){
return;
}
if(_6){
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;
}
}
},_registerWindowResizeHandler:function(_7){
if(_7){
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(_8,_9){
if(!_8){
return;
}
if(true==_9){
this._onClickDelegate=Function.createDelegate(this,this._onClick);
$addHandler(_8,"click",this._onClickDelegate);
}else{
var _a=$removeHandler(_8,"click",this._onClickDelegate);
this._onClickDelegate=null;
}
},_registerTitlebarHandlers:function(_b){
var _c=this._titleCell;
if(_b){
this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){
if(this.isMinimized()||this.isMaximized()){
this.restore();
}else{
this.maximize();
}
});
this._onTitlebarClickDelegate=Function.createDelegate(this,function(){
this._getWindowController().set_activeWindow(this);
});
$addHandler(_c,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(_c,"click",this._onTitlebarClickDelegate);
}else{
if(this._titleCell){
if(this._onTitlebarDblclickDelegate){
$removeHandler(_c,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}
if(this._onTitlebarClickDelegate){
$removeHandler(_c,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}
}
}
},_makeModal:function(_d){
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(!_d){
return;
}
this._onModalShowHandler=function(_e){
if(!_e._modalExtender){
_e._modalExtender=new Telerik.Web.UI.ModalExtender(_e._popupElement);
}
_e._modalExtender.show();
_e.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(_f){
if(_f._modalExtender){
_f._modalExtender.hide();
}
};
this.add_close(this._onModalCloseHandler);
},_makeResizeable:function(_10){
if(this._resizeExtender){
this._resizeExtender.dispose();
this._resizeExtender=null;
}
if(!_10){
return;
}
if(!this._popupElement){
return;
}
if(!this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){
return;
}
var _11=this._tableElement.rows;
var _12={nw:_11[0].cells[0],n:this._topResizer,ne:_11[0].cells[2],w:[_11[1].cells[0],_11[2].cells[0]],e:[_11[1].cells[2],_11[2].cells[2]],sw:_11[3].cells[0],s:_11[3].cells[1],se:[_11[3].cells[2],this._bottomResizer]};
this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._popupElement,_12,this._tableElement);
},onResizeEnd:function(){
var _13=this._getCurrentBounds();
this.moveTo(_13.x,_13.y);
this.raiseEvent("resize",new Sys.EventArgs());
},_setIframesVisible:function(_14){
var _15=document.getElementsByTagName("IFRAME");
for(var i=0;i<_15.length;i++){
_15[i].style.visibility=_14?"":"hidden";
}
},_makeMoveable:function(_17){
var _18=this._titleCell;
if(_17&&this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Move)){
this._onMouseDownDelegate=Function.createDelegate(this,this._mouseDownHandler);
$addHandler(_18,"mousedown",this._onMouseDownDelegate);
}else{
if(_18&&this._onMouseDownDelegate){
$removeHandler(_18,"mousedown",this._onMouseDownDelegate);
this._onMouseDownDelegate=null;
}
}
},_mouseDownHandler:function(e){
window._event=e;
var _1a=(0>Array.indexOf(["input","button","select","textarea","label","a"],e.target.tagName.toLowerCase()));
if(_1a){
this._cancelEvent(e);
var _1b=this._popupElement;
_1b.removeAttribute("unselectable");
this._startDragDrop(_1b);
}
},_startDragDrop:function(_1c){
if(this.isPinned()){
return;
}
var _1d=$telerikCommon.getLocationWithScrollOffset(_1c);
Telerik.Web.DomElement.setLocation(_1c,_1d);
Telerik.Web.DragDropManager.startDragDrop(this,_1c,null);
},get_dragDataType:function(){
return Telerik.Web.UI.Window.DragDataType;
},getDragData:function(_1e){
return this;
},get_dragMode:function(){
return Telerik.Web.DragMode.Move;
},onDragStart:function(){
this._setIframesVisible(false);
this.raiseEvent("dragStart",new Sys.EventArgs());
},onDrag:function(e){
},onDragEnd:function(_20){
this._setIframesVisible(true);
this.raiseEvent("dragEnd",new Sys.EventArgs());
this._storeBounds();
this.setActive(true);
},initialize:function(){
Telerik.Web.UI.RadWindow.callBaseMethod(this,"initialize");
if(this._visibleOnPageLoad){
this.show();
}
this._registerWindowResizeHandler(true);
},dispose:function(){
var _21=this.get_windowManager();
if(_21&&_21.get_preserveClientState()){
_21.saveWindowState(this);
}
if(this._windowAnimation){
this._windowAnimation.dispose();
}
if(this._popupBehavior){
this._popupBehavior.dispose();
this._popupBehavior=null;
}
this._makeMoveable(false);
this._makeResizeable(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);
if(this._iframe){
this._iframe.src="javascript:'<html></html>';";
}
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;
}
}
this._popupBehavior.set_parentElement(this._bodyElement);
if(this._offsetElement&&!this._offsetSet){
this._popupBehavior.set_parentElement(this._offsetElement);
this._offsetSet=true;
}
this.set_visibleTitlebar(this._visibleTitlebar);
this.set_visibleStatusbar(this._visibleStatusbar);
var _2b=this._getCalculatedPopupBounds();
this._setPopupVisible(_2b.x,_2b.y);
this._popupBehavior.set_parentElement(this._bodyElement);
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;
}
this._popupBehavior.hide(true);
this._popupVisible=false;
this._getWindowController().notifyWindowClosed(this);
this.raiseEvent("close");
},_afterShow:function(){
this.setActive(true);
this._getWindowController().set_activeWindow(this);
this._storeBounds();
this.raiseEvent("show");
},_playAnimation:function(){
var _2c=function(){
var wnd=this.controller;
var _2e=wnd._getCalculatedPopupBounds();
wnd._setPopupVisible(_2e.x,_2e.y);
var _2f=Telerik.Web.DomElement.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((typeof (_38)!="boolean")&&(null==_38||""==_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._getEvent(_3e);
if(_3f&&typeof (eval(_3f)=="function")){
_3a[_3e]=eval(_3f[0]);
}
}
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 for Prometheus id="+this.get_id()+"]";
},center:function(){
var _43=this._getCentralBounds();
this.moveTo(_43.x,_43.y);
},moveTo:function(x,y){
x=parseInt(x);
y=parseInt(y);
this._setPopupVisible(x,y);
this._storeBounds();
},setSize:function(_46,_47){
this.set_width(_46);
this.set_height(_47);
this._storeBounds();
},_maintainMaximizedSize:function(){
if(!this.isMaximized()){
return;
}
var _48=this._popupElement;
if(!_48){
return;
}
var _49=this._getViewportBounds();
_48.style.top=_49.scrollTop+"px";
_48.style.left=_49.scrollLeft+"px";
this._enablePageScrolling(false);
var _4a=this._tableElement;
_49=this._getViewportBounds();
_4a.style.height=_49.height+"px";
this._fixIeHeight(_4a,_49.height);
},_enablePageScrolling:function(_4b,_4c){
if(_4b){
document.body.style.overflow=_4c?_4c:"";
document.documentElement.style.overflow=_4c?_4c:"";
}else{
document.body.style.overflow="hidden";
document.documentElement.style.overflow="hidden";
}
},_storeBounds:function(){
if(!this.isCreated()){
return;
}
var _4d=this._getCurrentBounds();
if(this.isMaximized()){
return false;
}
if(this.isMinimized()){
if(this._restoreRect){
_4d.width=this._restoreRect.width;
_4d.height=this._restoreRect.height;
}else{
_4d.width=this.get_width();
_4d.height=this.get_height();
}
}
this._restoreRect=_4d;
},_restoreBounds:function(){
if(!this._restoreRect){
return;
}
var _4e=this._restoreRect;
this.setSize(_4e.width,_4e.height);
this.moveTo(_4e.x,_4e.y);
},_getStoredBounds:function(){
if(this._restoreRect){
return this._restoreRect;
}
},_getCurrentBounds:function(){
var _4f=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
var _50=Telerik.Web.DomElement.getBounds(this._popupElement);
if(_4f){
this._popupElement.style.display="none";
}
return _50;
},_getCentralBounds:function(){
var _51=this._getCurrentBounds();
var _52=this._getViewportBounds();
var x=parseInt((_52.width-_51.width)/2);
var y=parseInt((_52.height-_51.height)/2);
_51.x=x+_52.scrollLeft;
_51.y=y+_52.scrollTop;
return _51;
},_getViewportBounds:function(){
var _55=TelerikCommonScripts.getClientBounds();
var _56=document.documentElement.scrollLeft||document.body.scrollLeft;
var _57=document.documentElement.scrollTop||document.body.scrollTop;
_55.scrollLeft=_56;
_55.scrollTop=_57;
return _55;
},_getCalculatedPopupBounds:function(){
var _58=this._getStoredBounds();
if(_58){
return _58;
}
var _59=this._getCurrentBounds();
var _5a=this._offsetElement;
if(!this._top&&!this._left&&!_5a){
_59=this._getCentralBounds();
}else{
if(_5a){
_59.y=0;
_59.x=0;
}else{
var _5b=this._getViewportBounds();
_59.x=_5b.scrollLeft;
_59.y=_5b.scrollTop;
}
var _5c=this._left?this._left:0;
_59.x+=_5c;
var top=this._top?this._top:0;
_59.y+=top;
}
return _59;
},_fixIeHeight:function(_5e,_5f){
if("CSS1Compat"==document.compatMode){
var _60=(_5e.offsetHeight-parseInt(_5f));
if(_60>0){
var _61=(parseInt(_5e.style.height)-_60);
if(_61>0){
_5e.style.height=_61+"px";
}
}
}
},_createUI:function(){
if(!this._popupElement){
var _62=this.get_id();
var _63="RadWindowWrapper_"+_62;
var _64=document.createElement("DIV");
_64.id=_63;
_64.className=this._getFullSkinName();
_64.style.width=this._width;
_64.style.height=this._height;
_64.setAttribute("unselectable","on");
this._popupElement=_64;
var _65=document.createElement("TABLE");
_65.cellSpacing=0;
_65.cellPadding=0;
this._tableElement=_65;
var _66=["corner topleft","titlebar","corner topright","corner bodyleft","windowcontent","corner bodyright","corner bodyleft","statusbar","corner bodyright","corner footerleft","footercenter","corner footerright"];
var _67=["titlerow","contentrow","statusbarrow","footerrow"];
var _68=0;
for(var i=0;i<4;i++){
var row=_65.insertRow(-1);
row.className=_67[i];
for(var j=1;j<=3;j++){
var _6c=row.insertCell(-1);
_6c.innerHTML="&nbsp;";
_6c.className=_66[_68];
_68++;
}
}
var _6d=_65.rows[0].cells[1];
_6d.innerHTML="";
this._titleCell=_6d;
var _6e=document.createElement("DIV");
_6e.className="topresize";
_6e.innerHTML="<!-- / -->";
this._topResizer=_6e;
this._titleCell.appendChild(this._topResizer);
var _6f=document.createElement("TABLE");
_6f.align="left";
_6f.cellSpacing=0;
_6f.cellPadding=0;
_6f.insertRow(-1);
var _70=_6f.cloneNode(true);
_6f.className="titlebarcontrols";
this._titlebarElement=_6f;
this._titleCell.appendChild(this._titlebarElement);
var _71=this._getTitleIcon();
var _72=this._titlebarElement.rows[0].insertCell(-1);
_72.appendChild(_71);
var _73=this._getTitleElement();
var _6d=this._titlebarElement.rows[0].insertCell(-1);
_6d.appendChild(_73);
this.set_title(this._title);
var _74=this._titlebarElement.rows[0].insertCell(-1);
_74.noWrap=true;
_74.style.whiteSpace="nowrap";
_74.appendChild(this._getTitleCommandButtonsHolder());
var _75=_65.rows[1].cells[1];
_75.vAlign="top";
_75.innerHTML="";
this._contentCell=_75;
var _76=this.get_name();
var _77=(Telerik.Web.Browser.agent==Telerik.Web.Browser.InternetExplorer)?document.createElement("<iframe name='"+_76+"'>"):document.createElement("iframe");
_77.name=_76;
_77.src="javascript:'<html></html>';";
_77.style.width="100%";
_77.style.height="100%";
_77.style.border="0px";
_77.frameBorder="0";
this._iframe=_77;
this._contentCell.appendChild(this._iframe);
_70.style.width="100%";
this._statusCell=_65.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(_70);
var _78=_70.rows[0].insertCell(-1);
_78.style.width="100%";
var _79=this._getStatusMessageElement();
_78.appendChild(_79);
var _7a=_70.rows[0].insertCell(-1);
_7a.style.width="15px";
var _7b=document.createElement("DIV");
_7a.appendChild(_7b);
this._bottomResizer=_7b;
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);
}
if(!this._popupBehavior){
this._popupBehavior=$create(Telerik.Web.PopupBehavior,{"id":(new Date()-100)+"PopupBehavior","parentElement":null},null,null,this._popupElement);
}
},_getStatusMessageElement:function(){
if(null==this._statusMessageElement){
var el=document.createElement("INPUT");
el.readOnly="readonly";
el.setAttribute("unselectable","on");
this._statusMessageElement=el;
}
return this._statusMessageElement;
},_getTitleCommandButtonsHolder:function(){
if(null==this._buttonsElement){
var ul=document.createElement("UL");
ul.className="controlbuttons";
this._buttonsElement=ul;
}
return this._buttonsElement;
},_getTitleElement:function(){
if(!this._titleElement){
this._titleElement=document.createElement("EM");
this._titleElement.setAttribute("unselectable","on");
}
return this._titleElement;
},_getTitleIcon:function(){
if(null==this._titleIconElement){
var _7e=document.createElement("A");
_7e.className="windowicon";
this._titleIconElement=_7e;
}
return this._titleIconElement;
},_getTitleCommandButton:function(_7f){
if(!_7f||!this._buttonsArray){
return null;
}
_7f=_7f.toLowerCase()+"button";
var _80=this._buttonsArray.length;
for(var i=0;i<_80;i++){
var _82=this._buttonsArray[i];
if(_82&&Telerik.Web.DomElement.containsCssClass(_82,_7f)){
return _82;
}
}
return null;
},_updateTitleWidth:function(){
if(this._visibleTitlebar){
var _83=this._getTitleElement();
if(!_83){
return;
}
var _84=this._getTitleCommandButtonsHolder();
var _85=_84.offsetWidth;
if(_85>0){
var lis=_84.getElementsByTagName("LI");
if(lis[0]&&lis[0].offsetWidth>0){
_85=lis.length*lis[0].offsetWidth;
}
_84.style.width=_85+"px";
}
var _87=this._getTitleIcon();
var _88=_87.offsetWidth;
if(_88>0&&_87.parentNode.tagName=="TD"){
_87.parentNode.style.width=_88+"px";
}
}
},_addWindowToDocument:function(){
var _89=document.getElementById(this._formID);
if(!_89){
_89=document.forms[0];
}
_89.appendChild(this._popupElement);
},_invokeDialogCallBackFunction:function(_8a,_8b){
if(true!=_8b){
this.close();
}
var _8c=this.get_clientCallBackFunction();
if(_8c){
if("string"==typeof (_8c)){
_8c=eval(_8c);
}
if("function"==typeof (_8c)){
_8c(this,_8a);
}
}
},_createBackReference:function(){
var _8d=this;
if(!_8d.Argument){
_8d.Argument={};
}
var _8e=this._iframe;
try{
_8e.radWindow=_8d;
if(_8e.contentWindow!=null){
_8e.contentWindow.radWindow=_8d;
}
}
catch(e){
}
},_getFullSkinName:function(){
return "radwindow radwindow_"+this._skin+" normalwindow transparentwindow";
},_setPopupVisible:function(x,y){
this._popupBehavior.set_x(x);
this._popupBehavior.set_y(y);
this._popupBehavior.show();
if(!this.get_width()){
this._popupElement.style.width="";
}
this._fixIeHeight(this._popupElement,this._height);
this._updateTitleWidth();
},_configureMinimizeButton:function(_91){
var loc=this._getLocalization();
var _93=(true==_91)?loc["Restore"]:loc["Minimize"];
var _94=(true==_91)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",_93,_94);
},_configureMaximizeButton:function(_95){
var loc=this._getLocalization();
var _97=(true==_95)?loc["Restore"]:loc["Maximize"];
var _98=(true==_95)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",_97,_98);
},_registerTitlebarHandlersButton:function(_99,_9a,_9b){
var _9c=this._getTitleCommandButton(_99);
if(_9c){
var loc=this._getLocalization();
_9c.setAttribute("title",_9a);
_9c.innerHTML=_9a;
$clearHandlers(_9c);
$addHandlers(_9c,{"click":_9b},this);
$addHandler(_9c,"dblclick",this._cancelEvent);
}
},isCloned:function(){
return this._isCloned;
},isBehaviorEnabled:function(_9e){
return _9e&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(_9f){
return _9f&this._initialBehaviors?true:false;
},setVisible:function(_a0){
if(this._popupBehavior){
if(_a0){
this._popupBehavior.show();
}else{
this._popupBehavior.hide();
}
}
},isVisible:function(){
return this._popupVisible;
},isModal:function(){
return this._modal;
},isActive:function(){
return (this._popupElement&&!Telerik.Web.DomElement.containsCssClass(this._popupElement,"inactivewindow"));
},isPinned:function(){
var _a1=this._getTitleCommandButton("Pin");
return (_a1&&Telerik.Web.DomElement.containsCssClass(_a1,"on"));
},isClosed:function(){
return (!this.isVisible());
},isMinimized:function(){
return (this._popupElement&&Telerik.Web.DomElement.containsCssClass(this._popupElement,"minimizedwindow"));
},isMaximized:function(){
return (this._popupElement&&Telerik.Web.DomElement.containsCssClass(this._popupElement,"maximizedwindow"));
},setActive:function(_a2){
var _a3=this._popupElement;
if(!_a2){
Telerik.Web.DomElement.addCssClass(_a3,"inactivewindow");
}else{
var _a4=parseInt(_a3.style.zIndex);
var _a5=Telerik.Web.UI.Window.get_newZindex(_a4);
_a3.style.zIndex=""+_a5;
if(this.isActive()){
return;
}
Telerik.Web.CommonScripts.removeCssClasses(_a3,["inactivewindow"]);
this.raiseEvent("activate",new Sys.EventArgs());
}
},_moveToMinimizeZone:function(){
var _a6=$get(this.get_minimizeZoneID());
if(_a6){
if(this.isPinned()){
this._isPinned=true;
this.togglePin();
}
var _a7=this._popupElement;
if(_a7.parentNode!=_a6){
_a7.parentNode.removeChild(_a7);
_a6.appendChild(_a7);
this.setVisible(true);
_a7.style.position="static";
if(this.isIE){
_a7.style.display="inline";
}else{
_a7.style.cssFloat="left";
}
this._makeMoveable(false);
}
}
},_moveToDocument:function(){
var _a8=this._popupElement;
_a8.parentNode.removeChild(_a8);
_a8.style.position="absolute";
if(this.isIE){
_a8.style.display="";
}else{
_a8.style.cssFloat="";
}
this._addWindowToDocument();
this._makeMoveable(true);
if(this._isPinned){
this._isPinned=false;
this.togglePin();
}
},minimize:function(){
if(!this.isCreated()){
return;
}
var _a9=this.onCommand("Minimize");
if(!_a9){
return;
}
var _aa=this._popupElement;
Telerik.Web.CommonScripts.removeCssClasses(_aa,["normalwindow","maximizedwindow"]);
Telerik.Web.DomElement.addCssClass(_aa,"minimizedwindow");
this._configureMinimizeButton(true);
this._enablePageScrolling(true);
if(this.get_minimizeZoneID()){
this._moveToMinimizeZone();
}
},restore:function(){
if(!this.isCreated()){
return;
}
var _ab=this.onCommand("Restore");
if(!_ab){
return;
}
this._configureMinimizeButton();
this._configureMaximizeButton();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _ac=this._popupElement;
Telerik.Web.CommonScripts.removeCssClasses(_ac,["minimizedwindow","maximizedwindow"]);
Telerik.Web.DomElement.addCssClass(_ac,"normalwindow");
this._enablePageScrolling(true);
this.setVisible(true);
this._restoreBounds();
this.setVisible(true);
this.setActive(true);
},maximize:function(){
if(!this.isCreated()){
return;
}
var _ad=this.onCommand("Maximize");
if(!_ad){
return;
}
if(!this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){
return;
}
this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){
this._moveToDocument();
}
var _ae=this._popupElement;
Telerik.Web.CommonScripts.removeCssClasses(_ae,["normalwindow","minimizedwindow"]);
Telerik.Web.DomElement.addCssClass(_ae,"maximizedwindow");
_ae.style.width="";
_ae.style.height="";
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
if(!this.isActive()){
this.setActive(true);
}
},togglePin:function(){
if(!this.isCreated()){
return;
}
var _af=this.onCommand("Pin");
if(!_af){
return;
}
var _b0=this._getTitleCommandButton("Pin");
var loc=this._getLocalization();
var _b2=this.isPinned();
var _b3=_b2?loc["PinOff"]:loc["PinOn"];
if(_b0){
Telerik.Web.DomElement.toggleCssClass(_b0,"on");
}
this._registerTitlebarHandlersButton("Pin",_b3,this.togglePin);
Telerik.Web.UI.Window.setPinned(!_b2,this);
},reload:function(){
if(!this.isCreated()){
return;
}
var _b4=this.onCommand("Reload");
if(!_b4){
return;
}
if(!this._iframe){
return;
}
this._onWindowUrlChanging();
try{
this._iframe.contentWindow.location.reload();
}
catch(e){
this._onWindowUrlChanged();
}
},close:function(_b5){
if(this.isClosed()){
return;
}
this._enablePageScrolling(true);
this.hide();
if(null!=_b5&&!(_b5 instanceof Sys.UI.DomEvent)){
this._invokeDialogCallBackFunction(_b5);
}
if(this._destroyOnClose){
this.dispose();
}
},onCommand:function(_b6){
var _b7=new Sys.CancelEventArgs();
_b7.commandName=_b7.CommandName=_b6;
this.raise_command(_b7);
if(_b7.get_cancel()){
return false;
}
return true;
},setUrl:function(url){
this._createUI();
this._navigateUrl=url;
var _b9=url;
if(this._reloadOnShow){
_b9=this._getReloadOnShowUrl(_b9);
}
this._iframe.src=_b9;
this._onWindowUrlChanging();
if(!this._loaded){
this._registerIframeLoadHandler(true);
}
this._loaded=true;
},_registerChildPageHandlers:function(_ba){
var _bb=null;
try{
_bb=this._iframe.contentWindow.document.body;
}
catch(e){
return;
}
if(null==_bb){
return;
}
function localAddHandler(_bc,_bd,_be){
if(_bc.addEventListener){
_bc.addEventListener(_bd,_be,false);
}else{
if(_bc.attachEvent){
_bc.attachEvent("on"+_bd,_be);
}
}
}
function localRemoveHandler(_bf,_c0,_c1){
if(_bf.addEventListener){
_bf.removeEventListener(_c0,_c1,false);
}else{
if(_bf.detachEvent){
_bf.detachEvent("on"+_c0,_c1);
}
}
}
if(_ba){
this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){
_bb.onunload=this._onChildPageUnloadDelegate;
}else{
this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}
this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
localAddHandler(_bb,"click",this._onChildPageClickDelegate);
}else{
if(this._onIframeLoadDelegate){
localRemoveHandler(_bb,"click",this._onChildPageClickDelegate);
if(this.isIE){
_bb.onunload=null;
}else{
this._iframe.contentWindow.onunload=null;
}
}
}
},_onChildPageUnload:function(e){
this._registerChildPageHandlers(false);
},_onChildPageClick:function(e){
if(!this.isVisible()||this.isClosed()){
return;
}
this.setActive(true);
},_onIframeLoad:function(){
this._onWindowUrlChanged();
if(!this.isVisible()||this.isActive()||this.isClosed()){
}else{
this.setActive(true);
}
this._registerChildPageHandlers(true);
this.raiseEvent("pageLoad",new Sys.EventArgs());
},_onWindowUrlChanging:function(){
var _c4=this._getStatusMessageElement();
if(_c4){
Telerik.Web.DomElement.addCssClass(_c4,"loading");
}
if(!this._showContentDuringLoad){
this._iframe.style.width="0px";
this._iframe.style.height="0px";
}
},_onWindowUrlChanged:function(){
var _c5=this._getStatusMessageElement();
if(_c5){
Telerik.Web.DomElement.removeCssClass(_c5,"loading");
this.set_status(this._navigateUrl);
}
if(!this._showContentDuringLoad){
this._iframe.style.width="100%";
this._iframe.style.height="100%";
}
try{
if(this._iframe.contentWindow.document.title){
this.set_title(this._iframe.contentWindow.document.title);
}
}
catch(e){
}
},_updatePopupZindex:function(){
if(this._popupBehavior){
if(this.isVisible()){
this._popupBehavior.show();
}
}
},get_zindex:function(){
if(this._popupElement){
return this._popupElement.style.zIndex;
}else{
return -1;
}
},get_contentFrame:function(){
return this._iframe;
},get_minimizeZoneID:function(){
return this._minimizeZoneID;
},set_minimizeZoneID:function(_c6){
if(this._minimizeZoneID!=_c6){
this._minimizeZoneID=_c6;
}
},get_minimizeIconUrl:function(){
return this._minimizeIconUrl;
},set_minimizeIconUrl:function(_c7){
if(this._minimizeIconUrl!=_c7){
this._minimizeIconUrl=_c7;
}
},get_iconUrl:function(){
return this._iconUrl;
},set_iconUrl:function(_c8){
if(this._iconUrl!=_c8){
this._iconUrl=_c8;
}
},get_clientCallBackFunction:function(){
return this._clientCallBackFunction;
},set_clientCallBackFunction:function(_c9){
if(this._clientCallBackFunction!=_c9){
this._clientCallBackFunction=_c9;
}
},get_navigateUrl:function(){
return this._navigateUrl;
},set_navigateUrl:function(_ca){
if(this._navigateUrl!=_ca){
this._navigateUrl=_ca;
}
},get_targetControl:function(){
return this._openerElement;
},set_targetControl:function(_cb){
if(this._openerElement!=_cb){
this._openerElement=_cb;
}
},get_name:function(){
return this._name;
},set_name:function(_cc){
if(this._name!=_cc){
this._name=_cc;
}
},get_formID:function(){
return this._formID;
},set_formID:function(_cd){
if(this._formID!=_cd){
this._formID=_cd;
}
},get_offsetElementID:function(){
return this._offsetElementID;
},set_offsetElementID:function(_ce){
if(this._offsetElementID!=_ce){
this._offsetElementID=_ce;
}
},get_openerElementID:function(){
return this._openerElementID;
},set_openerElementID:function(_cf){
if(this._openerElementID!=_cf){
if(this._openerElement){
this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}
this._openerElementID=_cf;
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(_d0){
if(this._left!=_d0){
this._left=parseInt(_d0);
}
},get_top:function(){
return this._top;
},set_top:function(_d1){
if(this._top!=_d1){
this._top=parseInt(_d1);
}
},get_title:function(){
return this._title;
},set_title:function(_d2){
if(this._title!=_d2){
this._title=_d2;
}
if(null==this._titleElement){
return;
}
this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){
return parseInt(this._width);
},_fixSizeValue:function(_d3){
_d3=""+_d3;
if(-1==_d3.indexOf("px")){
_d3=parseInt(_d3);
if(!isNaN(_d3)){
_d3=_d3+"px";
}else{
_d3="";
}
}
return _d3;
},set_width:function(_d4){
if(null==_d4){
return;
}
_d4=this._fixSizeValue(_d4);
if(this._width!=_d4){
this._width=_d4;
}
if(this._popupElement){
this._popupElement.style.width=this._width;
this._updatePopupZindex();
}
},get_height:function(){
return parseInt(this._height);
},set_height:function(_d5){
if(null==_d5){
return;
}
_d5=this._fixSizeValue(_d5);
if(this._height!=_d5){
this._height=_d5;
}
if(this._popupElement){
if(this._tableElement){
this._tableElement.style.height="";
}
this._popupElement.style.height=this._height;
this._fixIeHeight(this._popupElement,this._height);
this._updatePopupZindex();
}
},get_initialBehaviors:function(){
return this._initialBehaviors;
},set_initialBehaviors:function(_d6){
if(this._initialBehaviors!=_d6){
this._initialBehaviors=_d6;
}
},get_behaviors:function(){
return this._behaviors;
},set_behaviors:function(_d7){
if(this._behaviors!=_d7){
this._behaviors=_d7;
}
if(null==this._titlebarElement){
return;
}
this._makeMoveable(false);
this._makeMoveable(true);
this._makeResizeable(false);
this._makeResizeable(true);
if(this._buttonsArray&&this._buttonsArray.length>0){
var len=this._buttonsArray.length;
for(var i=0;i<len;i++){
var _da=this._buttonsArray[i];
$clearHandlers(_da);
}
this._buttonsArray=[];
var _db=this._getTitleCommandButtonsHolder();
_db.innerHTML="";
}
if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){
return;
}else{
var loc=this._getLocalization();
var _dd=Telerik.Web.UI.WindowBehaviors;
var _de=[[this.isBehaviorEnabled(_dd.Pin),"pinbutton",loc["PinOn"],this.togglePin],[this.isBehaviorEnabled(_dd.Reload),"reloadbutton",loc["Reload"],this.reload],[this.isBehaviorEnabled(_dd.Minimize),"minimizebutton",loc["Minimize"],this.minimize],[this.isBehaviorEnabled(_dd.Maximize),"maximizebutton",loc["Maximize"],this.maximize],[this.isBehaviorEnabled(_dd.Close),"closebutton",loc["Close"],this.close]];
for(var i=0;i<_de.length;i++){
var _df=_de[i];
if(!_df[0]){
continue;
}
var li=document.createElement("LI");
var _e1=document.createElement("A");
_e1.href="javascript:void(0);";
_e1.className=_df[1];
_e1.setAttribute("title",_df[2]);
var _e2=document.createElement("SPAN");
_e2.innerHTML=_df[2];
_e1.appendChild(_e2);
$addHandlers(_e1,{"click":_df[3]},this);
$addHandler(_e1,"dblclick",this._cancelEvent);
li.appendChild(_e1);
this._buttonsElement.appendChild(li);
this._buttonsArray[this._buttonsArray.length]=_e1;
}
}
},get_modal:function(){
return this._modal;
},set_modal:function(_e3){
if(this._modal!=_e3){
this._modal=_e3;
}
this._makeModal(this._modal);
},get_destroyOnClose:function(){
return this._destroyOnClose;
},set_destroyOnClose:function(_e4){
if(this._destroyOnClose!=_e4){
this._destroyOnClose=_e4;
}
},get_reloadOnShow:function(){
return this._reloadOnShow;
},set_reloadOnShow:function(_e5){
if(this._reloadOnShow!=_e5){
this._reloadOnShow=_e5;
}
},get_showContentDuringLoad:function(){
return this._showContentDuringLoad;
},set_showContentDuringLoad:function(_e6){
if(this._showContentDuringLoad!=_e6){
this._showContentDuringLoad=_e6;
}
},get_visibleOnPageLoad:function(){
return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(_e7){
if(this._visibleOnPageLoad!=_e7){
this._visibleOnPageLoad=_e7;
}
},get_visibleTitlebar:function(){
return this._visibleTitlebar;
},set_visibleTitlebar:function(_e8){
if(this._visibleTitlebar!=_e8){
this._visibleTitlebar=_e8;
}
if(this._titlebarElement){
this._titlebarElement.style.display=_e8?"":"none";
}
},get_visibleStatusbar:function(){
return this._visibleStatusbar;
},set_visibleStatusbar:function(_e9){
if(this._visibleStatusbar!=_e9){
this._visibleStatusbar=_e9;
}
if(this._statusCell){
this._statusCell.parentNode.style.display=_e9?"":"none";
}
},get_animation:function(){
return this._animation;
},set_animation:function(_ea){
if(this._animation!=_ea){
this._animation=_ea;
}
},get_skin:function(){
return this._skin;
},set_skin:function(_eb){
if(_eb&&this._skin!=_eb){
this._skin=_eb;
}
},get_popupElement:function(){
return this._popupElement;
},get_windowManager:function(){
return this._windowManager;
},set_windowManager:function(_ec){
this._windowManager=_ec;
},set_status:function(_ed){
var _ee=this._getStatusMessageElement();
if(_ee){
_ee.value=_ed;
}
},get_status:function(){
var _ef=this._getStatusMessageElement();
if(_ef){
return _ef.value;
}
},add_command:function(_f0){
this.get_events().addHandler("command",_f0);
},remove_command:function(_f1){
this.get_events().removeHandler("command",_f1);
},raise_command:function(_f2){
this.raiseEvent("command",_f2);
},add_dragStart:function(_f3){
this.get_events().addHandler("dragStart",_f3);
},remove_dragStart:function(_f4){
this.get_events().removeHandler("dragStart",_f4);
},add_dragEnd:function(_f5){
this.get_events().addHandler("dragEnd",_f5);
},remove_dragEnd:function(_f6){
this.get_events().removeHandler("dragEnd",_f6);
},add_activate:function(_f7){
this.get_events().addHandler("activate",_f7);
},remove_activate:function(_f8){
this.get_events().removeHandler("activate",_f8);
},add_beforeShow:function(_f9){
this.get_events().addHandler("beforeShow",_f9);
},remove_beforeShow:function(_fa){
this.get_events().removeHandler("beforeShow",_fa);
},add_show:function(_fb){
this.get_events().addHandler("show",_fb);
},remove_show:function(_fc){
this.get_events().removeHandler("show",_fc);
},add_pageLoad:function(_fd){
this.get_events().addHandler("pageLoad",_fd);
},remove_pageLoad:function(_fe){
this.get_events().removeHandler("pageLoad",_fe);
},add_close:function(_ff){
this.get_events().addHandler("close",_ff);
},remove_close:function(_100){
this.get_events().removeHandler("close",_100);
},add_resize:function(_101){
this.get_events().addHandler("resize",_101);
},remove_resize:function(_102){
this.get_events().removeHandler("resize",_102);
},saveClientState:function(){
var _103=["position"];
var _104={};
for(var i=0;i<_103.length;i++){
_104[_103[i]]=this["get_"+_103[i]]();
}
return Sys.Serialization.JavaScriptSerializer.serialize(_104);
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.RadWindow);
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.Window._zIndex=99000;
Telerik.Web.UI.Window.get_newZindex=function(_106){
if(null==_106||isNaN(_106)){
_106=0;
}
if(Telerik.Web.UI.Window._zIndex<=_106){
Telerik.Web.UI.Window._zIndex=parseInt(_106);
}
Telerik.Web.UI.Window._zIndex++;
return Telerik.Web.UI.Window._zIndex;
};
Telerik.Web.UI.Window._pinnedList={};
Telerik.Web.UI.Window.setPinned=function(_107,oWnd){
if(_107){
var _109=oWnd._getViewportBounds();
var _10a=oWnd._getCurrentBounds();
oWnd.LeftOffset=_10a.x-_109.scrollLeft;
oWnd.TopOffset=_10a.y-_109.scrollTop;
var _10b=window.setInterval(function(){
Telerik.Web.UI.Window._updatePinnedElementPosition(oWnd);
},100);
Telerik.Web.UI.Window._pinnedList[_10b]=oWnd;
}else{
var _10c=null;
var _10d=Telerik.Web.UI.Window._pinnedList;
for(var name in _10d){
if(_10d[name]==oWnd){
_10c=name;
break;
}
}
if(null!=_10c){
window.clearInterval(_10c);
Telerik.Web.UI.Window._pinnedList[_10c]=null;
}
oWnd.TopOffset=null;
oWnd.LeftOffset=null;
}
};
Telerik.Web.UI.Window._updatePinnedElementPosition=function(oWnd){
if(oWnd.isMaximized()||!oWnd.isVisible()){
return;
}
var _110=oWnd._getViewportBounds();
var _111=oWnd._getCurrentBounds();
var left=(oWnd.LeftOffset!=null)?oWnd.LeftOffset+_110.scrollLeft:_111.x;
var top=(oWnd.TopOffset!=null)?oWnd.TopOffset+_110.scrollTop:_111.y;
oWnd.moveTo(left,top);
};
Telerik.Web.UI.Window.DragDataType="RadWindow";
Telerik.Web.UI.Window._documentDropZone=function(_114){
};
Telerik.Web.UI.Window._documentDropZone.prototype={get_dropTargetElement:function(){
return (Telerik.Web.Browser.renderMode==Telerik.Web.Browser.StandardsMode)?document.body:document.documentElement;
},canDrop:function(_115,_116,dock){
return _116===Telerik.Web.UI.Window.DragDataType;
},drop:function(_118,_119,wnd){
},onDragEnterTarget:function(_11b,type,wnd){
},onDragLeaveTarget:function(_11e,type,wnd){
},onDragInTarget:function(_121,type,wnd){
}};
Telerik.Web.UI.Window._documentDropZone.registerClass("Telerik.Web.UI.Window._documentDropZone",null,Telerik.Web.IDropTarget);
Telerik.Web.UI.Window.DocumentDropZone=new Telerik.Web.UI.Window._documentDropZone();
Telerik.Web.DragDropManager.registerDropTarget(Telerik.Web.UI.Window.DocumentDropZone,true);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();