function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "\x43SS1\x43ompa\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="\x69\x6eli\x6ee"; }}};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\x6fn\x65"; 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+'\x70\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("R\x61\x64Wind\x6fwCo\x6ete\x6etW\x72a\x70per"+this.Id); this.ContentWindow=document.getElementById("RadWi\x6ed\x6fwCo\x6eten\x74Win\x64ow"+this.Id); this.Caption=document.getElementById("\x52a\x64Wind\x6fwCa\x70tio\x6e"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("\x4e\x6f wi\x6edow\x20Id \x70rov\x69ded"); }} ; 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?"visi\x62\x6ce": "hid\x64\x65n"; }} ; 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?"RadER\x61\x64Win\x64owB\x75tto\x6ePi\x6eOff": "\x52\x61dERa\x64Wi\x6edow\x42utt\x6fnPi\x6eOn"; if (!this.CanMove){if (this.IsIE){ this.TopOffset=parseInt(this.ContentWrapperTable.style.top)-RadGetScrollTop(document); this.StartUpdatePosTimer(100); }else { this.ContentWrapperTable.style.position="fix\x65d"; }}else {if (this.IsIE){window.clearInterval(this.AdjustPosInterval); this.TopOffset=null; }else { this.ContentWrapperTable.style.position="absol\x75t\x65"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("Upda\x74e\x57ind\x6fwPo\x73(\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 ("m\x6f\x76e"==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+'px'; }}};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+"\x70x"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"\x70\x78"; }};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("TABL\x45")[0]; if (oFirstTable)oFirstTable.setAttribute("bord\x65r","1"); this.ContentWrapperTable.style.height=height+"p\x78"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("\x62\x6frde\x72","0"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "CSS\x31C\x6fmpat"==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="hidd\x65\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("o\x6e\x6dous\x65mov\x65",RadWindowDrag); document.body.attachEvent("\157nmo\x75seu\x70",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\155\157\x75s\x65mov\x65",RadWindowDrag, false); document.addEventListener("\x6d\x6fuse\x75p",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("onmou\x73e\x6dove",RadWindowDrag); document.body.detachEvent("\x6f\x6emo\x75seup",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("\x6d\x6fusem\x6fve",RadWindowDrag, false); document.removeEventListener("\155ouse\x75p",RadWindowDragEnd, false); }if (RadWindowActiveWindow.IsModal)RadWindowActiveWindow.SetCapture( ); RadWindowUnInitializeDrag(RadWindowActiveWindow); RadWindowActiveWindow.SetContentVisible( true); }function RadWindowDrag(e){if (RadWindowActiveWindow.CanDrag( )){switch (RadWindowActiveWindow.DragMode){case "\x6do\x76e":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("\x44\x49V"); RadWindowActiveWindowSpan.className="Ra\x64E\x54ableW\x72ap\x70erRe\x73i\x7aeSp\x61n"; RadWindowActiveWindowSpan.style.position="\x61b\x73olut\x65"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="\166isibl\x65"; RadWindowActiveWindowSpan.style.top=targetWindow.ContentWrapperTable.style.top; RadWindowActiveWindowSpan.style.left=targetWindow.ContentWrapperTable.style.left; RadWindowActiveWindowSpan.style.width=parseInt(targetWindow.GetWidth( ))+"p\x78"; RadWindowActiveWindowSpan.style.height=parseInt(targetWindow.GetHeight( ))+"\x70\x78"; switch (targetWindow.DragMode){case "mov\x65":RadWindowActiveWindowSpan.style.cursor="\x64\x65faul\x74"; break; case "si\x7ae":RadWindowActiveWindowSpan.style.cursor="\x73\x65-\x72esiz\x65"; 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 && "CSS\x31\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+"p\x78"; }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\x41\x4dE" || topWindow.frameElement.name!="\x52\x61dW\x69ndo\x77Co\x6eten\x74")){break; }}catch (exc){alert('\x69\x6e \x74he E\x78cep\x74ion\x21'); 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("\x6b\x65ydo\x77n",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="\x5b"+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="statu\x73\x3ano;"+"r\x65s\x69zabl\x65:ye\x73;"+"cen\x74e\x72:yes\x3b"+"\x68\x65lp:n\x6f;"+"mi\x6ei\x6dize:\x6eo;"+"\155aximi\x7ae:n\x6f;"+"\x73\x63ro\x6cl:n\x6f;"+"\x62\x6frder\x3athi\x6e;"+"statu\x73b\x61r:n\x6f;"+"d\x69a\x6cogWid\x74h:"+radWindowInfo.Width+"px;"+"\x64\x69al\x6fgHei\x67ht:"+radWindowInfo.Height+"\x70\x78"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="\x6a\x61va\x73cri\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="\x6a\x61v\x61scri\x70t:\x27\047"; window.childRadWindow=radWindow; radWindow.Window=window.open(radWindowInfo.Url,"\x5f\x62lan\x6b","\x73\x74atus\x3dno,\x74ool\x62ar=\x6eo,\x6coca\x74io\x6e=no\x2cr\x65s\x69za\x62l\x65=\x79e\x73,\x6den\x75b\x61r\x3dno\x2cw\x69d\x74\x68="+radWindowInfo.Width+",\x68e\x69ght="+radWindowInfo.Height+",moda\x6c=\x79es"); }else if (!radWindowInfo.UseClassicDialogs){var container=null; if (this.ContainerPool.length>0){container=this.ContainerPool.pop( ); }else {container=document.createElement("SPA\x4e"); 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("\x52\x61d\x57ind\x6fwC\x6fnte\x6et\x46ra\x6de"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("Ra\x64\x57indow\x43on\x74ent\x46ram\x65"+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!="CSS1C\x6f\x6dp\x61t"); 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="\x6a\x61v\x61scri\x70t:\x27\047\x3b"; }eval(this.GetWindowVarName(childWindow.Id)+" \x3d \x6eull;"); 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=\x20new \x52adW\x69ndo\x77(\047"+id+"\x27\x29;"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "win\x64\x6fw.ra\x64Win\x64ow_"+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?"\x6a\141vascr\x69pt:\x27\047;": ""; var closeFunc=bHide?"S\x68o\x77Wind\x6fw(f\x61lse\x29": "\x43\x6cose\x28)"; var html=""; html+="\011\011\074\x74\x61bl\x65 bo\x72de\x72=\0470\047 id\x3d\047Rad\x57i\x6ed\x6fw\x43o\x6ete\x6et\x57r\x61p\x70e\x72"+id+"\047 \x63las\x73=\047Rad\x45Tab\x6ceW\x72app\x65r\047 st\x79le\x3d\047w\x69dt\x68:\x20"+width+"\x3b\x68ei\x67ht:"+height+";z-i\x6ed\x65x:10\x300; \x70osi\x74io\x6e:ab\x73ol\x75te;\x27 c\x65l\x6cs\x70a\x63in\x67=\x270\x27 \x63el\x6cp\x61d\x64i\x6eg\x3d\047\x30\047 \x3e\012"+"\x09\x09\011\074tr \x20st\x79le=\x27he\x69ght\x3a1px\x3b\047>\012"+"\011\011\011\x09\x3ctd\x20wi\x64th\x3d\047\061\x27\x20cla\x73s=\x27R\x61d\x45T\x61bl\x65W\x72a\x70p\x65r\x48ea\x64e\x72L\x65f\x74\x27 n\x6fw\x72a\x70>\x3c/\x74d\x3e\x0a"+"\011\011\011\x09\x3ctd\x20wi\x64th\x3d\047100%\x27 cl\x61ss\x3d\047Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72H\x65a\x64er\x43e\x6et\x65\x72\047 n\x6fw\x72a\x70=\x27t\x72u\x65\047 o\x6em\x6fu\x73e\x64\x6fwn\x3d\x27ra\x64W\x69n\x64\x6fw\x5f"+id+".\x44r\x61gMod\x65=\042m\x6fve\x22; r\x65tu\x72n r\x61dW\x69ndo\x77_"+id+".On\x44r\x61gSta\x72t(\x65vent\x29;\x27 on\x73ele\x63ts\x74art\x3d\x27re\x74u\x72n \x66a\x6cs\x65;\x27>\x0a"+"\011\x09\011\011\011\x3cs\x70an\x20id\x3d\047\122\x61d\x57in\x64o\x77Ca\x70t\x69o\x6e"+id+"\047\x20on\x73ele\x63tst\x61rt=\x27re\x74urn\x20fal\x73e;\x27 cl\x61s\x73=\x27R\x61d\x45Ra\x64W\x69n\x64o\x77He\x61d\x65r\x27>"+caption+"\x3c\x2fsp\x61n>\012"+"\011\011\011\x09\x3c/t\x64>\012"; if (!bIsModal){html+="\x09\x09\074td \x77id\x74h=\0471\x27 cl\x61ss=\x27Rad\x45Ta\x62l\x65W\x72ap\x70e\x72H\x65a\x64e\x72Ce\x6et\x65r\x27 n\x6fw\x72a\x70\x3e\012"+"\x09\x09\011\x09\x09\074spa\x6e c\x6cas\x73=\047Rad\x45Ra\x64Wi\x6ed\x6fw\x42ut\x74o\x6eP\x69n\x4fff\x27 \x69d\x3d\047Bu\x74t\x6f\x6eP\x69n\x27 o\x6ec\x6c\x69c\x6b=\x27ra\x64W\x69n\x64o\x77_"+id+".Togg\x6ce\x43anM\x6fve\x28thi\x73)\047>\x26nb\x73p;\x3c/sp\x61n>"+"\011\x09\011\074\057\x74d\x3e\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 "ye\x73":case "\x6e\x6f":case "\x61\x75to":scrolling=customizedScrolling; break; default:break; }}}html+="\011\011\011\x09\x3ctd \x77id\x74h=\x271\047 cla\x73s=\x27Rad\x45T\x61b\x6ceW\x72a\x70p\x65r\x48ea\x64e\x72C\x65n\x74er\x27 \x6e\x6fw\x72ap\x3e\x0a"+"\x09\x09\011\074span\x20cl\x61ss=\x27Ra\x64ERa\x64Win\x64ow\x42ut\x74o\x6eC\x6co\x73e\x27 i\x64=\x27Bu\x74t\x6fn\x43l\x6fs\x65\047 \x6fn\x63l\x69c\x6b=\x27ra\x64W\x69n\x64o\x77_"+id+"\x2e"+closeFunc+"\047>\x26nb\x73p;\074/sp\x61n>\x0a"+"\x09\x09\011\011\x3c\x2ftd\x3e\012"+"\011\x09\011\011\x3c\x74d w\x69dt\x68=\0471\047 cl\x61ss=\x27Ra\x64E\x54a\x62le\x57r\x61p\x70e\x72He\x61d\x65r\x52i\x67h\x74\047 \x6eo\x77ra\x70>\x3c/\x74d\x3e\x0a"+"\x09\x09\011\074/tr\x3e\012"+"\011\011\011\x3c\x74r\x20styl\x65=\x27hei\x67ht:\x3100%\x27 >\x0a"+"\011\011\x09\x09\074td \x73ty\x6ce=\x27hei\x67ht:\x3100\x25;\047 \x63ol\x73p\x61n=\x275\047\x3e\012"+"\011\x09\011\x09\x09\x3ctabl\x65\x20he\x69ght\x3d\047100%\x27 s\x74y\x6ce\x3d\047he\x69g\x68t\x3a1\x300%\x27 \x62o\x72d\x65r\x3d\x270\x27 \x77i\x64th\x3d\x2710\x30%\x27 \x20c\x65l\x6cs\x70a\x63i\x6eg\x3d\0470\x27 c\x65l\x6cp\x61d\x64i\x6eg\x3d\x270\x27>\x0a"+"\011\011\011\x09\x09\011\074\x74\x72 \x73tyl\x65=\047hei\x67ht\x3a1\x300%\x27>\x0a"+"\011\011\x09\x09\011\011\x09\x3ctd\x20wi\x64th\x3d\0471\047\040\x63\x6c\x61s\x73=\x27Ra\x64E\x54a\x62le\x57r\x61p\x70e\x72B\x6fd\x79L\x65f\x74\047 n\x6fw\x72a\x70>\x3c/\x74d\x3e\x0a"+"\x09\x09\011\011\x09\x09\011\074\x74\x64 i\x64=\047Ra\x64Win\x64o\x77C\x6fnt\x65n\x74W\x69n\x64ow"+id+"\047  s\x74yle\x3d\047heig\x68t:1\x300%\x3bbor\x64er:\x30px\x20s\x6fli\x64 \x62l\x75e;\x27 \x68e\x69gh\x74=\x271\x300\x25\047 w\x69\x64t\x68=\x2710\x30%\x27 \x63l\x61s\x73=\x27R\x61d\x45T\x61b\x6ceW\x72a\x70p\x65r\x42o\x64y\x43e\x6et\x65r\x27 \x61l\x69g\x6e\x3d\x27l\x65f\x74\047 \x76a\x6ci\x67n\x3d\x27to\x70\x27 \x6fn\x73e\x6ce\x63t\x73t\x61\x72t\x3d\x27re\x74u\x72\x6e \x66a\x6c\x73e\x3b\047>\x0a"+"\011\011\011\x09\x09\011\011\x09\x3ci\x66ra\x6de n\x61me\x3d\047Ra\x64W\x69nd\x6fw\x43o\x6et\x65nt\x27 \x66r\x61m\x65bo\x72d\x65\x72=\x270p\x78\x27 s\x74y\x6ce\x3d\x27he\x69g\x68t\x3a1\x300\x25;\x77i\x64th\x3a1\x300\x25;\x62o\x72d\x65r\x3a0\x70x\x20s\x6f\x6ci\x64 \x67r\x65e\x6e\x27 \x69d\x3d\047R\x61d\x57i\x6ed\x6fw\x43o\x6et\x65\x6et\x46r\x61m\x65"+id+"\047 \x73rc=\x27"+url+"\x27\x20scro\x6clin\x67=\047"+scrolling+"\x27\x20bor\x64er=\x27no\047 \x3e\074/if\x72ame\x3e\012"+"\011\011\011\x09\x09\011\011\x3c\x2ft\x64>\012"+"\011\011\011\x09\x09\011\011\x3c\x74d \x77id\x74h=\0471\047 c\x6ca\x73s=\x27R\x61d\x45T\x61bl\x65W\x72a\x70p\x65rB\x6fd\x79R\x69\x67h\x74\047 n\x6fw\x72a\x70>\x3c/\x74d\x3e\012"+"\x09\x09\011\011\011\x09\074/tr\x3e\x0a"+"\x09\x09\011\011\x09\x3c/ta\x62le\x3e\012"+"\x09\x09\011\011\x3c\x2ftd\x3e\012"+"\x09\x09\011\074\x2f\x74r>\012"+"\x09\x09\x09\074tr s\x74yl\x65=\047hei\x67ht\x3a1px\x3b\047>\012"+"\x09\x09\011\011\074\x74d\x20co\x6csp\x61n=\x275\047 wid\x74h=\x271\x300%\x27 \x73t\x79l\x65=\x27he\x69g\x68t:\x31p\x78;\x27 \x3e\x0a"+"\011\x09\011\x09\x09\074tabl\x65 \x62ord\x65r=\x270\047 wi\x64th\x3d\04710\x30%\x27 \x68e\x69gh\x74=\x271\x27 \x63el\x6cs\x70a\x63i\x6eg\x3d\x270\047 \x63e\x6cl\x70ad\x64i\x6eg\x3d\x270\047>\x0a"+"\011\x09\011\011\x09\x09\074\x74\x72>\x0a"+"\011\011\011\x09\x09\011\011\x3c\x74d\x20wid\x74h=\x271\047 cl\x61s\x73=\x27Ra\x64E\x54a\x62l\x65Wr\x61p\x70e\x72F\x6fot\x65r\x4c\x65f\x74\047 n\x6fw\x72a\x70>\x26n\x62s\x70;\x3c/\x74d\x3e\012"+"\x09\x09\011\011\011\x09\x09\074td c\x6fls\x70an\x3d\0473\047 id\x3d\047Bo\x72d\x65r\x42o\x74t\x6fm\x27 w\x69d\x74h\x3d\04710\x30\x25\047 \x63la\x73s\x3d\x27Ra\x64E\x54a\x62l\x65W\x72a\x70p\x65r\x46o\x6ft\x65r\x43e\x6et\x65r\x27 \x6eo\x77r\x61p\x3e&\x6eb\x73\x70;\x3c/\x74d\x3e\011\011\012"+"\011\011\x09\x09\011\011\x09\x3ct\x64 w\x69dth\x3d\0471\047 id\x3d\047C\x6frn\x65r\x42o\x74t\x6fm\x52ig\x68t\x27 \x63l\x61s\x73=\x27R\x61dE\x54a\x62l\x65W\x72a\x70p\x65r\x46o\x6ft\x65r\x52i\x67h\x74\047 \x6fn\x6do\x75s\x65d\x6fw\x6e=\x27r\x61d\x57i\x6ed\x6fw\x5f"+id+"\x2e\x44r\x61gMod\x65=\042\x73iz\x65\042\073\x20r\x65tu\x72n \x72a\x64W\x69nd\x6fw\x5f"+id+".OnD\x72a\x67Star\x74(e\x76ent\x29;\x27 on\x73ele\x63ts\x74ar\x74=\x27re\x74u\x72n\x20fa\x6cs\x65;\x27 \x6eow\x72a\x70>\x26n\x62s\x70\x3b\074/\x74d\x3e\012"+"\011\011\011\x09\x09\011\074\057\x74\x72>\012"+"\x09\x09\011\011\011\x3c\x2fta\x62le\x3e\012"+"\011\x09\011\011\x3c/\x74d>\x0a"+"\011\x09\011\074\x2f\x74r>\x0a"+"\011\011\x3c\x2fta\x62le>\x0a"; return html; };RadEditorWindowManager.prototype.SetOverImage= function (imageId){ this._overImage=document.getElementById(imageId); };RadEditorWindowManager.prototype.GetOverImage= function ( ){if (!this._overImage){ this._overImage=document.getElementById("\x4fV\x45R_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="\x61\x62so\x6cute"; overImage.style.left=0; overImage.style.top=0; overImage.style.width=viewPortSize.width+"\x70\x78"; overImage.style.height=viewPortSize.height+"px"; overImage.style.zIndex=wnd.ZIndex; overImage.style.display=""; }else {overImage.style.display="n\x6fne"; }}};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["Ge\x74\x44ia\x6cogA\x72gum\x65nts"]= function (isInSpell){if (window["rad\x57i\x6edow"]){if (isInSpell){return window["radWi\x6ed\x6fw"].Argument.CustomArguments; }else {return window["\x72\x61d\x57indo\x77"].Argument; }}else {return null; }};window["\x69s\x52adWi\x6edow"]= true; window["\x72\x61d\x57indo\x77"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["\x72\x61d\x57indo\x77"]){if (window.dialogArguments){window["r\x61d\x57indo\x77"].Window=window; }window["ra\x64W\x69ndow"].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=="\x42\x55TTON" || (eventTarget.tagName=="\x49\x4eP\x55T" && eventTarget.type.toLowerCase( )=="\x62u\x74ton"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}
