﻿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 a=Function.createDelegate(null,function(b){if(b.keyCode==27){Telerik.Web.UI.RadWindowController.hideCurrentWindowIfNonModal();
}});
$addHandler(document.documentElement,"keydown",a);
Sys.Application.add_unload(function(){$removeHandler(document.documentElement,"keydown",a);
});
},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(a){if(a==this._activeWindow){return;
}this.inactivateCurrentWindow();
this._activeWindow=a;
Array.remove(this._historyStack,a);
Array.add(this._historyStack,a);
},notifyWindowClosed:function(a){if(this._activeWindow==a){this._activeWindow=null;
}Array.remove(this._historyStack,a);
this._activatePreviousWindow();
},_activatePreviousWindow:function(){var c=this._historyStack;
var b=c.length-1;
for(;
b>=0;
b--){var a=c[b];
if(!a){return;
}if(a.isCreated()&&!a.isClosed()&&!a.isMinimized()){a.setActive(true);
break;
}else{Array.removeAt(c,b);
}}},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(a){Telerik.Web.UI.RadWindow.initializeBase(this,[a]);
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._dockMode=false;
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._opacity=100;
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._stylezindex=null;
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;
},get_stylezindex:function(){return this._stylezindex;
},set_stylezindex:function(a){this._stylezindex=a;
},_registerIframeLoadHandler:function(a){if(!this._iframe){return;
}if(a){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 a=$removeHandler(b,"click",this._onClickDelegate);
this._onClickDelegate=null;
}},_registerTitlebarHandlers:function(b){var a=this._titleCell;
if(b){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(a,"dblclick",this._onTitlebarDblclickDelegate);
$addHandler(a,"click",this._onTitlebarClickDelegate);
}else{if(a){if(this._onTitlebarDblclickDelegate){$removeHandler(a,"dblclick",this._onTitlebarDblclickDelegate);
this._onTitlebarDblclickDelegate=null;
}if(this._onTitlebarClickDelegate){$removeHandler(a,"click",this._onTitlebarClickDelegate);
this._onTitlebarClickDelegate=null;
}$clearHandlers(a);
}}},_makeModal:function(a){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(!a){return;
}if(typeof(Telerik.Web.UI.RadWindowManager)!="undefined"&&Telerik.Web.UI.RadWindowManager.isInstanceOfType(this)){return;
}this._onModalShowHandler=function(b){if(!b._modalExtender){b._modalExtender=new Telerik.Web.UI.ModalExtender(b._popupElement);
}b._modalExtender.show();
b.center();
};
this.add_show(this._onModalShowHandler);
this._onModalCloseHandler=function(b){window.setTimeout(function(){if(b._modalExtender){b._modalExtender.hide();
}},10);
};
this.add_close(this._onModalCloseHandler);
},_enableMoveResize:function(c){if(this._resizeExtender){this._resizeExtender.dispose();
this._resizeExtender=null;
}if(!c){return;
}if(!this._popupElement){return;
}var d=this._tableElement.rows;
var a={};
var b=this._isWindowRightToLeft();
if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){if(b){a={nw:d[0].cells[2],n:this._topResizer,ne:d[0].cells[0],w:[d[1].cells[2],d[2].cells[2]],e:[d[1].cells[0],d[2].cells[0]],sw:d[3].cells[2],s:d[3].cells[1],se:[d[3].cells[0],this._bottomResizer]};
}else{a={nw:d[0].cells[0],n:this._topResizer,ne:d[0].cells[2],w:[d[1].cells[0],d[2].cells[0]],e:[d[1].cells[2],d[2].cells[2]],sw:d[3].cells[0],s:d[3].cells[1],se:[d[3].cells[2],this._bottomResizer]};
}}if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Move)){a.move=this._titleCell;
}this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._popupElement,a,this._tableElement);
},onResizeStart:function(){if(this.isMaximized()){return false;
}this.setActive(true);
this._cachedDragZoneBounds=this._getRestrictionZoneBounds();
},onResizing:function(a){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,a)){if(this._dockMode){this.setWidthDockMode(a.width);
this.setHeightDockMode(a.height);
var b=this.get_contentElement();
var c=this._contentCell;
setTimeout(function(){b.style.width=c.offsetWidth+"px";
b.style.height=c.offsetHeight+"px";
},0);
}this._updateTitleWidth();
return true;
}return false;
},onResizeEnd:function(){this._cachedDragWindowBounds=null;
var a=this._getCurrentBounds();
this.moveTo(a.x,a.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(b){this._cachedDragZoneBounds=null;
this._cachedDragWindowBounds=null;
if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove();
}this.raiseEvent("dragEnd",new Sys.EventArgs());
var a=this._getCurrentBounds();
this.moveTo(a.x,a.y);
this.setActive(true);
if(this.isMinimized()){this._getTitleElement().style.width="";
}},onDrag:function(b){if(!this._cachedDragZoneBounds){return true;
}var c=this._cachedDragWindowBounds;
var d=this._cachedDragZoneBounds;
b.width=c.width;
b.height=c.height;
var a=this._checkRestrictionZoneBounds(d,b);
if(!a){if(b.x<=d.x){b.x=d.x;
}else{if(d.x+d.width<=b.x+c.width){b.x=d.x+d.width-c.width;
}}if(b.y<=d.y){b.y=d.y;
}else{if(d.y+d.height<=b.y+c.height){b.y=d.y+d.height-c.height;
}}a=true;
}return a;
},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 b=this.get_windowManager();
if(b){if(b.get_preserveClientState()){b.saveWindowState(this);
}if(this._destroyOnClose){b.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 a=this._iframe;
if(a){a.radWindow=null;
a.src="javascript:'<html></html>';";
a.name="";
a.removeAttribute("name");
a.removeAttribute("NAME");
}if(this._contentElement){this._contentElement.innerHTML="";
}var c=this._popupElement;
if(c&&c.parentNode){c.parentNode.removeChild(c);
}Telerik.Web.UI.RadWindow.callBaseMethod(this,"dispose");
},hide:function(){this._hide();
return true;
},clone:function(b){var a=document.createElement("SPAN");
if(b){a.setAttribute("id",b);
}return $telerik.cloneControl(this,Telerik.Web.UI.RadWindow,a);
},set_contentElement:function(a){if(!this._isPredefined){this._dockMode=true;
}this._createUI();
if(this._iframe){this._iframe.style.display="none";
}if(a.parentNode&&a.parentNode.removeChild){a.parentNode.removeChild(a);
}this._contentCell.appendChild(a);
a.style.display="";
this._contentElement=a;
},get_contentElement:function(){return this._contentElement;
},isCreated:function(){return this._popupElement!=null;
},show:function(){var a=this.isCreated();
this._createUI();
if(this._navigateUrl&&(!a||this._reloadOnShow)){this.setUrl(this._navigateUrl);
}if(!a&&(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.isModal()){this.center();
}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 b=$get(this.get_offsetElementID());
if(b){this._offsetElement=b;
}}var a=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(a!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(a);
}this._popupVisible=true;
},_hide:function(){if(!this._animation||this._animation==0){this._afterHide();
}else{var b=Function.createDelegate(this,this._afterHide);
var a=this.isMaximized();
$telerik.$(this._popupElement).stop().fadeOut(500,function(){b(a);
});
}},_afterHide:function(a){if(!this._popupBehavior){return;
}if(a==null){a=this.isMaximized();
}if(a){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());
if(this._autoSize&&this._dockMode){this.autoSize(!this._animation==Telerik.Web.UI.WindowAnimation.None);
}},_playAnimation:function(){var h=Function.createDelegate(this,function(){var i=this._getCalculatedPopupBounds();
this._setPopupVisible(i.x,i.y);
var k=$telerik.getBounds(this._popupElement);
var l=this.get_offsetElementID();
if(l){var m=$get(l);
if(m){var j=$telerik.getBounds(m);
k.x=j.x;
k.y=j.y;
}}$telerik.$(this._popupElement).hide();
return k;
});
var f=this._popupElement;
var e=this._animation;
var d=this._openerElement?$telerik.getBounds(this._openerElement):null;
var c=h();
var b=""+this._position;
var g=null;
var a=Function.createDelegate(this,function(){this._popupElement.style.filter="";
this.get_popupElement().style.opacity="";
this._show();
this._afterShow();
});
Telerik.Web.UI.Animations.playJQueryAnimation(f,e,d,c,b,g,a);
},_onClick:function(a){this.show();
return this._cancelEvent(a);
},_cancelEvent:function(a){if(a){a.returnValue=false;
a.cancelBubble=true;
a.preventDefault();
a.stopPropagation();
}return false;
},_getWindowController:function(){return Telerik.Web.UI.RadWindowController.getInstance();
},_getReloadOnShowUrl:function(b){var a="rwndrnd="+Math.random();
if(b.indexOf("?")>-1){a="&"+a;
}else{a="?"+a;
}b+=a;
return b;
},getWindowBounds:function(){return this._getCalculatedPopupBounds();
},toString:function(){return"[RadWindow id="+this.get_id()+"]";
},center:function(){var a=this._getCentralBounds();
this.moveTo(a.x,a.y);
},moveTo:function(a,b){var d=this._popupElement;
if(d){var c=$telerik.getBounds(d);
var e=this._getRestrictionZoneBounds();
if(e){var f=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(a+e.x,b+e.y,c.width,c.height));
if(!f){return false;
}}}a=parseInt(a);
b=parseInt(b);
this._createUI();
this._setPopupVisible(a,b);
this._storeBounds();
return true;
},setSize:function(b,a){this._firstShow=false;
this.set_width(b);
this.set_height(a);
this._storeBounds();
},autoSize:function(x){if(this.isClosed()){return;
}var c=this.get_contentFrame();
var e=this._tableElement;
var b=$telerik.getBounds(this._tableElement);
var l=$telerik.getBounds(this._contentCell);
var p=null;
var k;
var v;
var i=this.get_contentElement();
if(this._dockMode&&i){i.style.height="1px";
k=i.scrollHeight;
v=i.scrollWidth;
}else{try{p=c.contentWindow.document.documentElement;
}catch(d){return false;
}var m=c.contentWindow.document.body;
var i=p;
if($telerik.isIE||$telerik.isFirefox){i=c;
}i.style.width="1px";
k=p.scrollHeight;
v=p.scrollWidth;
e.style.width="1px";
var g=this._contentCell.scrollWidth;
if(v<g){i.style.width=g+"px";
v=p.scrollWidth;
}i.style.height="1px";
k=p.scrollHeight;
e.style.width="100%";
}var f=this._getRestrictionZoneBounds();
var y=f?f:this._getViewportBounds();
var n=b.width-l.width+v;
var q=b.height-l.height+k;
var j=Math.min(n,y.width);
var h=Math.min(q,y.height);
var o=this.get_keepInScreenBounds();
if(!f){this.set_keepInScreenBounds(true);
}var w=16;
if(h<k){j=Math.min(j+w,y.width);
}if(j<v){h=Math.min(h+w,y.height);
}var t=this.calcPosition(b.x,b.width,j,y.width);
var a=this.calcPosition(b.y,b.height,h,y.height);
var u={x:t+y.scrollLeft,y:a+y.scrollTop,width:j,height:h};
if(p){var s=p.style.overflow;
var r=m.style.overflow;
p.style.overflow="hidden";
m.style.overflow="hidden";
}else{this.get_contentElement().style.overflow="hidden";
}if(c){i.style.width="100%";
i.style.height="100%";
}if(x){this._autoSizeWithAnimation(u,s,r);
}else{this._restoreRect=null;
this.setBounds(u);
if(p){p.style.overflow=s;
m.style.overflow=s;
}else{this.get_contentElement().style.overflow="auto";
}}if($telerik.isIE&&c){c.style.overflow="hidden";
setTimeout(function(){c.style.overflow="";
},0);
}this.set_keepInScreenBounds(o);
return true;
},_autoSizeWithAnimation:function(e,d,i){var k=null;
var h=null;
var j=this.get_contentElement();
var b=this.get_contentFrame();
if(b){k=b.contentWindow.document.body;
h=b.contentWindow.document.documentElement;
}if(j){j.style.overflow="hidden";
}var g=this.get_popupElement();
var a=Function.createDelegate(this,function(){this._popupElement.style.filter="";
this.get_popupElement().style.opacity="";
if(h&&k){h.style.overflow=d;
k.style.overflow=d;
}this._restoreRect=null;
this.setBounds(e);
if(j){j.style.overflow="auto";
}});
this._tableElement.style.height="100%";
var c={width:e.width,height:e.height,x:e.x,y:e.y};
var f=this._getRestrictionZoneBounds();
if(f){c.x+=f.x;
c.y+=f.y;
}$telerik.$(g).animate({width:c.width,height:c.height,left:c.x,top:c.y,opacity:1},500,null,a);
},setBounds:function(a){if(!a){return;
}this._checkRestrictionZoneBounds=function(){return true;
};
this.moveTo(a.x,a.y);
this.setSize(a.width,a.height);
this._checkRestrictionZoneBounds=Telerik.Web.UI.RadWindow.prototype._checkRestrictionZoneBounds;
},setWidthDockMode:function(a){if(!this._dockMode||!this.get_contentElement()){return;
}widthToSet=a-2*parseInt($telerik.getCurrentStyle(this._tableElement.rows[2].cells[0],"width"));
if(widthToSet>0){this._contentElement.style.width=widthToSet+"px";
}},setHeightDockMode:function(a){if(!this._dockMode||!this.get_contentElement()){return;
}var b=a;
b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[3].cells[1],"height"));
if(this._visibleTitlebar){b-=parseInt($telerik.getCurrentStyle(this._titlebarElement,"height"));
b-=parseInt($telerik.getCurrentStyle(this._topResizer,"height"));
}else{b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[0].cells[1],"height"));
}if(this._visibleStatusbar){b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[2].cells[1],"height"));
}if(b>0){this._contentElement.style.height=b+"px";
}},calcPosition:function(d,c,a,b){var e=d+Math.round((c-a)/2);
if(e<0||e+c>b){e=Math.round(Math.abs((b-a)/2));
}return e;
},_maintainMaximizedSize:function(){if(!this.isMaximized()){return;
}var g=this._popupElement;
if(!g){return;
}var a=this._getViewportBounds();
g.style.top=(a.scrollTop+a.y)+"px";
g.style.left=(a.scrollLeft+a.x)+"px";
$telerik.setSize(g,{width:a.width,height:a.height});
var b=this._getRestrictionZoneBounds();
if(!b){this._enablePageScrolling(false);
}var c=this._tableElement;
a=$telerik.getContentSize(g);
var d=$telerik.getBorderBox(c);
var e=$telerik.getPaddingBox(c);
var f=a.height-d.vertical-e.vertical;
c.style.height=f+"px";
this._fixIeHeight(c,f);
if(this._dockMode){this.setWidthDockMode(a.width);
this.setHeightDockMode(a.height);
}},_enablePageScrolling:function(c){var a=document.body;
var b=document.documentElement;
if(c){if(null!=this._documentOverflow){b.style.overflow=this._documentOverflow;
}if(null!=this._bodyOverflow){a.style.overflow=this._bodyOverflow;
}this._documentOverflow=null;
this._bodyOverflow=null;
}else{if(null==this._documentOverflow){this._documentOverflow=b.style.overflow;
}if(null==this._bodyOverflow){this._bodyOverflow=a.style.overflow;
}a.style.overflow="hidden";
b.style.overflow="hidden";
}},_getRestrictionZoneBounds:function(){var b=null;
if(this.get_restrictionZoneID()){var a=$get(this.get_restrictionZoneID());
if(a){b=$telerik.getBounds(a);
b.scrollLeft=0;
b.scrollTop=0;
}}return b;
},_storeBounds:function(){if(!this.isCreated()){return;
}var a=this._getCurrentBounds();
if(this.isMaximized()){return false;
}if(this.isMinimized()){if(this._restoreRect){a.width=this._restoreRect.width;
a.height=this._restoreRect.height;
}else{a.width=this.get_width();
a.height=this.get_height();
}}this._restoreRect=a;
},_restoreBounds:function(){if(!this._restoreRect){return;
}var a=this._restoreRect;
this.setSize(a.width,a.height);
this.moveTo(a.x,a.y);
if(this._dockMode){this.setWidthDockMode(a.width);
this.setHeightDockMode(a.height);
}},_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect;
}},_deleteStoredBounds:function(){this._restoreRect=null;
},_getCurrentBounds:function(){var c=(this._popupElement.style.display=="none")?true:false;
this._popupElement.style.display="";
if(this._firstShow!=true){this._updateWindowSize(this._height);
this._firstShow=true;
}var a=$telerik.getBounds(this._popupElement);
if(c){this._popupElement.style.display="none";
}var b=this._getRestrictionZoneBounds();
if(b){a.x-=b.x;
a.y-=b.y;
}return a;
},_getCentralBounds:function(){var a=this._getCurrentBounds();
var c=this._getViewportBounds();
var d=parseInt((c.width-a.width)/2);
var b=parseInt((c.height-a.height)/2);
a.x=d+c.scrollLeft;
a.y=b+c.scrollTop;
return a;
},_getViewportBounds:function(){var d=this._getRestrictionZoneBounds();
if(d){return d;
}var a=$telerik.getClientBounds();
var b=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body);
var c=document.documentElement.scrollTop||document.body.scrollTop;
a.scrollLeft=b;
a.scrollTop=c;
if(this.isIE){if(a.width==0){a.width=document.body.clientWidth;
}if(a.height==0){a.height=document.body.clientHeight;
}}return a;
},_getCalculatedPopupBounds:function(){var c=this._getStoredBounds();
if(c){return c;
}var d=this._getCurrentBounds();
var e=this._offsetElement;
if(!this._top&&!this._left&&!e){d=this._getCentralBounds();
}else{if(e){d.y=0;
d.x=0;
}else{var b=this._getViewportBounds();
d.x=b.scrollLeft;
d.y=b.scrollTop;
}var f=this._left?this._left:0;
d.x+=f;
var a=this._top?this._top:0;
d.y+=a;
}return d;
},_checkRestrictionZoneBounds:function(c,a){var b=c;
if(!b){b=this._getRestrictionZoneBounds();
if(!b){return true;
}}return Telerik.Web.UI.ResizeExtender.containsBounds(b,a);
},_reSetWindowPosition:function(){var a=this._getCalculatedPopupBounds();
this._setPopupVisible(a.x,a.y);
},_fixIeHeight:function(a,b){if("CSS1Compat"==document.compatMode){var d=(a.offsetHeight-parseInt(b));
if(d>0){var c=(parseInt(a.style.height)-d);
if(c>0){a.style.height=c+"px";
}}}},_setPopupVisible:function(a,b){var c=this._getRestrictionZoneBounds();
if(c){a+=c.x;
b+=c.y;
}this._popupBehavior._setCoordinates(a,b);
this._popupBehavior.show();
if(!this.get_width()){this._popupElement.style.width="";
}this._updateTitleWidth();
},_createDefaultTable:function(){var a=document.createElement("TABLE");
a.align="left";
a.cellSpacing=0;
a.cellPadding=0;
a.insertRow(-1);
return a;
},_isWindowRightToLeft:function(){var b=this._isRightToLeft;
if(b==null){var a=this.get_element();
var c=a.parentNode?a:this._getDefaultParent();
b=this._isRightToLeft=$telerik.isRightToLeft(c);
}return b;
},_createStatusbarResizer:function(a){var b=a.rows[0].insertCell(-1);
b.style.width="15px";
var c=document.createElement("DIV");
b.appendChild(c);
this._bottomResizer=c;
},_createStatusbarMessageCell:function(a){var b=a.rows[0].insertCell(-1);
b.style.width="100%";
var c=this._getStatusMessageElement();
b.appendChild(c);
},_createUI:function(){if(!this._popupElement){var c=this.get_id();
var b="RadWindowWrapper_"+c;
var o=this._isWindowRightToLeft();
var e=document.createElement("DIV");
e.id=b;
e.className=this._getFullSkinName();
if(o){Sys.UI.DomElement.addCssClass(e,"RadWindow_rtl");
}e.style.width=this._width;
e.style.height=this._height;
e.setAttribute("unselectable","on");
this._popupElement=e;
var d=document.createElement("TABLE");
d.cellSpacing=0;
d.cellPadding=0;
this._tableElement=d;
var v=[];
if(o){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 n=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"];
var m=0;
for(var k=0;
k<4;
k++){var u=d.insertRow(-1);
u.className=n[k];
for(var l=1;
l<=3;
l++){var g=u.insertCell(-1);
g.innerHTML="&nbsp;";
g.className=classNames[m];
m++;
}}var t=d.rows[0].cells[1];
t.innerHTML="";
this._titleCell=t;
var s=document.createElement("DIV");
s.className="rwTopResize";
s.innerHTML="<!-- / -->";
this._topResizer=s;
this._titleCell.appendChild(this._topResizer);
var h=this._createDefaultTable();
h.className="rwTitlebarControls";
this._titlebarElement=h;
this._titleCell.appendChild(this._titlebarElement);
var p=this._getTitleIcon();
var y=this._titlebarElement.rows[0].insertCell(-1);
y.appendChild(p);
var z=this._getTitleElement();
var t=this._titlebarElement.rows[0].insertCell(-1);
t.appendChild(z);
this.set_title(this._title);
var f=this._titlebarElement.rows[0].insertCell(-1);
f.noWrap=true;
f.style.whiteSpace="nowrap";
f.appendChild(this._getTitleCommandButtonsHolder());
var q=d.rows[1].cells[1];
q.vAlign="top";
q.innerHTML="";
this._contentCell=q;
var w=this.get_name();
var a=this._createDefaultTable();
a.style.width="100%";
this._statusCell=d.rows[2].cells[1];
this._statusCell.innerHTML="";
this._statusCell.appendChild(a);
if(o){this._createStatusbarResizer(a);
this._createStatusbarMessageCell(a);
}else{this._createStatusbarMessageCell(a);
this._createStatusbarResizer(a);
}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._dockMode){var x=$get(this.get_id()+"_C");
if(x&&x.innerHTML){x.style.overflow="auto";
x.style.border="0px";
this.set_contentElement(x);
this.setWidthDockMode(this.get_width());
this.setHeightDockMode(this.get_height());
}}else{var r=($telerik.isIE)?document.createElement("<iframe name='"+w+"'>"):document.createElement("iframe");
r.name=w;
r.src="javascript:'<html></html>';";
r.style.width="100%";
r.style.height="100%";
r.style.border="0px";
r.frameBorder="0";
if($telerik.isIE8){r.style.display="block";
}this._iframe=r;
this._contentCell.appendChild(this._iframe);
}if(!this._dockMode){this._createBackReference();
}}this._updateOpacity();
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 a=this._formID?document.getElementById(this._formID):null;
if(!a){if(document.forms&&document.forms.length>0){a=document.forms[0];
}else{a=document.body;
}}return a;
},_getStatusMessageElement:function(){if(null==this._statusMessageElement){var a=document.createElement("INPUT");
a.readOnly="readonly";
a.setAttribute("unselectable","on");
this._statusMessageElement=a;
}return this._statusMessageElement;
},_getTitleCommandButtonsHolder:function(){if(null==this._buttonsElement){var a=document.createElement("UL");
a.className="rwControlButtons";
this._buttonsElement=a;
}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 a=document.createElement("A");
this._titleIconElement=a;
a.className="rwIcon";
if(this.get_iconUrl()){a.style.background="transparent url("+this.get_iconUrl()+") no-repeat scroll 0px 0px";
}}return this._titleIconElement;
},_getTitleCommandButton:function(b){if(!b||!this._buttonsArray){return null;
}var a=b.toLowerCase();
a=a.charAt(0).toUpperCase()+a.substring(1);
b="rw"+a+"Button";
var e=this._buttonsArray.length;
for(var d=0;
d<e;
d++){var c=this._buttonsArray[d];
if(c&&Sys.UI.DomElement.containsCssClass(c,b)){return c;
}}return null;
},_updateTitleWidth:function(){if(this._visibleTitlebar){var d=this._getTitleElement();
if(!d){return;
}d.style.width="20px";
var f=0;
var b=this._getTitleCommandButtonsHolder();
var h=b.offsetWidth;
if(h>0){var e=b.getElementsByTagName("LI");
if(e[0]&&e[0].offsetWidth>0){h=e.length*e[0].offsetWidth;
}b.style.width=h+"px";
f+=h;
}var a=this._getTitleIcon();
var g=a.offsetWidth;
if(g>0&&a.parentNode.tagName=="TD"){a.parentNode.style.width=g+"px";
f+=g;
}if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Pin)){d.style.width="";
return;
}try{d.style.width=(this._titlebarElement.offsetWidth-f-10)+"px";
}catch(c){return false;
}}},_addWindowToDocument:function(){var a=this._getDefaultParent();
a.insertBefore(this._popupElement,a.firstChild);
},_createBackReference:function(){var a=this;
if(!a.Argument){a.Argument={};
}var b=this._iframe;
try{b.radWindow=a;
if(b.contentWindow!=null){b.contentWindow.radWindow=a;
}}catch(c){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this._skin+" rwNormalWindow rwTransparentWindow";
},_configureMinimizeButton:function(c){var a=this._getLocalization();
var b=(true==c)?a.Restore:a.Minimize;
var d=(true==c)?this.restore:this.minimize;
this._registerTitlebarHandlersButton("Minimize",b,d);
},_configureMaximizeButton:function(c){var a=this._getLocalization();
var b=(true==c)?a.Restore:a.Maximize;
var d=(true==c)?this.restore:this.maximize;
this._registerTitlebarHandlersButton("Maximize",b,d);
},_registerTitlebarHandlersButton:function(e,d,c){var a=this._getTitleCommandButton(e);
if(a){var b=this._getLocalization();
a.setAttribute("title",d);
a.innerHTML=d;
$clearHandlers(a);
$addHandlers(a,{click:c},this);
$addHandler(a,"dblclick",this._cancelEvent);
$addHandler(a,"mousedown",this._cancelEvent);
}},isCloned:function(){return this._isCloned;
},isBehaviorEnabled:function(a){return a&this._behaviors?true:false;
},isInitialBehaviorEnabled:function(a){return a&this._initialBehaviors?true:false;
},setVisible:function(a){if(this._popupBehavior){if(a){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 a=this._getTitleCommandButton("Pin");
return(a&&Sys.UI.DomElement.containsCssClass(a,"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 b=$get(this.get_minimizeZoneID());
if(b){if(this.isPinned()){this._isPinned=true;
this.togglePin();
}var a=this._popupElement;
if(a.parentNode!=b){a.parentNode.removeChild(a);
b.appendChild(a);
this.setVisible(true);
a.style.position="static";
if(this.isIE){a.style.display="inline";
}else{a.style.cssFloat="left";
}}}},_moveToDocument:function(){var a=this._popupElement;
a.parentNode.removeChild(a);
a.style.position="absolute";
if(this.isIE){a.style.display="";
}else{a.style.cssFloat="";
}this._addWindowToDocument();
if(this._isPinned){this._isPinned=false;
this.togglePin();
}},minimize:function(){if(!this.isCreated()){return;
}var a=this.onCommand("Minimize");
if(!a){return;
}if(this.isMaximized()){this._normalizeWindowRootCss();
this._restoreBounds();
}var b=this._popupElement;
$telerik.removeCssClasses(b,["rwNormalWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(b,"rwMinimizedWindow");
var c=b._hideWindowedElementsIFrame;
if(c){Sys.UI.DomElement.addCssClass(c,"rwMinimizedWindowOverlay_"+this._skin);
}this._configureMinimizeButton(true);
this._enablePageScrolling(true);
this._getTitleElement().style.width="";
if(this.get_minimizeZoneID()){this._moveToMinimizeZone();
}},restore:function(){if(!this.isCreated()||this.isClosed()){return;
}var a=this.onCommand("Restore");
if(!a){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 a=this.onCommand("Maximize");
if(!a){return;
}this._storeBounds();
if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument();
}if(this.isMinimized()){this._normalizeWindowRootCss();
this._checkRestrictionZoneBounds=function(){return true;
};
this._restoreBounds();
this._checkRestrictionZoneBounds=Telerik.Web.UI.RadWindow.prototype._checkRestrictionZoneBounds;
}var b=this._popupElement;
$telerik.removeCssClasses(b,["rwNormalWindow","rwMinimizedWindow"]);
Sys.UI.DomElement.addCssClass(b,"rwMaximizedWindow");
this._configureMaximizeButton(true);
this._configureMinimizeButton();
this._maintainMaximizedSize();
this._maintainMaximizedSize();
var d=b._hideWindowedElementsIFrame;
if(d){$telerik.removeCssClasses(d,["rwMinimizedWindowOverlay_"+this._skin]);
this._popupBehavior._handleElementResize();
}if(!this.isActive()){this.setActive(true);
}if(!this._getRestrictionZoneBounds()){var c=b.style.zIndex;
if(c){this._restoreZindex=c;
}b.style.zIndex=100000;
}},setActive:function(b){var a=this._popupElement;
if(!b){Sys.UI.DomElement.addCssClass(a,"rwInactiveWindow");
}else{if(!this.isMaximized()){var d=parseInt(a.style.zIndex);
var c=(this._stylezindex)?this._stylezindex:Telerik.Web.UI.RadWindowUtils.get_newZindex(d);
a.style.zIndex=""+c;
}this._getWindowController().set_activeWindow(this);
this.raiseEvent("activate",new Sys.EventArgs());
if(this.isActive()){return;
}$telerik.removeCssClasses(a,["rwInactiveWindow"]);
}},togglePin:function(){if(!this.isCreated()){return;
}var a=this.onCommand("Pin");
if(!a){return;
}var c=this._getTitleCommandButton("Pin");
var b=this._getLocalization();
var e=this.isPinned();
var d=e?b.PinOn:b.PinOff;
if(c){Sys.UI.DomElement.toggleCssClass(c,"on");
}this._registerTitlebarHandlersButton("Pin",d,this.togglePin);
Telerik.Web.UI.RadWindowUtils.setPinned(!e,this);
},reload:function(){if(!this.isCreated()){return;
}var a=this.onCommand("Reload");
if(!a){return;
}if(!this._iframe){return;
}this._onWindowUrlChanging();
try{this._iframe.contentWindow.location.reload();
}catch(b){this._onWindowUrlChanged();
}},_normalizeWindowRootCss:function(){var a=this._popupElement;
if(a){$telerik.removeCssClasses(a,["rwMinimizedWindow","rwMaximizedWindow"]);
Sys.UI.DomElement.addCssClass(a,"rwNormalWindow");
var b=a._hideWindowedElementsIFrame;
if(b){$telerik.removeCssClasses(b,["rwMinimizedWindowOverlay_"+this._skin]);
}}},close:function(b){if(this.isClosed()){return;
}var c=new Sys.CancelEventArgs();
this.raiseEvent("beforeClose",c);
if(c.get_cancel()){return;
}this.hide();
var a=new Sys.EventArgs();
a._argument=(b&&!(b instanceof Sys.UI.DomEvent))?b:null;
a.get_argument=function(){return this._argument;
};
this.raiseEvent("close",a);
this._enablePageScrolling(true);
this._normalizeWindowRootCss();
if(b instanceof Sys.UI.DomEvent){b=null;
}this._invokeDialogCallBackFunction(b);
if(this._destroyOnClose&&!this._dockMode){this.dispose();
}},_invokeDialogCallBackFunction:function(a){var b=this.get_clientCallBackFunction();
if(b){if("string"==typeof(b)){b=eval(b);
}if("function"==typeof(b)){b(this,a);
}}},onCommand:function(a){var b=new Sys.CancelEventArgs();
b._commandName=a;
b.get_commandName=function(){return this._commandName;
};
this.raise_command(b);
if(b.get_cancel()){return false;
}return true;
},setUrl:function(a){if(this._dockMode){return;
}this._createUI();
this._navigateUrl=a;
var b=a;
if(this._reloadOnShow){b=this._getReloadOnShowUrl(b);
}this._iframe.src=b;
this._onWindowUrlChanging();
if(!this._loaded){this._registerIframeLoadHandler(true);
}this._loaded=true;
},_registerChildPageHandlers:function(b){var a=null;
try{a=this._iframe.contentWindow.document;
if(a.domain!=document.domain){return;
}}catch(c){return;
}if(null==a){return;
}if(b){this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload);
if(this.isIE){a.onunload=this._onChildPageUnloadDelegate;
}else{this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate;
}this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick);
$telerik.addExternalHandler(a,"click",this._onChildPageClickDelegate);
}else{if(this._onChildPageClickDelegate){$telerik.removeExternalHandler(a,"click",this._onChildPageClickDelegate);
this._onChildPageClickDelegate=null;
}}},_onChildPageUnload:function(a){this._registerChildPageHandlers(false);
},_onChildPageClick:function(a){if(!this.isVisible()||this.isClosed()){return;
}var b=a.target?a.target:a.srcElement;
if(b){if(b.tagName=="INPUT"&&b.type=="button"){return;
}else{if(b.tagName=="BUTTON"||b.tagName=="A"){return;
}}}this.setActive(true);
},_onIframeLoad:function(){this._onWindowUrlChanged();
this._registerChildPageHandlers(true);
this.raiseEvent("pageLoad",new Sys.EventArgs());
if(this.get_autoSize()){var a=this.get_animation()!=Telerik.Web.UI.WindowAnimation.None;
this.autoSize(a);
}var c=null;
try{c=this._iframe.contentWindow;
var b=c.document;
}catch(d){return false;
}c.close=Function.createDelegate(this,function(){this.close();
});
},_onWindowUrlChanging:function(){var d=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||d){var b=this._getStatusMessageElement();
if(b){Sys.UI.DomElement.addCssClass(b,"rwLoading");
}}else{var a=this._iframe.style;
a.position="absolute";
a.top="-10000px";
a.left="-10000px";
var c=this._iframe.parentNode;
Sys.UI.DomElement.addCssClass(c,"rwLoading");
}},_onWindowUrlChanged:function(){var b=this._getStatusMessageElement();
var c=$telerik.isRightToLeft(this._iframe);
if(this._showContentDuringLoad||c){if(b){Sys.UI.DomElement.removeCssClass(b,"rwLoading");
}}else{this._iframe.style.position="";
var a=this._iframe.parentNode;
Sys.UI.DomElement.removeCssClass(a,"rwLoading");
}if(b){this.set_status(this._navigateUrl);
}try{if(this._iframe.contentWindow.document.title){this.set_title(this._iframe.contentWindow.document.title);
}}catch(d){}},_updatePopupZindex:function(){if(this._popupBehavior){if(this.isVisible()){this._popupBehavior.show();
}}},_updateOpacity:function(){var b=this._dockMode?this.get_contentElement():this.get_contentFrame();
if(b){if(this._opacity<100){this._contentCell.style.background="none transparent";
var a=b.style;
a.filter="alpha(opacity="+this._opacity+")";
a.opacity=(this._opacity/100);
}else{this._contentCell.style.background="";
if($telerik.isIE){this._contentCell.removeAttribute("style");
}b.style.filter="";
b.style.opacity="";
}}},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(a){if(this._minimizeZoneID!=a){this._minimizeZoneID=a;
}},get_restrictionZoneID:function(){return this._restrictionZoneID;
},set_restrictionZoneID:function(a){if(this._restrictionZoneID!=a){this._restrictionZoneID=a;
}},get_minimizeIconUrl:function(){return this._minimizeIconUrl;
},set_minimizeIconUrl:function(a){if(this._minimizeIconUrl!=a){this._minimizeIconUrl=a;
}},get_iconUrl:function(){return this._iconUrl;
},set_iconUrl:function(a){if(this._iconUrl!=a){this._iconUrl=a;
}},get_clientCallBackFunction:function(){return this._clientCallBackFunction;
},set_clientCallBackFunction:function(a){if(this._clientCallBackFunction!=a){this._clientCallBackFunction=a;
}},get_navigateUrl:function(){return this._navigateUrl;
},set_navigateUrl:function(a){if(this._navigateUrl!=a){this._navigateUrl=a;
}},get_targetControl:function(){return this._openerElement;
},set_targetControl:function(a){if(this._openerElement!=a){this._openerElement=a;
}},get_name:function(){return this._name;
},set_name:function(a){if(this._name!=a){this._name=a;
}},get_formID:function(){return this._formID;
},set_formID:function(a){if(this._formID!=a){this._formID=a;
}},get_offsetElementID:function(){return this._offsetElementID;
},set_offsetElementID:function(a){if(this._offsetElementID!=a){this._offsetElementID=a;
}if(this.isVisible()){this._deleteStoredBounds();
this._offsetSet=false;
this._show();
}},get_openerElementID:function(){return this._openerElementID;
},set_openerElementID:function(a){if(this._openerElementID!=a){if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false);
this._openerElement=null;
}this._openerElementID=a;
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(a){if(this._left!=a){this._left=parseInt(a);
}},get_top:function(){return this._top;
},set_top:function(a){if(this._top!=a){this._top=parseInt(a);
}},get_title:function(){return this._title;
},set_title:function(a){if(this._title!=a){this._title=a;
}if(null==this._titleElement){return;
}this._titleElement.innerHTML=this._title;
this._updateTitleWidth();
},get_width:function(){return parseInt(this._width);
},_fixSizeValue:function(a){a=""+a;
if(-1==a.indexOf("px")){a=parseInt(a);
if(!isNaN(a)){a=a+"px";
}else{a="";
}}return a;
},set_width:function(a){if(null==a){return false;
}if(this.isMaximized()){return false;
}a=this._fixSizeValue(a);
var c=this._popupElement;
if(c){var b=$telerik.getBounds(c);
var e=parseInt(a);
if(isNaN(e)){e=b.width;
}var d=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(b.x,b.y,e,b.height));
if(!d){return false;
}}if(this._width!=a){this._width=a;
}if(this._dockMode){this.setWidthDockMode(this.get_width());
}if(c){this._deleteStoredBounds();
c.style.width=this._width;
this._updatePopupZindex();
}return true;
},get_height:function(){return parseInt(this._height);
},set_height:function(a){if(null==a){return false;
}if(this.isMaximized()){return false;
}a=this._fixSizeValue(a);
var c=this._popupElement;
if(c){var b=$telerik.getBounds(c);
var d=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(b.x,b.y,b.width,parseInt(a)));
if(!d){return false;
}}if(this._height!=a){this._height=a;
}if(this._dockMode){this.setHeightDockMode(this.get_height());
}if(c){this._deleteStoredBounds();
this._updateWindowSize(this._height);
this._updatePopupZindex();
}return true;
},_updateWindowSize:function(d,a){var c=this._tableElement;
var b=d?d:c.style.height;
if(true==a){b=c.offsetHeight+"px";
}if(parseInt(b)==0){return;
}c.style.height=b;
this._fixIeHeight(c,b);
c.parentNode.style.height=b;
},get_initialBehaviors:function(){return this._initialBehaviors;
},set_initialBehaviors:function(a){if(this._initialBehaviors!=a){this._initialBehaviors=a;
}},get_behaviors:function(){return this._behaviors;
},set_behaviors:function(e){if(this._behaviors!=e){this._behaviors=e;
}if(null==this._titlebarElement){return;
}this._enableMoveResize(false);
this._enableMoveResize(true);
if(this._buttonsArray&&this._buttonsArray.length>0){var m=this._buttonsArray.length;
for(var b=0;
b<m;
b++){var d=this._buttonsArray[b];
$clearHandlers(d);
}this._buttonsArray=[];
var g=this._getTitleCommandButtonsHolder();
g.innerHTML="";
}if(Telerik.Web.UI.WindowBehaviors.None==this._behaviors){return;
}else{var f=this._getLocalization();
var h=Telerik.Web.UI.WindowBehaviors;
var k=[[this.isBehaviorEnabled(h.Pin),"rwPinButton",f.PinOn,this.togglePin],[this.isBehaviorEnabled(h.Reload),"rwReloadButton",f.Reload,this.reload],[this.isBehaviorEnabled(h.Minimize),"rwMinimizeButton",f.Minimize,this.minimize],[this.isBehaviorEnabled(h.Maximize),"rwMaximizeButton",f.Maximize,this.maximize],[this.isBehaviorEnabled(h.Close),"rwCloseButton",f.Close,this.close]];
for(var a=0;
a<k.length;
a++){var c=k[a];
if(!c[0]){continue;
}var n=document.createElement("LI");
var o=document.createElement("A");
o.href="javascript:void(0);";
o.className=c[1];
o.setAttribute("title",c[2]);
var l=document.createElement("SPAN");
l.innerHTML=c[2];
o.appendChild(l);
$addHandlers(o,{click:c[3],dblclick:this._cancelEvent,mousedown:this._cancelEvent},this);
$addHandler(o,"click",this._cancelEvent);
n.appendChild(o);
this._buttonsElement.appendChild(n);
this._buttonsArray[this._buttonsArray.length]=o;
}}},get_modal:function(){return this._modal;
},set_modal:function(a){if(this._modal!=a){this._modal=a;
}this._makeModal(this._modal);
if(this.isVisible()){this._afterShow();
}},get_destroyOnClose:function(){return this._destroyOnClose;
},set_destroyOnClose:function(a){if(this._destroyOnClose!=a){this._destroyOnClose=a;
}},get_reloadOnShow:function(){return this._reloadOnShow;
},set_reloadOnShow:function(a){if(this._reloadOnShow!=a){this._reloadOnShow=a;
}},get_showContentDuringLoad:function(){return this._showContentDuringLoad;
},set_showContentDuringLoad:function(a){if(this._showContentDuringLoad!=a){this._showContentDuringLoad=a;
}},get_visibleOnPageLoad:function(){return this._visibleOnPageLoad;
},set_visibleOnPageLoad:function(a){if(this._visibleOnPageLoad!=a){this._visibleOnPageLoad=a;
}},get_visibleTitlebar:function(){return this._visibleTitlebar;
},set_visibleTitlebar:function(a){if(this._visibleTitlebar!=a){this._visibleTitlebar=a;
}if(this._titlebarElement){this._titlebarElement.style.display=a?"":"none";
}},get_visibleStatusbar:function(){return this._visibleStatusbar;
},set_visibleStatusbar:function(a){if(this._visibleStatusbar!=a){this._visibleStatusbar=a;
}if(this._statusCell){this._statusCell.parentNode.style.display=a?"":"none";
}},get_animation:function(){return this._animation;
},set_animation:function(a){if(this._animation!=a){this._animation=a;
}},get_overlay:function(){return this._overlay;
},set_overlay:function(a){this._overlay=a;
if(this._popupBehavior){this._popupBehavior.set_overlay(this._overlay);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_opacity:function(){return this._opacity;
},set_opacity:function(a){if(this.get_opacity()!=a){this._opacity=a>100?100:a;
this._opacity=a<0?0:a;
if(this.isCreated()){this._updateOpacity();
}}},get_keepInScreenBounds:function(){return this._keepInScreenBounds;
},set_keepInScreenBounds:function(a){this._keepInScreenBounds=a;
if(this._popupBehavior){this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds);
}if(this.isVisible()){this._reSetWindowPosition();
}},get_autoSize:function(){return this._autoSize;
},set_autoSize:function(a){if(this._autoSize!=a){this._autoSize=a;
}},get_skin:function(){return this._skin;
},set_skin:function(a){if(a&&this._skin!=a){this._skin=a;
}},get_popupElement:function(){return this._popupElement;
},get_windowManager:function(){return this._windowManager;
},set_windowManager:function(a){this._windowManager=a;
},set_status:function(a){var b=this._getStatusMessageElement();
if(b){window.setTimeout(function(){b.value=a;
},0);
}},get_status:function(){var a=this._getStatusMessageElement();
if(a){return a.value;
}},add_command:function(a){this.get_events().addHandler("command",a);
},remove_command:function(a){this.get_events().removeHandler("command",a);
},raise_command:function(a){this.raiseEvent("command",a);
},add_dragStart:function(a){this.get_events().addHandler("dragStart",a);
},remove_dragStart:function(a){this.get_events().removeHandler("dragStart",a);
},add_dragEnd:function(a){this.get_events().addHandler("dragEnd",a);
},remove_dragEnd:function(a){this.get_events().removeHandler("dragEnd",a);
},add_activate:function(a){this.get_events().addHandler("activate",a);
},remove_activate:function(a){this.get_events().removeHandler("activate",a);
},add_beforeShow:function(a){this.get_events().addHandler("beforeShow",a);
},remove_beforeShow:function(a){this.get_events().removeHandler("beforeShow",a);
},add_show:function(a){this.get_events().addHandler("show",a);
},remove_show:function(a){this.get_events().removeHandler("show",a);
},add_pageLoad:function(a){this.get_events().addHandler("pageLoad",a);
},remove_pageLoad:function(a){this.get_events().removeHandler("pageLoad",a);
},add_close:function(a){this.get_events().addHandler("close",a);
},remove_close:function(a){this.get_events().removeHandler("close",a);
},add_beforeClose:function(a){this.get_events().addHandler("beforeClose",a);
},remove_beforeClose:function(a){this.get_events().removeHandler("beforeClose",a);
},add_resize:function(a){this.get_events().addHandler("resize",a);
},remove_resize:function(a){this.get_events().removeHandler("resize",a);
},saveClientState:function(){var c=["position"];
var a={};
for(var b=0;
b<c.length;
b++){a[c[b]]=this["get_"+c[b]]();
}return Sys.Serialization.JavaScriptSerializer.serialize(a);
}};
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(a){a=parseInt(a);
if(null==a||isNaN(a)){a=0;
}if(Telerik.Web.UI.RadWindowUtils._zIndex<a){Telerik.Web.UI.RadWindowUtils._zIndex=a;
}Telerik.Web.UI.RadWindowUtils._zIndex++;
return Telerik.Web.UI.RadWindowUtils._zIndex;
};
Telerik.Web.UI.RadWindowUtils._pinnedList={};
Telerik.Web.UI.RadWindowUtils.setPinned=function(c,f){if(c){var g=f._getViewportBounds();
var a=f._getCurrentBounds();
f.LeftOffset=a.x-g.scrollLeft;
f.TopOffset=a.y-g.scrollTop;
var b=window.setInterval(function(){Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition(f);
},100);
Telerik.Web.UI.RadWindowUtils._pinnedList[b]=f;
}else{var h=null;
var d=Telerik.Web.UI.RadWindowUtils._pinnedList;
for(var e in d){if(d[e]==f){h=e;
break;
}}if(null!=h){window.clearInterval(h);
Telerik.Web.UI.RadWindowUtils._pinnedList[h]=null;
}f.TopOffset=null;
f.LeftOffset=null;
}};
Telerik.Web.UI.RadWindowUtils._updatePinnedElementPosition=function(c){if(c.isMaximized()||!c.isVisible()){return;
}var a=c._getViewportBounds();
var e=c._getCurrentBounds();
var d=(c.LeftOffset!=null)?c.LeftOffset+a.scrollLeft:e.x;
var b=(c.TopOffset!=null)?c.TopOffset+a.scrollTop:e.y;
c.moveTo(d,b);
};

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();