function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "CSS\x31\103\x6fm\x70a\x74"!=document.compatMode); this.Id=id; this.Width=0; this.Height=0; this.OnClientClosing=null; this.ContentWindow=null; this.ContentWrapperTable=null; this.Caption=null; this.X=0; this.Y=0; this.ShowContentWhenMoving= true; this.CanMove= true; this.CanResize= true; this.DragMode=""; this.IsModal= false; this.Container=null; this.Parent=null; this.Argument=null; this.ReturnValue=null; this.ExitCode=null; this.ZIndex=0; this.AdjustPosInterval=-1; this.CallbackFunc=null; this.OnLoadFunc=null; this.Param=null; this.ModalSetCapture= false; this.UseRadWindow= true; this.Window=null; this.InnerHTML=null; this._overImage=null; }RadWindow.prototype.OnLoad= function ( ){if (this.Window && ""!=this.Window.document.title){ this.SetCaption(this.Window.document.title); }if (this.OnLoadFunc){ this.OnLoadFunc( ); }};RadWindow.prototype.SetCapture= function (bContainerCapture){if (this.UseRadWindow){if (null!=bContainerCapture){ this.bContainerCapture=bContainerCapture; }else if (null!=this.bContainerCapture){bContainerCapture=this.bContainerCapture; }else {bContainerCapture= false; }if (this.ModalSetCapture && this.IsIE){ this.ContentWrapperTable.setCapture(bContainerCapture); }}};RadWindow.prototype.ReleaseCapture= function ( ){if (this.UseRadWindow){if (this.ModalSetCapture && this.IsIE){if (this.ContentWrapperTable)this.ContentWrapperTable.releaseCapture( ); }}};RadWindow.prototype.SetZIndex= function (zIndex){ this.ZIndex=zIndex; if (this.ContentWrapperTable){ this.ContentWrapperTable.style.zIndex=this.ZIndex; }};RadWindow.prototype.ToggleContent= function ( ){if (this.UseRadWindow && this.IsIE){var displayStyle=""; if (parseInt(this.Height)==parseInt(this.ContentWrapperTable.style.height)){ this.SetHeight(0); displayStyle="\x6e\x6fne"; }else { this.SetHeight(this.Height); displayStyle="inl\x69n\x65"; }}};RadWindow.prototype.IsVisible= function ( ){if (this.ContentWrapperTable){return this.ContentWrapperTable.style.display==""; }return false; };RadWindow.prototype.ShowWindow= function (show,x,y){if (null==show){show= true; }var displayStyle=show?"": "\x6e\x6fne"; if (this.ContentWrapperTable){ this.ContentWrapperTable.style.display=displayStyle; }if (show){if (null!=x && null!=y){x+=10; if (this.ContentWrapperTable){ this.ContentWrapperTable.style.left=x+'px'; this.ContentWrapperTable.style.top=y+'p\x78'; }}}if (this.Parent){ this.Parent.OnShowWindow(this,show); }};RadWindow.prototype.Initialize2= function (contentElem,show,containerElem,modal,zIndex){ this.Initialize(contentElem,show); this.IsModal=modal; this.Container=containerElem; this.SetZIndex(zIndex); };RadWindow.prototype.Initialize= function (contentElem,show){if (this.Id){ this.ContentWrapperTable=document.getElementById("RadWi\x6e\x64owCo\x6eten\x74Wra\x70p\x65r"+this.Id); this.ContentWindow=document.getElementById("\x52a\x64Wind\x6fwCo\x6eten\x74Wi\x6edow"+this.Id); this.Caption=document.getElementById("\x52\x61dWind\x6fwCa\x70tio\x6e"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("No\x20w\x69ndow\x20Id \x70rov\x69de\x64"); }} ; RadWindow.prototype.SetContentWindowSize= function (width,height){ this.Width=width; this.Height=height; } ; RadWindow.prototype.SetContentVisible= function (visible){if (this.ContentWindow){ this.ContentWindow.style.visibility=visible?"\166isi\x62le": "hidde\x6e"; }} ; RadWindow.prototype.Close= function (exitCode,dialogCallbackFunction,execCallBack){if (null!=this.OnClientClosing && (this.OnClientClosing(exitCode)== false)){return; } this.ShowWindow( false); this.ExitCode=exitCode; if (this.AdjustPosInterval>-1){window.clearInterval(this.AdjustPosInterval); this.AdjustPosInterval=-1; }if (this.IsModal)this.ReleaseCapture( ); try {if (this.CallbackFunc && false !=execCallBack)this.CallbackFunc(this.ReturnValue,this.Param); if (dialogCallbackFunction){dialogCallbackFunction(this.ReturnValue,this.Param); }}catch (ex){}if (this.Parent)this.Parent.DestroyWindow(this ); if (!this.UseRadWindow && this.Window)this.Window.close( ); } ; RadWindow.prototype.ToggleCanMove= function (oDiv){if (!this.UseRadWindow)return; this.CanMove=!this.CanMove; oDiv.className=this.CanMove?"\x52\x61d\x45RadW\x69nd\x6fwBu\x74ton\x50inO\x66f": "\x52a\x64ERad\x57ind\x6fwBu\x74to\x6ePin\x4fn"; if (!this.CanMove){if (this.IsIE){ this.TopOffset=parseInt(this.ContentWrapperTable.style.top)-RadGetScrollTop(document); this.StartUpdatePosTimer(100); }else { this.ContentWrapperTable.style.position="\x66\x69xe\x64"; }}else {if (this.IsIE){window.clearInterval(this.AdjustPosInterval); this.TopOffset=null; }else { this.ContentWrapperTable.style.position="a\x62s\x6flut\x65"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("Updat\x65W\x69ndo\x77Pos\x28\047"+this.Id+"\047)",iInterval); };function UpdateWindowPos(wndId){var wnd=GetEditorRadWindowManager( ).LookupWindow(wndId); if (wnd)wnd.SetPosition( ); }RadWindow.prototype.CanDrag= function ( ){if (!this.UseRadWindow)return true; return ("\x6d\x6fv\x65"==this.DragMode && this.CanMove) || ("s\x69z\x65"==this.DragMode && this.CanResize); };RadWindow.prototype.OnDragStart= function (e){ this.SetActive( true); if (!this.CanDrag( ))return; this.X=(e.offsetX==null)?e.layerX:e.offsetX; this.Y=(e.offsetY==null)?e.layerY:e.offsetY; MousePosX=e.clientX; MousePosY=e.clientY; this.SetContentVisible(this.ShowContentWhenMoving); RadWindowDragStart( ); } ; RadWindow.prototype.SetActive= function (activate){if (!this.UseRadWindow)return; if (activate){if (null!=RadWindowActiveWindow && RadWindowActiveWindow!=this )RadWindowActiveWindow.SetActive( false); RadWindowActiveWindow=this ; if (this.Parent)this.Parent.ActivateWindow(this ); }else {if (this ==RadWindowActiveWindow)RadWindowActiveWindow=null; }};RadWindow.prototype.HitTest= function (x,y){var left=parseInt(this.ContentWrapperTable.style.left); if (isNaN(left))return false; var top=parseInt(this.ContentWrapperTable.style.top); if (isNaN(top))return false; return left<=x && x<=(left+this.Width) && top<=y && y<=(top+this.Height); };RadWindow.prototype.SetPosition= function (left,top){if (!this.UseRadWindow){if (this.Window){ this.Window.dialogLeft=left; this.Window.dialogTop=top; }}else {if (!left)left=this.ContentWrapperTable.style.left; if (!top){if (this.TopOffset!=null)top=parseInt(this.TopOffset)+RadGetScrollTop(document); else top=this.ContentWrapperTable.style.top; }left=parseInt(left); top=parseInt(top); if (!isNaN(left) && !isNaN(top)){if (left<=0)left=0; if (top<=0)top=0; this.ContentWrapperTable.style.left=left+'\x70\170'; this.ContentWrapperTable.style.top=top+'\x70\x78'; }}};RadWindow.prototype.GetWidth= function ( ){var width=0; if (!this.UseRadWindow){if (this.Window)width=this.Window.dialogWidth; }else {if (this.IsIE){width=parseInt(this.ContentWrapperTable.clientWidth); }else {width=parseInt(this.ContentWrapperTable.scrollWidth); }if (isNaN(width))width=0; }return width; };RadWindow.prototype.SetWidth= function (width){width=parseInt(width); if (isNaN(width))return; if (!this.UseRadWindow){if (this.Window){if (this.Window.dialogWidth){ this.Window.dialogTop=this.Window.screenTop-30; this.Window.dialogLeft=this.Window.screenLeft-4; this.Window.dialogWidth=width+"p\x78"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"px"; }};RadWindow.prototype.GetHeight= function ( ){var height=0; if (!this.UseRadWindow){if (this.Window)height=this.Window.dialogHeight; }else {if (this.IsIE){height=parseInt(this.ContentWrapperTable.clientHeight); if (isNaN(height))height=0; }else {height=this.ContentWrapperTable.scrollHeight; }}return height; };RadWindow.prototype.SetHeight= function (height){height=parseInt(height); if (isNaN(height))return; if (!this.UseRadWindow){if (this.Window){if (this.Window.dialogWidth){ this.Window.dialogTop=this.Window.screenTop-30; this.Window.dialogLeft=this.Window.screenLeft-4; this.Window.dialogHeight=height+"px"; }else { this.Window.outerHeight=height; }}}else {var oTable=this.ContentWrapperTable; var oFirstTable=oTable.getElementsByTagName("\x54\101\x42L\x45")[0]; if (oFirstTable)oFirstTable.setAttribute("b\x6f\x72der","1"); this.ContentWrapperTable.style.height=height+"\x70\x78"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("\142ord\x65r","\x30"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "CSS1\x43o\x6dpat"==document.compatMode){var oHeight=oElem.offsetHeight; if (oHeight!=0 && oHeight!=height){var difference=(oHeight-height); var newHeight=(height-difference); if (newHeight>0){oElem.style.height=(newHeight+4)+"\x70\x78"; }}}} ; function RadWindowUnInitializeDrag(targetWindow){var oSpan=RadWindowActiveWindowSpan; targetWindow.SetPosition(oSpan.style.left,oSpan.style.top); var extra=targetWindow.IsQuirksMode?6: 0; extra+=targetWindow.IsIE?2: 0; extraHeight=extra; if (targetWindow.IsIE && !targetWindow.IsQuirksMode && extraHeight>0)extraHeight-=2; targetWindow.SetSize(extra+(oSpan.clientWidth?oSpan.clientWidth:oSpan.offsetWidth),extraHeight+(oSpan.clientHeight?oSpan.clientHeight:oSpan.offsetHeight)); if (RadWindowActiveWindowSpan)RadWindowActiveWindowSpan.style.visibility="\150idde\x6e"; }RadWindow.prototype.SetSize= function (width,height){if (!this.UseRadWindow && !document.all && this.Window && this.Window.resizeTo){ this.Window.resizeTo(width,height); }else { this.SetWidth(width); this.SetHeight(height); }if (width>0)this.Width=width; if (height>0)this.Height=height; };RadWindow.prototype.SetCaption= function (caption){if (this.Caption){ this.Caption.innerHTML=caption; }};var RadWindowActiveWindow=null; var RadWindowActiveWindowSpan=null; var MousePosX=0; var MousePosY=0; function RadWindowDragStart( ){if (!RadWindowActiveWindow.CanDrag( ))return; if (document.all && document.body.attachEvent){document.body.setCapture( ); document.body.attachEvent("\x6f\x6em\x6fuse\x6dove",RadWindowDrag); document.body.attachEvent("\x6f\x6emou\x73eup",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\x6d\x6fuse\x6dove",RadWindowDrag, false); document.addEventListener("\x6d\x6fuse\x75p",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("\x6f\x6emou\x73emo\x76e",RadWindowDrag); document.body.detachEvent("o\x6em\x6fuseup",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("mo\x75s\x65move",RadWindowDrag, false); document.removeEventListener("mouse\x75p",RadWindowDragEnd, false); }if (RadWindowActiveWindow.IsModal)RadWindowActiveWindow.SetCapture( ); RadWindowUnInitializeDrag(RadWindowActiveWindow); RadWindowActiveWindow.SetContentVisible( true); }function RadWindowDrag(e){if (RadWindowActiveWindow.CanDrag( )){switch (RadWindowActiveWindow.DragMode){case "\x6d\x6fve":RadWindowMove(e); break; case "s\x69z\x65":RadWindowSize(e); break; }}e.cancelBubble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); MousePosX=e.clientX; MousePosY=e.clientY; return false; }function RadWindowInitializeDrag(targetWindow){if (!targetWindow)return; if (!RadWindowActiveWindowSpan){RadWindowActiveWindowSpan=document.createElement("DIV"); RadWindowActiveWindowSpan.className="RadE\x54\x61bleW\x72app\x65rRe\x73i\x7aeS\x70an"; RadWindowActiveWindowSpan.style.position="ab\x73o\x6cute"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="\x76\x69sib\x6ce"; RadWindowActiveWindowSpan.style.top=targetWindow.ContentWrapperTable.style.top; RadWindowActiveWindowSpan.style.left=targetWindow.ContentWrapperTable.style.left; RadWindowActiveWindowSpan.style.width=parseInt(targetWindow.GetWidth( ))+"\x70\x78"; RadWindowActiveWindowSpan.style.height=parseInt(targetWindow.GetHeight( ))+"\x70\x78"; switch (targetWindow.DragMode){case "move":RadWindowActiveWindowSpan.style.cursor="def\x61u\x6ct"; break; case "\163ize":RadWindowActiveWindowSpan.style.cursor="se-r\x65s\x69ze"; break; }}function RadWindowMove(e){var RadWindowX=RadWindowActiveWindow.X; var RadWindowY=RadWindowActiveWindow.Y; var el=RadWindowActiveWindowSpan; var left=0; var top=0; if (document.all){left=e.clientX*1+RadGetScrollLeft(document)-RadWindowX; top=e.clientY*1+RadGetScrollTop(document)-RadWindowY; }else {left=e.pageX*1-RadWindowX; top=e.pageY*1-RadWindowY; }if (left<0){left=0; }if (top<0){top=0; }el.style.left=left+"\x70\x78"; el.style.top=top+"\x70x"; }var minWidth=155; var minHeight=43; function RadWindowSize(e){var offsetX=e.clientX-MousePosX; var offsetY=e.clientY-MousePosY; var oSpan=RadWindowActiveWindowSpan; var width=oSpan.clientWidth?oSpan.clientWidth:oSpan.offsetWidth; var height=oSpan.clientHeight?oSpan.clientHeight:oSpan.offsetHeight; if (document.all && !window.opera && "CS\x531\x43ompa\x74"!=document.compatMode){width=oSpan.offsetWidth; height=oSpan.offsetHeight; }width+=offsetX; height+=offsetY; if (width<minWidth)width=minWidth; if (height<minHeight)height=minHeight; RadWindowActiveWindowSpan.style.width=width+"\x70\x78"; RadWindowActiveWindowSpan.style.height=height+"px"; }function GetTopWindow( ){var topWindow=null; var argumentsContainParentWindow= false; try {if (window.dialogArguments.parentWindow && argumentsContainParentWindow){argumentsContainParentWindow= true; }}catch (ex){argumentsContainParentWindow= false; }if (window.dialogArguments!=null && argumentsContainParentWindow){topWindow=window.dialogArguments.parentWindow; }else if (window.opener && !document.all && window.isRadWindow){topWindow=opener; }else {topWindow=window; }var stopLoop= false; while (topWindow.parent && !stopLoop){try {topWindowTagName=topWindow.parent.tagName.toUpperCase( );}catch (exception){topWindowTagName=""; }if (topWindow.parent==topWindow){break; }try {if (topWindow.parent.document.domain!=window.document.domain){break; }}catch (exc){stopLoop= true; continue; }try {if (topWindow.frameElement!=null && (topWindow.frameElement.tagName!="\x49F\x52AME" || topWindow.frameElement.name!="\x52a\x64Wind\x6fwC\x6fnte\x6et")){break; }}catch (exc){alert('\x69\x6e the\x20Ex\x63epti\x6fn!'); stopLoop= true; }topWindow=topWindow.parent; }return topWindow; }function Document_OnFocus(e){if (!e){e=window.event; }GetEditorRadWindowManager( ).ActivateWindow( ); }function Document_OnKeyDown(e){if (!e){e=window.event; }return GetEditorRadWindowManager( ).OnKeyDown(e); }function RadWindowInfo( ){ this.IsIE=(null!=document.all); this.ID=null; this.Url=""; this.InnerHtml=""; this.InnerObject=null; this.Width=300; this.Height=200; this.Caption=""; this.IsVisible= true; this.Argument=null; this.CallbackFunc=null; this.OnLoadFunc=null; this.Param=null; this.Resizable= true; this.Movable= true; this.CloseHide= false; this.UseClassicDialogs= true; }function GetEditorRadWindowManager( ){var topWindow=GetTopWindow( ); if (!topWindow.radWindowManager){topWindow.radWindowManager=new RadEditorWindowManager( ); }return topWindow.radWindowManager; }function RadEditorWindowManager( ){ this.ChildWindows=new Array( ); this.ActiveWindow=null; this.TopWindowZIndex=10001; this.ContainerPool=new Array( ); this.IsIE=(null!=document.all) && (window.opera==null); this._overImage=null; if (document.body!=null){document.body.onfocus=Document_OnFocus; if (this.IsIE && document.body.attachEvent){document.body.attachEvent("\x6f\x6ek\x65ydo\x77n",Document_OnKeyDown); }else if (document.body.addEventListener){document.body.addEventListener("\x6be\x79down",Document_OnKeyDown, false); }}}RadEditorWindowManager.prototype.ShowModalWindow= function (radWindowInfo){var wnd=this.CreateWindow( true ,radWindowInfo); return wnd; };RadEditorWindowManager.prototype.ShowModallessWindow= function (radWindowInfo){var wnd=this.CreateWindow( false ,radWindowInfo); return wnd; };RadEditorWindowManager.prototype.CreateWindow= function (bIsModal,radWindowInfo){if (!radWindowInfo)return null; if (window.opera)radWindowInfo.UseClassicDialogs= true; var id=""; if (!radWindowInfo.ID || radWindowInfo.ID==""){id=this.ChildWindows.length; }else {id=radWindowInfo.ID; }var caption=""; if (null==radWindowInfo.Caption){caption="["+id+"\x5d"; }else {caption=radWindowInfo.Caption; }var radWindow=this.GetWindow(id); radWindow.Argument=radWindowInfo.Argument; radWindow.Width=radWindowInfo.Width; radWindow.Height=radWindowInfo.Height; radWindow.CallbackFunc=radWindowInfo.CallbackFunc; radWindow.Param=radWindowInfo.Param; radWindow.CanResize=radWindowInfo.Resizable; radWindow.CanMove=radWindowInfo.Movable; radWindow.OnLoadFunc=radWindowInfo.OnLoadFunc; radWindow.UseRadWindow=!radWindowInfo.UseClassicDialogs; if (radWindowInfo.UseClassicDialogs && this.IsIE){var features="stat\x75\x73:no;"+"resiz\x61b\x6ce:y\x65s;"+"ce\x6et\x65r:ye\x73;"+"\x68\x65lp:n\x6f;"+"\x6d\x69nimiz\x65:no\x3b"+"m\x61x\x69mize\x3ano;"+"\x73\x63roll:\x6eo;"+"bord\x65r\x3athin\x3b"+"sta\x74u\x73bar:\x6eo;"+"\x64\x69alo\x67Widt\x68:"+radWindowInfo.Width+"\x70\x78;"+"di\x61l\x6fgHeig\x68t:"+radWindowInfo.Height+"\x70\x78"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="j\x61\x76ascri\x70t:\x27\047"; var dialogArguments= {parentWindow:window,radWindow:radWindow,IsRadWindowArgs: true } ; window.showModalDialog(radWindowInfo.Url,dialogArguments,features); }else if (radWindowInfo.UseClassicDialogs && !this.IsIE){if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="java\x73c\x72ipt\x3a\047\047"; window.childRadWindow=radWindow; radWindow.Window=window.open(radWindowInfo.Url,"\x5f\x62l\x61nk","\x73t\x61tus=\x6eo,t\x6folba\x72=\x6eo,\x6coc\x61tio\x6e=n\x6f,r\x65s\x69z\x61bl\x65=\x79e\x73,\x6den\x75b\x61r\x3dn\x6f,\x77i\x64t\x68="+radWindowInfo.Width+",heig\x68t\x3d"+radWindowInfo.Height+"\x2c\x6do\x64al=y\x65s"); }else if (!radWindowInfo.UseClassicDialogs){var container=null; if (this.ContainerPool.length>0){container=this.ContainerPool.pop( ); }else {container=document.createElement("\x53P\x41N"); document.body.appendChild(container); }var oHtml=this.BuildWrapperTableHtml(id,radWindowInfo.Width,radWindowInfo.Height,caption,bIsModal,radWindowInfo.CloseHide); container.innerHTML=oHtml; var contentElem=(null!=radWindowInfo.InnerObject)?radWindowInfo.InnerObject:document.getElementById("R\x61\x64Windo\x77Con\x74ent\x46ra\x6de"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("\x52a\x64Wind\x6fwC\x6fnte\x6etFr\x61me"+id); radWindow.Window=null!=frm?frm.contentWindow:null; radWindow.Iframe=frm; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){var doc=frm.contentWindow.document; doc.open( ); doc.write(radWindowInfo.InnerHtml); doc.close( ); }else if (radWindowInfo.Url && radWindowInfo.Url!=""){frm.src=radWindowInfo.Url; }if (bIsModal){ this.SetCapture(radWindow, false); }if (null==radWindowInfo.IsVisible){radWindowInfo.IsVisible= false; }var windowStartPosition=this.GetWindowStartPosition(radWindowInfo); radWindow.SetSize(radWindowInfo.Width,radWindowInfo.Height); radWindow.ShowWindow(radWindowInfo.IsVisible,windowStartPosition.horizontal,windowStartPosition.vertical); }return radWindow; };RadEditorWindowManager.prototype.GetWindowStartPosition= function (radWindowInfo){var vcenterDeclination=parseInt(radWindowInfo.Height)/2; var hcenterDeclination=parseInt(radWindowInfo.Width)/2; var documentCenterPositions=this.GetDocumentVisibleCenter( ); return {horizontal:documentCenterPositions.horizontal-hcenterDeclination,vertical:documentCenterPositions.vertical-vcenterDeclination } ; } ; RadEditorWindowManager.prototype.GetDocumentVisibleCenter= function ( ){var innerWidth=0; var innerHeight=0; var canvas=document.body; var compatMode=!((RadControlsNamespace.Browser.IsMozilla || RadControlsNamespace.Browser.IsIE) && document.compatMode!="\x43\x53S1C\x6fmpa\x74"); if (compatMode && !RadControlsNamespace.Browser.IsSafari){canvas=document.documentElement; }if (window.innerWidth){innerWidth=window.innerWidth; innerHeight=window.innerHeight; }else {innerWidth=canvas.clientWidth; innerHeight=canvas.clientHeight; }var documentVisibleCenterX=this.GetVisibleCenterCoordinate(canvas.scrollLeft,innerWidth); var documentVisibleCenterY=this.GetVisibleCenterCoordinate(canvas.scrollTop,innerHeight); return {horizontal:documentVisibleCenterX,vertical:documentVisibleCenterY } ; } ; RadEditorWindowManager.prototype.GetVisibleCenterCoordinate= function (documentStartDeclination,visibleSize){var visibleAreaMiddle=parseInt(visibleSize)/2; return parseInt(documentStartDeclination)+visibleAreaMiddle; } ; RadEditorWindowManager.prototype.DestroyWindow= function (childWindow){var nextWndToActivate=this.GetPrevWindow(childWindow.Id); this.UnregisterChild(childWindow); if (nextWndToActivate!=childWindow){ this.ActivateWindow(nextWndToActivate); }if (childWindow.Iframe){childWindow.Iframe.src="ja\x76\x61scri\x70t:\x27\047;"; }eval(this.GetWindowVarName(childWindow.Id)+"\x20\x3d n\x75ll;"); if (childWindow.Container){ this.ContainerPool.push(childWindow.Container); }};RadEditorWindowManager.prototype.GetPrevWindow= function (id){var bNeedPrev= false; var retWnd=null; for (var i=this.ChildWindows.length-1; i>=0; i--){var wnd=this.ChildWindows[i]; if (wnd && wnd.Id==id){bNeedPrev= true; }else if (wnd && bNeedPrev){return wnd; }else if (null==retWnd){retWnd=wnd; }}return retWnd; };RadEditorWindowManager.prototype.CloseWindow= function (id){var wnd=this.LookupWindow(id); if (wnd){wnd.Close( ); }};RadEditorWindowManager.prototype.ActivateWindow= function (radWindow){if (!radWindow){radWindow=this.ActiveWindow; }if (radWindow){if (radWindow.IsModal){ this.SetCapture(radWindow, false); }if (radWindow!=this.ActiveWindow){if (this.ActiveWindow){ this.ActiveWindow.SetZIndex(this.TopWindowZIndex-1); }radWindow.SetZIndex(this.TopWindowZIndex); this.ActiveWindow=radWindow; }if (radWindow.IsModal){ this.ShowOverImage(radWindow, true); }}};RadEditorWindowManager.prototype.RegisterChild= function (childWindow){ this.ChildWindows[this.ChildWindows.length]=childWindow; };RadEditorWindowManager.prototype.UnregisterChild= function (childWindow){for (var i=0; i<this.ChildWindows.length; i++){var wnd=this.ChildWindows[i]; if (wnd==childWindow){ this.ChildWindows[i]=null; return; }}};RadEditorWindowManager.prototype.SetCapture= function (childWindow,bContainerCapture){try {if (childWindow){childWindow.SetCapture(bContainerCapture); }}catch (ex){}};RadEditorWindowManager.prototype.LookupWindow= function (id){for (var i=0; i<this.ChildWindows.length; i++){var wnd=this.ChildWindows[i]; if (wnd && id==wnd.Id){return wnd; }}return null; };RadEditorWindowManager.prototype.LookupRadWindowByBrowserWindowRef= function (browserWindow){for (var i=0; i<this.ChildWindows.length; i++){var radWindow=this.ChildWindows[i]; if (null!=radWindow && browserWindow==radWindow.Window){return radWindow; }}return null; };RadEditorWindowManager.prototype.GetCurrentRadWindow= function (browserWindow){if (browserWindow.dialogArguments && ( true ==browserWindow.dialogArguments.IsRadWindowArgs)){return browserWindow.dialogArguments.radWindow; }else if (browserWindow.opener!=null && browserWindow.opener.childRadWindow!=null){return browserWindow.opener.childRadWindow; }else {var oLast=this.LookupRadWindowByBrowserWindowRef(browserWindow); return oLast; }};RadEditorWindowManager.prototype.GetWindow= function (id){var wnd=this.LookupWindow(id); if (!wnd){var varName=this.GetWindowVarName(id); eval(varName+"\x20= new\x20RadW\x69ndo\x77(\047"+id+"\047);"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "\x77i\x6edow.\x72adW\x69ndo\x77_"+id; };RadEditorWindowManager.prototype.GetWindowFromPos= function (x,y){var wnd=null; for (var i=0; i<this.ChildWindows; i++){var childWnd=this.ChildWindows[i]; if (childWnd && childWnd.HitText(x,y)){if (!wnd || wnd.ZIndex<childWnd.ZIndex){wnd=childWnd; }}}return wnd; };RadEditorWindowManager.prototype.OnShowWindow= function (childWindow,visible){if (visible){ this.ActiveWindow=childWindow; }else {if (this.ActiveWindow==childWindow){ this.ActiveWindow=null; }}if (childWindow.IsModal){ this.ShowOverImage(childWindow,visible); }};RadEditorWindowManager.prototype.OnKeyDown= function (evt){switch (evt.keyCode){case 115:if (evt.altKey && this.ActiveWindow){}else if (evt.ctrlKey && this.ActiveWindow){}evt.keyCode=8; break; case 27:if (this.ActiveWindow){ this.ActiveWindow.Close( ); }break; default:return; }evt.cancelBubble= true; evt.returnValue= false; };RadEditorWindowManager.prototype.BuildWrapperTableHtml= function (id,width,height,caption,bIsModal,bHide){var url=document.all?"j\x61\x76asc\x72ipt\x3a\047\047;": ""; var closeFunc=bHide?"\x53h\x6fwWin\x64ow(\x66als\x65)": "\103lose\x28)"; var html=""; html+="\x09\x09\x3ctabl\x65 b\x6frde\x72=\0470\x27 id\x3d\047Rad\x57ind\x6f\x77C\x6fnt\x65n\x74W\x72a\x70p\x65r"+id+"\047 c\x6cass\x3d\047RadE\x54abl\x65Wr\x61ppe\x72\047 sty\x6ce=\x27w\x69d\x74h:\x20"+width+";\x68e\x69ght:"+height+";z-i\x6ed\x65x:10\x300;\x20posi\x74i\x6fn:a\x62sol\x75te\x3b\047 \x63e\x6cls\x70a\x63i\x6eg\x3d\0470\047 \x63e\x6clp\x61d\x64i\x6e\x67=\x270\x27 >\x0a"+"\011\011\011\x3c\x74r \x20sty\x6ce=\x27hei\x67ht:\x31px\x3b\047>\012"+"\011\x09\011\x09\x3ct\x64 wi\x64th\x3d\0471\047\040\x63\x6cass\x3d\x27Ra\x64E\x54ab\x6ce\x57r\x61p\x70e\x72He\x61d\x65r\x4ce\x66t\x27 \x6eo\x77r\x61p\x3e\074/t\x64\x3e\012"+"\011\x09\011\011\x3ct\x64 w\x69dt\x68=\047100\x25\047 cla\x73s=\x27R\x61d\x45T\x61bl\x65W\x72a\x70p\x65rH\x65a\x64e\x72C\x65n\x74e\x72\047 \x6eow\x72a\x70\x3d\047tr\x75e\x27 \x6fn\x6do\x75s\x65d\x6fw\x6e=\x27ra\x64W\x69n\x64\x6fw_"+id+".Dr\x61g\x4dode=\x22mo\x76e\042;\x20re\x74urn\x20rad\x57in\x64ow\x5f"+id+".\x4fn\x44ragSt\x61rt(\x65ve\x6et)\x3b\047 on\x73el\x65cts\x74ar\x74=\x27r\x65tu\x72n\x20f\x61l\x73e\x3b\047>\012"+"\011\011\011\x09\x09\074span\x20i\x64=\047Rad\x57ind\x6fwC\x61pt\x69o\x6e"+id+"\047\x20ons\x65le\x63tst\x61rt=\x27ret\x75rn\x20fal\x73e;\x27 cl\x61s\x73=\x27R\x61dE\x52a\x64W\x69n\x64ow\x48e\x61d\x65r\x27>"+caption+"\x3c\x2fspa\x6e>\012"+"\x09\x09\011\011\074\x2f\x74d>\012"; if (!bIsModal){html+="\011\x09\074td w\x69dt\x68=\0471\047 cl\x61ss=\x27Ra\x64ETa\x62l\x65W\x72ap\x70e\x72H\x65a\x64e\x72Ce\x6et\x65r\x27 \x6eow\x72a\x70\x3e\012"+"\x09\x09\011\x09\x09\074spa\x6e c\x6cas\x73=\047Rad\x45Rad\x57in\x64o\x77B\x75t\x74o\x6ePi\x6eO\x66f\x27 \x69d\x3d\047Bu\x74t\x6f\x6eP\x69n\x27 o\x6ec\x6c\x69c\x6b=\x27ra\x64W\x69n\x64o\x77_"+id+"\x2e\x54ogg\x6ceCa\x6eMov\x65(th\x69s)\x27>&\x6ebsp\x3b\074/s\x70a\x6e>"+"\x09\x09\011\x3c\x2ft\x64>\012"; }var scrolling="auto"; if (this.GetWindow(id)!=null && this.GetWindow(id).Argument!=null){var customizedScrolling=this.GetWindow(id).Argument.scrolling; if (customizedScrolling){switch (customizedScrolling){case "yes":case "\x6e\x6f":case "auto":scrolling=customizedScrolling; break; default:break; }}}html+="\011\x09\011\011\074\x74d\x20wid\x74\x68=\0471\047 cla\x73s=\x27R\x61dE\x54a\x62l\x65W\x72ap\x70e\x72H\x65ad\x65r\x43e\x6et\x65r\x27 \x6eo\x77ra\x70>\x0a"+"\x09\x09\011\074spa\x6e c\x6cass\x3d\047RadE\x52ad\x57ind\x6fwB\x75t\x74o\x6eCl\x6fs\x65\047 \x69d=\x27B\x75t\x74on\x43l\x6fs\x65\x27 o\x6ec\x6ci\x63k\x3d\x27ra\x64W\x69n\x64ow\x5f"+id+"."+closeFunc+"\047>\x26nbs\x70;\074/s\x70an>\x0a"+"\011\011\011\x09\x3c/\x74d>\x0a"+"\011\011\011\x09\x3ct\x64 wi\x64th\x3d\047\061\x27 \x63la\x73s=\x27R\x61dE\x54a\x62l\x65W\x72ap\x70e\x72H\x65ad\x65r\x52i\x67h\x74\x27 n\x6fw\x72a\x70>\x3c/\x74d\x3e\012"+"\011\x09\011\074\x2f\x74r>\x0a"+"\011\011\011\x3c\x74r \x73tyl\x65=\047he\x69ght\x3a100\x25\047 >\x0a"+"\x09\x09\011\011\074\x74\x64 st\x79le=\x27he\x69ght\x3a10\x30%;\x27 c\x6fl\x73p\x61n\x3d\0475\x27>\012"+"\011\x09\011\x09\x09\074tabl\x65 \x68ei\x67ht=\x27100\x25\047 st\x79l\x65=\x27he\x69g\x68t\x3a1\x300%\x27 \x62o\x72d\x65r\x3d\0470\x27 \x77id\x74h\x3d\x2710\x30%\x27 \x20c\x65l\x6cs\x70ac\x69n\x67=\x270\x27 \x63e\x6cl\x70a\x64d\x69n\x67=\x270\x27>\x0a"+"\011\011\x09\x09\011\011\074\x74\x72 s\x74yle\x3d\047hei\x67ht:\x310\x30%\x27>\x0a"+"\011\x09\011\011\x09\x09\011\x3c\x74d\x20wid\x74h=\x271\047 cl\x61s\x73=\x27Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72B\x6fd\x79L\x65f\x74\047 \x6eo\x77r\x61p>\x3c/\x74\x64>\x0a"+"\x09\x09\011\011\011\x09\x09\074td i\x64=\x27Rad\x57in\x64owC\x6fn\x74e\x6et\x57in\x64o\x77"+id+"\047\x20 \x73tyle\x3d\047hei\x67ht\x3a100\x25;bo\x72de\x72:0p\x78 \x73o\x6ci\x64 b\x6cu\x65;\x27 \x68ei\x67h\x74=\x271\x300%\x27\x20w\x69dt\x68=\x271\x300\x25\x27 c\x6ca\x73s\x3d\047Ra\x64\x45Ta\x62l\x65W\x72a\x70p\x65r\x42o\x64y\x43e\x6et\x65r\x27 \x61l\x69gn=\x27\x6ce\x66t\x27 \x76a\x6ci\x67n\x3d\x27to\x70\x27 \x6fn\x73e\x6ce\x63t\x73\x74a\x72t\x3d\x27re\x74\x75r\x6e \x66a\x6c\x73e\x3b\x27>\x0a"+"\011\011\011\x09\x09\011\x09\x09\074ifr\x61me\x20na\x6de=\x27Rad\x57\x69nd\x6fw\x43o\x6et\x65nt\x27 \x66r\x61m\x65bo\x72d\x65r\x3d\x270\x70x\x27 s\x74y\x6ce\x3d\x27he\x69g\x68t\x3a1\x300\x25;\x77i\x64t\x68:\x310\x30%\x3bb\x6fr\x64e\x72:\x30p\x78 \x73o\x6ci\x64 \x67r\x65e\x6e\x27 \x69d\x3d\047R\x61d\x57i\x6ed\x6f\x77C\x6fn\x74e\x6et\x46r\x61\x6de"+id+"\047 sr\x63=\047"+url+"\x27 \x73crol\x6cing\x3d\047"+scrolling+"\047 bo\x72de\x72=\047no\047 >\074/i\x66ra\x6de>\012"+"\011\011\x09\x09\011\011\011\x3c/\x74d\x3e\012"+"\011\011\011\x09\x09\011\011\x3c\x74d\x20wid\x74h=\x271\047 cl\x61s\x73=\x27Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72B\x6fd\x79Ri\x67\x68t\x27 \x6eow\x72a\x70>\x3c/\x74d\x3e\012"+"\x09\x09\011\011\x09\x09\074\057\164\x72>\x0a"+"\x09\x09\011\011\x09\x3c/t\x61bl\x65>\012"+"\x09\x09\011\011\x3c\x2ftd\x3e\012"+"\x09\011\x09\x3c/tr\x3e\012"+"\011\011\x09\x3ctr\x20st\x79le=\x27hei\x67ht\x3a1px\x3b\047>\012"+"\011\x09\011\x09\x3ctd\x20co\x6csp\x61n=\0475\047 wi\x64th\x3d\04710\x30%\x27 \x73t\x79le\x3d\x27he\x69g\x68t:\x31p\x78;\x27 \x3e\x0a"+"\011\011\x09\x09\011\074\164\x61\x62le\x20bor\x64er=\x270\047 w\x69d\x74h\x3d\04710\x30%\x27 \x68e\x69gh\x74=\x271\x27 \x63e\x6cl\x73p\x61c\x69n\x67=\x270\x27 \x63el\x6cp\x61d\x64i\x6eg\x3d\x270\x27>\012"+"\011\x09\011\011\x09\x09\074tr>\012"+"\011\011\x09\x09\011\011\x09\x3ctd\x20wi\x64th=\x271\047 c\x6cas\x73=\x27Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72F\x6fo\x74er\x4ce\x66\x74\047 n\x6fw\x72a\x70>\x26n\x62s\x70;\x3c/\x74d\x3e\012"+"\011\011\x09\x09\011\011\x09\x3ct\x64 c\x6flsp\x61n=\x273\047 id\x3d\047B\x6frd\x65r\x42o\x74t\x6fm\x27 w\x69d\x74h\x3d\0471\x300\x25\047 \x63l\x61ss\x3d\x27Ra\x64\x45Ta\x62l\x65W\x72a\x70p\x65r\x46o\x6ft\x65r\x43e\x6et\x65\x72\047 n\x6fw\x72a\x70\x3e&\x6eb\x73p\x3b\x3c/t\x64\x3e\011\011\012"+"\x09\x09\011\011\011\x09\x09\074td w\x69dt\x68=\0471\047 id\x3d\047C\x6fr\x6eer\x42o\x74t\x6fm\x52i\x67ht\x27 \x63l\x61s\x73=\x27R\x61d\x45T\x61b\x6ce\x57r\x61p\x70er\x46o\x6ft\x65r\x52i\x67h\x74\x27 o\x6em\x6fu\x73e\x64o\x77n\x3d\x27ra\x64W\x69n\x64o\x77_"+id+".DragM\x6f\x64e=\042\x73ize\x22; \x72et\x75rn \x72adW\x69nd\x6fw\x5f"+id+".\x4f\x6eDrag\x53tar\x74(ev\x65nt\x29;\047 \x6fns\x65lec\x74st\x61r\x74=\x27re\x74u\x72n\x20f\x61ls\x65;\x27 \x6eo\x77ra\x70>\x26\x6eb\x73p\x3b\074/t\x64>\x0a"+"\x09\x09\011\011\011\011\x3c/\x74r>\x0a"+"\x09\x09\011\011\011\074\x2ft\x61bl\x65>\012"+"\x09\x09\011\011\074\057\x74d\x3e\012"+"\011\x09\011\074\057\x74r\x3e\012"+"\011\x09\074/tab\x6ce>\x0a"; return html; };RadEditorWindowManager.prototype.SetOverImage= function (imageId){ this._overImage=document.getElementById(imageId); };RadEditorWindowManager.prototype.GetOverImage= function ( ){if (!this._overImage){ this._overImage=document.getElementById("\x4f\x56ER_IM\x47"); }return this._overImage; };RadEditorWindowManager.prototype.ShowOverImage= function (wnd,visible){var overImage=this.GetOverImage( ); if (overImage){if (wnd && visible){var viewPortSize=RadControlsNamespace.Screen.GetViewPortSize( ); overImage.style.position="absolu\x74\x65"; overImage.style.left=0; overImage.style.top=0; overImage.style.width=viewPortSize.width+"\x70\x78"; overImage.style.height=viewPortSize.height+"\160x"; overImage.style.zIndex=wnd.ZIndex; overImage.style.display=""; }else {overImage.style.display="n\x6f\x6ee"; }}};function RadGetScrollTop(oDocument){if (oDocument.documentElement && oDocument.documentElement.scrollTop){return oDocument.documentElement.scrollTop; }else {return oDocument.body.scrollTop; }}function RadGetScrollLeft(oDocument){if (oDocument.documentElement && oDocument.documentElement.scrollLeft){return oDocument.documentElement.scrollLeft; }else {return oDocument.body.scrollLeft; }}function CloseDlg(returnValue,callbackFunction,execCallBack){if (window.radWindow){window.radWindow.ReturnValue=returnValue; window.radWindow.Close(null,callbackFunction,execCallBack); }}function InitializeRadWindow(editorID){window["Get\x44ia\x6co\x67\x41\x72\x67\x75\155\x65\x6e\x74\x73"]= function (isInSpell){if (window["\x72adWi\x6e\x64\x6f\x77"]){if (isInSpell){return window["radW\x69ndow"].Argument.CustomArguments; }else {return window["rad\x57\151nd\x6f\x77"].Argument; }}else {return null; }};window["\x69sR\x61d\x57\x69\x6e\x64o\x77"]= true; window["\162a\x64\x57i\x6e\x64\x6f\x77"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["\x72adW\x69n\x64\x6f\x77"]){if (window.dialogArguments){window["ra\x64Wind\x6fw"].Window=window; }window["\x72ad\x57i\x6ed\x6f\x77"].OnLoad( ); }var dialogArguments=GetDialogArguments( ); if (dialogArguments){if (dialogArguments.HideEditorStatusBar){dialogArguments.HideEditorStatusBar(editorID); }}if (document.addEventListener){document.onclick= function (e){var eventTarget=e.target; if (eventTarget && (eventTarget.tagName=="\x42U\x54\x54O\x4e" || (eventTarget.tagName=="INP\x55\x54" && eventTarget.type.toLowerCase( )=="\x62utt\x6fn"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}

