function rwSetRadWindowCenter(n){rwSetRadWindowPosition(n);$(window).off("resize").resize(function(){rwSetRadWindowPosition(n)});n.add_close(function(){$(window).off("resize")})}function rwSetRadWindowPosition(n){n.get_popupElement().style.position="fixed";n.get_popupElement().style.height="inherit";var t=parseInt($(window).height()),i=parseInt(n.get_popupElement().offsetHeight||0),r=parseInt(t/2-i/2);n.get_popupElement().style.top=r+"px";var u=parseInt($(window).width()),f=parseInt(n.get_popupElement().offsetWidth||0),e=parseInt(u/2-f/2);n.get_popupElement().style.left=e+"px"}function rwSetRadWindowMaximize(n){n.add_command(function(n,t){var i=t.get_commandName();i==="Restore"&&setTimeout(function(){n.isClosed()||rwSetRadWindowPosition(n)},200)})}function GetRadWindow(){var n=null;return typeof radWindow!="undefined"&&(n=window.radWindow),n===null&&typeof GetRadWindowManager!="undefined"&&GetRadWindowManager()&&GetRadWindowManager().getActiveWindow&&(n=GetRadWindowManager().getActiveWindow()),n===null&&window.frameElement&&window.frameElement.radWindow&&(n=window.frameElement.radWindow),n}function rwSetRadWindowFullScreen(n){var t=n.get_contentFrame();t&&(t.setAttribute("webkitallowfullscreen","true"),t.setAttribute("mozallowfullscreen","true"),t.setAttribute("allowfullscreen","true"))}function rwFindParentSize(n){(typeof n=="undefined"||n===null)&&(n=window);n.innerWidth?theWidth=n.innerWidth:document.body?theWidth=n.document.body.clientWidth:document.documentElement&&document.documentElement.clientWidth&&(theWidth=n.document.documentElement.clientWidth);window.innerHeight?theHeight=n.innerHeight-10:document.body?theHeight=n.document.body.clientHeight:document.documentElement&&document.documentElement.clientHeight&&(theHeight=n.document.documentElement.clientHeight)}function rwResizeChild(){var i=window.onresize,t,n;window.onresize="";typeof GetRadWindowManager!="undefined"&&(t=GetRadWindowManager(),n=t.GetActiveWindow(),n&&rwSetWindowMaxArea(n));window.onresize=i}function rwSetWindowMaxArea(n){n&&(rwFindParentSize(),typeof rwMaxHeight!="undefined"&&theHeight>rwMaxHeight&&(theHeight=rwMaxHeight),typeof rwMaxWidth!="undefined"&&theWidth>rwMaxWidth&&(theWidth=rwMaxWidth),n.set_height(theHeight-30),n.set_width(theWidth-40),rwSetRadWindowCenter(n))}function rwSetWindowMaxAreaToVGA(n){n&&(rwFindParentSize(),typeof rwMaxHeight!="undefined"&&theHeight>rwMaxHeight&&(theHeight=rwMaxHeight),typeof rwMaxWidth!="undefined"&&theWidth>rwMaxWidth&&(theWidth=rwMaxWidth),theHeight>480&&(theHeight=480),theWidth>640&&(theWidth=640),n.set_height(theHeight-30),n.set_width(theWidth-40),rwSetRadWindowCenter(n))}function rwResizeToVGA(){var n=GetRadWindow();n&&n.isVisible()&&(n.set_height(480),n.set_width(640),rwSetRadWindowCenter(n))}function rwResizeWindow(n,t){var i=GetRadWindow();i&&i.isVisible()&&(i.set_height(t),i.set_width(n),rwSetRadWindowCenter(i))}function rwResizeContentArea(n){var t=document.getElementById(n);t&&(rwFindParentSize(),t.style.height=theHeight-rwGetTop(t))}function rwFitToWindow(n){rwClearWindowArgs(n);rwSetRadWindowFullScreen(n);rwResizeChild();setTimeout(function(){window.onresize=rwResizeChild},200)}function rwNormalWindow(n){rwClearWindowArgs(n);rwSetRadWindowFullScreen(n);rwSetRadWindowCenter(n);setTimeout(function(){window.onresize=""},200)}function rwNoScroll(){document.body.scroll="no";document.body.style.overflow="hidden"}function rwOpenRadWindow(n,t,i,r,u,f){var e=$find(n);if(e)return e.setUrl(t),i&&r&&(i==-1&&r==-1?rwSetWindowMaxArea(e):i!=0&&r!=0&&e.setSize(i,r)),u&&e.set_title(u),f&&e.set_status(f),e.show(),rwSetRadWindowMaximize(e),rwSetRadWindowCenter(e),e;alert("rwOpenRadWindow: WindowID "+n+" not found!")}function rwGetWindowByName(n){for(var u,i=Sys.Application.getComponents(),r=null,t=0;tr?(shouldSkip=!0,rcPopupAbove(n)):window[n].ShowPopup(),!1}function rcGetCalendarHeight(n){var t=window[n],i=t.GetPopupContainer(),r=t.GetElementDimensions(i);return r.height}function rcGetElementPosition(n){var t=window[n],i=t.GetTextBox();return t.GetElementPosition(i)}function rcPopupAbove(n){var i=window[n],r=rcGetCalendarHeight(n),t=rcGetElementPosition(n);i.ShowPopup(t.x,t.y-r)}function rtHasNodesChecked(n){for(var t=0;t0&&rtUpdateChildrenNodes(n[i].Nodes,t)}var theWidth,theHeight,rwExCurrentCTRL