function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "\x43SS1Com\x70\141\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="none"; }else { this.SetHeight(this.Height); displayStyle="\x69nli\x6e\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?"": "\156\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("RadWin\x64owCont\x65ntWrap\x70\145\x72"+this.Id); this.ContentWindow=document.getElementById("Rad\x57indowCon\x74entWind\x6f\167"+this.Id); this.Caption=document.getElementById("Ra\x64WindowCa\x70\164\x69on"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("\x4eo windo\x77\x20I\x64\040\x70rovid\x65d"); }} ; 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?"\x76isibl\x65": "hidd\x65\156"; }} ; 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?"Ra\x64ERadWi\x6edowButt\x6f\156\x50inOff": "Rad\x45\122a\x64WindowBu\x74tonPin\x4fn"; if (!this.CanMove){if (this.IsIE){ this.TopOffset=parseInt(this.ContentWrapperTable.style.top)-RadGetScrollTop(document); this.StartUpdatePosTimer(100); }else { this.ContentWrapperTable.style.position="\x66ixed"; }}else {if (this.IsIE){window.clearInterval(this.AdjustPosInterval); this.TopOffset=null; }else { this.ContentWrapperTable.style.position="\x61bsolut\x65"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("UpdateW\x69ndowP\x6f\163\x28\047"+this.Id+"\x27\x29",iInterval); };function UpdateWindowPos(wndId){var wnd=GetEditorRadWindowManager( ).LookupWindow(wndId); if (wnd)wnd.SetPosition( ); }RadWindow.prototype.CanDrag= function ( ){if (!this.UseRadWindow)return true; return ("\x6dov\x65"==this.DragMode && this.CanMove) || ("size"==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+'px'; this.ContentWrapperTable.style.top=top+'\x70x'; }}};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+"px"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"\x70x"; }};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("\x54ABLE")[0]; if (oFirstTable)oFirstTable.setAttribute("\x62order","\061"); this.ContentWrapperTable.style.height=height+"\x70x"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("border","\x30"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "\x43SS1Comp\x61\x74"==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)+"\x70x"; }}}} ; 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="\x68idde\x6e"; }RadWindow.prototype.SetSize= function (width,height){if (width>maxWidth)width=maxWidth; if (height>maxHeight)height=maxHeight; 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("onm\x6fusemo\x76e",RadWindowDrag); document.body.attachEvent("\x6fnmous\x65\165\x70",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\x6dousemo\x76\x65",RadWindowDrag, false); document.addEventListener("\x6douseu\x70",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("\157\x6emous\x65move",RadWindowDrag); document.body.detachEvent("o\x6emouseu\x70",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("\x6douse\x6d\157\x76e",RadWindowDrag, false); document.removeEventListener("\x6douseu\x70",RadWindowDragEnd, false); }if (RadWindowActiveWindow.IsModal)RadWindowActiveWindow.SetCapture( ); RadWindowUnInitializeDrag(RadWindowActiveWindow); RadWindowActiveWindow.SetContentVisible( true); }function RadWindowDrag(e){if (RadWindowActiveWindow.CanDrag( )){switch (RadWindowActiveWindow.DragMode){case "\x6dove":RadWindowMove(e); break; case "\x73ize":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("\104\x49V"); RadWindowActiveWindowSpan.className="RadE\x54\141\x62\154\x65\127r\x61pperR\x65sizeSp\x61n"; RadWindowActiveWindowSpan.style.position="abso\x6c\165\x74e"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="vi\x73\151\x62\x6ce"; RadWindowActiveWindowSpan.style.top=targetWindow.ContentWrapperTable.style.top; RadWindowActiveWindowSpan.style.left=targetWindow.ContentWrapperTable.style.left; RadWindowActiveWindowSpan.style.width=parseInt(targetWindow.GetWidth( ))+"px"; RadWindowActiveWindowSpan.style.height=parseInt(targetWindow.GetHeight( ))+"px"; switch (targetWindow.DragMode){case "\155\x6fve":RadWindowActiveWindowSpan.style.cursor="\x64efa\x75\x6ct"; break; case "\x73ize":RadWindowActiveWindowSpan.style.cursor="\x73e-resi\x7a\145"; 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-RadGetScrollLeft(document); top=e.pageY*1-RadWindowY-RadGetScrollTop(document); }if (left<0){left=0; }if (top<0){top=0; }el.style.left=left+"\x70x"; el.style.top=top+"\x70x"; }var minWidth=155; var minHeight=43; var maxWidth; var maxHeight; 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 && "\x43SS1C\x6f\155\x70at"!=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+"p\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!="IFR\x41ME" || topWindow.frameElement.name!="RadWi\x6edowCont\x65\156\x74")){break; }}catch (exc){alert('in the \x45\170\x63eption!'); 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("on\x6beydown",Document_OnKeyDown); }else if (document.body.addEventListener){document.body.addEventListener("keydown",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="\x73tatus:no\x3b"+"re\x73\151\x7a\141\x62\154e\x3ayes;"+"\x63enter:y\x65\163\x3b"+"\x68elp:no;"+"\x6dinimiz\x65\072\x6eo;"+"maxim\x69\172e\x3ano;"+"scroll:\x6e\157;"+"bor\x64\145r\x3a\164\x68\151\x6e;"+"s\x74\x61tu\x73\x62ar\x3ano;"+"dia\x6c\x6fgWi\x64th:"+radWindowInfo.Width+"\x70x;"+"\x64ialogH\x65\151\x67\150\x74\x3a"+radWindowInfo.Height+"px"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="\x6aavasc\x72\151\x70t:\047\x27"; 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="jav\x61script:\x27\047"; window.childRadWindow=radWindow; radWindow.Window=window.open(radWindowInfo.Url,"_\x62lank","\x73tatus\x3d\156\x6f,toolba\x72=no,lo\x63ation=\x6eo,resi\x7aable\x3dyes,\x6denubar\x3dno,wi\x64th="+radWindowInfo.Width+"\x2c\150\x65\x69g\x68\164="+radWindowInfo.Height+"\x2cmod\x61\154=\x79es"); }else if (!radWindowInfo.UseClassicDialogs){var container=null; if (this.ContainerPool.length>0){container=this.ContainerPool.pop( ); }else {container=document.createElement("\x53P\x41\116"); 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("RadWin\x64owCont\x65ntFrame"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("RadWi\x6edowCont\x65ntFrame"+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( ); var top=documentCenterPositions.vertical-vcenterDeclination; if (top<0)top=0; var left=documentCenterPositions.horizontal-hcenterDeclination; if (left<0)left=0; return {horizontal:left,vertical:top } ; } ; RadEditorWindowManager.prototype.GetDocumentVisibleCenter= function ( ){var innerWidth=0; var innerHeight=0; var canvas=document.body; var compatMode=!((RadControlsNamespace.Browser.IsMozilla || RadControlsNamespace.Browser.IsIE) && document.compatMode!="C\x53S1Compa\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; }maxWidth=innerWidth; maxHeight=innerHeight; 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="javascri\x70t:\047\047\x3b"; }eval(this.GetWindowVarName(childWindow.Id)+" = nul\x6c;"); 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+" = new R\x61dWind\x6fw(\047"+id+"\047\x29;"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "\x77i\x6e\x64ow\x2eradWind\x6f\167\x5f"+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\x61vascr\x69\x70t\x3a\047\x27;": ""; var closeFunc=bHide?"ShowW\x69ndow(f\x61\154\x73e)": "Close\x28\051"; var html=""; html+="\011\x09\x3c\164\x61ble bor\x64\145\x72=\047\x30\047\x20id=\x27RadW\x69ndowC\x6fntentW\x72apper"+id+"\047\x20class\x3d\047\x52adETabl\x65Wrappe\x72\047\x20style\x3d\047\x77id\x74h: "+width+"\x3bheig\x68\x74:"+height+";z-index\x3a\061\x3000; pos\x69tion:a\x62\163\x6f\154\x75te;\047 cell\x73pacin\x67=\047\x30\047\x20c\x65llpad\x64ing=\0470\047\x20>\x0a"+"\x09\011\x09\074\164\x72\040\x20style=\x27\150\x65ight:1\x70x;\047\076\x0a"+"\x09\011\x09\011\074\x74d width\x3d\047\x31\047\x20clas\x73=\047\x52a\x64\105\x54ableW\x72apper\x48eader\x4ceft\047\x20no\x77rap>\x3c/td>\x0a"+"\x09\011\x09\011\x3ctd w\x69\144\x74h=\047\x3100%\x27\x20cl\x61ss=\x27RadET\x61bleWra\x70perHe\x61derCe\x6eter\047 nowra\x70=\047\x74r\x75e\047\x20onm\x6fused\x6fwn=\047\162\x61dWin\x64ow_"+id+"\x2eDragM\x6f\144\x65\075\x22move\042\073\x20return\x20radWin\x64ow_"+id+"\x2e\117n\x44\162\x61\147S\x74art(eve\x6et);\047\x20on\x73\145\x6cect\x73tart=\x27retur\x6e fals\x65;\047\x3e\012"+"\011\x09\011\x09\011\x3csp\x61\156\x20\151\x64\075\x27RadWin\x64owCa\x70tion"+id+"\047\x20onsel\x65ctstart=\x27\162\x65turn fa\x6cse;\047\x20cl\x61ss=\x27RadERa\x64Windo\x77Heade\x72\047\x3e"+caption+"\x3c\x2fspa\x6e\076\x0a"+"\011\x09\011\x09\074\x2ftd\x3e\012"; if (!bIsModal){html+="\011\x09\x3c\164\x64\040\x77idth=\0471\047\x20class\x3d\047\x52adE\x54ableW\x72apperH\x65aderC\x65nter\x27\040\x6eowra\x70>\012"+"\x09\011\x09\011\x09\074\x73pan \x63lass=\047RadERa\x64\127\x69ndow\x42utton\x50inOff\x27 id=\047Butto\x6ePin\047 oncl\x69ck=\047\162\x61dWin\x64ow_"+id+".Toggl\x65CanMove\x28\164\x68\151\x73)\047\x3e&nbs\x70\073\x3c/spa\x6e>"+"\x09\011\x09\074\x2ftd>\012"; }var scrolling="au\x74o"; if (this.GetWindow(id)!=null && this.GetWindow(id).Argument!=null){var customizedScrolling=this.GetWindow(id).Argument.scrolling; if (customizedScrolling){switch (customizedScrolling){case "y\x65s":case "no":case "\x61uto":scrolling=customizedScrolling; break; default:break; }}}html+="\011\011\x09\011\x3ctd\x20width=\x27\061\x27 class\x3d\047\x52adET\x61bleW\x72apperH\x65aderC\x65nter\x27\040\x6eowra\x70>\012"+"\011\x09\011\x3csp\x61\156\x20\143\x6c\141\x73\163\x3d\047\x52adER\x61dWin\x64owButt\x6fnClos\x65\047\x20id=\x27\102\x75ttonC\x6cose\x27 oncl\x69ck=\047radWi\x6edow_"+id+"\x2e"+closeFunc+"\x27>&\x6e\142s\x70;\074\x2fspan\x3e\012"+"\011\011\x09\011\x3c/td>\012"+"\011\011\x09\011\x3ctd widt\x68=\047\x31\047\x20cl\x61\163\x73=\047\x52ad\x45Table\x57rappe\x72Heade\x72Right\x27\040\x6eowra\x70>\074\x2ftd\x3e\012"+"\x09\011\x09\074\x2ftr>\x0a"+"\x09\011\x09\074\x74r styl\x65=\047\x68eigh\x74:100%\047 >\012"+"\011\x09\011\x09\074\x74d sty\x6ce=\047\x68eig\x68\164\x3a\061\x300%;\x27 colsp\x61n=\047\x35\047>\012"+"\011\011\x09\011\x09\074\x74able \x68eight=\x27\061\x300%\047\x20st\x79le=\047heigh\x74:100%\x27 bord\x65r=\047\x30\047\040\x77idth\x3d\047\x3100%\x27  cel\x6cspac\x69ng=\0470\047\x20cel\x6cpadd\x69ng=\0470\047\x3e\012"+"\x09\011\x09\011\x09\011\x3ctr st\x79le=\047\x68ei\x67ht:100\x25\047\x3e\012"+"\x09\011\x09\011\011\x09\011\x3ctd wi\x64th=\047\x31\047\040\x63las\x73=\047\x52ad\x45Table\x57rappe\x72BodyL\x65ft\047\x20n\x6fwrap>\x3c/td>\x0a"+"\011\x09\011\x09\011\x09\011\x3ctd \x69d=\047\x52adWi\x6edowCo\x6etentW\x69ndow"+id+"\x27  st\x79\154\x65=\047\x68eight\x3a100%;bo\x72der:0p\x78\040\x73oli\x64 blue\x3b\047\x20heig\x68t=\047\x310\x30%\047\x20wid\x74h=\047\061\x300%\047\040\x63lass\x3d\047\x52adE\x54able\x57rappe\x72Body\x43ente\x72\047\x20al\x69gn=\047left\x27\040\x76ali\x67n\x3d\047\x74o\x70\047\x20on\x73ele\x63tsta\x72t=\047retu\x72n fa\x6cse;\x27>\012"+"\011\x09\011\x09\011\x09\011\x09\x3c\151\x66rame n\x61me=\047\x52a\x64Wind\x6fwConte\x6et\047\x20fr\x61mebor\x64er=\047\060\x70x\047\x20s\x74yle=\x27heigh\x74:100%\x3bwidt\x68:100%\x3bborde\x72:0px\x20soli\x64 gree\x6e\047\x20id\x3d\047\x52ad\x57indo\x77Cont\x65ntF\x72ame"+id+"\x27\x20sr\x63\x3d\047"+url+"\x27 scr\x6f\x6cl\x69\156\x67\x3d\047"+scrolling+"\x27 border=\x27\156\x6f\x27 >\x3c/ifram\x65\076\x0a"+"\011\x09\011\x09\011\x09\011\x3c/\x74\144\x3e\012"+"\011\011\x09\011\x09\011\x09\074\x74d wi\x64th=\047\x31\047\040\x63las\x73=\047\x52ad\x45Table\x57rappe\x72BodyR\x69ght\047\040\x6eowr\x61p>\074\x2ft\x64>\012"+"\011\x09\011\x09\011\x09\074\x2ftr\x3e\012"+"\011\x09\011\x09\011\x3c/t\x61ble>\012"+"\011\x09\011\x09\074\x2ftd>\x0a"+"\011\x09\011\x3c/tr\x3e\012"+"\x09\011\x09\074\x74r s\x74yle=\047\x68e\x69\147\x68\164\x3a1px;\x27>\012"+"\011\x09\011\x09\074td colsp\x61n=\047\x35\047\x20wi\x64th=\047\x310\x30%\047\x20st\x79le=\047\x68e\x69ght:1\x70x;\047\x20>\012"+"\011\x09\011\x09\011\074\x74able b\x6frder=\0470\047\x20width\x3d\047\x310\x30%\047\x20hei\x67ht=\047\061\x27 cell\x73pacin\x67=\047\x30\047 cellp\x61ddin\x67=\047\x30\047\x3e\012"+"\011\011\x09\011\x09\011\x3ctr>\012"+"\011\x09\011\x09\011\x09\011\x3ct\x64\040\x77idth=\x271\047\x20cla\x73s=\047\122\x61\x64ETa\x62leWra\x70perFo\x6fterLef\x74\047\x20no\x77rap>&\x6ebsp;\x3c/td>\012"+"\x09\011\x09\011\x09\011\x09\074\x74d \x63olspan\x3d\047\x33\047\x20id\x3d\047\x42orde\x72Botto\x6d\047\x20widt\x68=\047\x3100%\x27 cla\x73s=\047\x52ad\x45Table\x57rappe\x72Foot\x65rCent\x65r\047\x20no\x77rap>\x26nbsp;\x3c/td>\x09\011\x0a"+"\x09\011\x09\011\x09\011\x09\074td widt\x68=\047\x31\047\x20id=\x27Corn\x65rBott\x6fmRight\x27 clas\x73=\047\x52adE\x54ableW\x72appe\x72Foote\x72Right\x27 onmo\x75sedow\x6e=\047\x72ad\x57indow\x5f"+id+"\x2eDragMod\x65\075\x22size\042\073\x20return\x20radWin\x64ow_"+id+".OnDr\x61gStart(\x65vent);\047 onsel\x65ctstar\x74=\047\x72etur\x6e fal\x73e;\047\040\x6eowra\x70>&nbs\x70;\074\x2ftd>\x0a"+"\011\x09\011\x09\011\x09\074\x2ftr\x3e\012"+"\011\x09\011\011\x09\074\x2ftable>\x0a"+"\011\x09\011\x09\074\057\x74d>\012"+"\011\x09\011\x3c/tr>\012"+"\x09\011\074\x2ftable>\012"; return html; };RadEditorWindowManager.prototype.SetOverImage= function (imageId){ this._overImage=document.getElementById(imageId); };RadEditorWindowManager.prototype.GetOverImage= function ( ){if (!this._overImage){ this._overImage=document.getElementById("OVE\x52_IMG"); }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="\x61\x62\x73ol\x75te"; overImage.style.left=0; overImage.style.top=0; overImage.style.width=viewPortSize.width+"\x70x"; overImage.style.height=viewPortSize.height+"\x70x"; overImage.style.zIndex=wnd.ZIndex; overImage.style.display=""; }else {overImage.style.display="\x6eone"; }}};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["GetDi\x61logArg\x75ments"]= function (isInSpell){if (window["r\x61dWindow"]){if (isInSpell){return window["\x72a\x64\x57ind\x6fw"].Argument.CustomArguments; }else {return window["\x72a\x64\127\x69ndow"].Argument; }}else {return null; }};window["is\x52adWindo\x77"]= true; window["radWi\x6edow"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["radWi\x6edow"]){if (window.dialogArguments){window["radWi\x6edow"].Window=window; }window["radWin\x64ow"].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=="\x42UTTON" || (eventTarget.tagName=="INP\x55T" && eventTarget.type.toLowerCase( )=="b\x75tton"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}

