function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "\x43SS1Co\x6dpat"!=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="n\x6f\x6ee"; }else { this.SetHeight(this.Height); displayStyle="inli\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?"": "n\x6f\x6ee"; 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("\122adW\x69ndo\x77Co\x6ete\x6etW\x72\x61ppe\x72"+this.Id); this.ContentWindow=document.getElementById("Rad\x57\x69ndow\x43ont\x65ntW\x69nd\x6fw"+this.Id); this.Caption=document.getElementById("\122adWi\x6edow\x43apt\x69on"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("N\x6f\x20windo\x77 Id\x20pro\x76id\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?"\x76\x69sib\x6ce": "hid\x64e\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\x61dER\x61dWi\x6edow\x42utt\x6fnP\x69nOf\x66": "\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="fixe\x64"; }}else {if (this.IsIE){window.clearInterval(this.AdjustPosInterval); this.TopOffset=null; }else { this.ContentWrapperTable.style.position="abs\x6f\x6cute"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("Updat\x65W\x69ndo\x77Pos\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 ("move"==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+'px'; this.ContentWrapperTable.style.top=top+'p\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+"\x70\x78"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"\160x"; }};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+"\x70\170"; }else { this.Window.outerHeight=height; }}}else {var oTable=this.ContentWrapperTable; var oFirstTable=oTable.getElementsByTagName("TA\x42L\x45")[0]; if (oFirstTable)oFirstTable.setAttribute("\x62\x6frd\x65r","1"); this.ContentWrapperTable.style.height=height+"px"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("bo\x72d\x65r","0"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "\x43\x53S1C\x6fmpa\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)+"px"; }}}} ; 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="h\x69\x64de\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("onmo\x75\x73emo\x76e",RadWindowDrag); document.body.attachEvent("o\x6e\x6douseu\x70",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\155ous\x65mov\x65",RadWindowDrag, false); document.addEventListener("\155ouseu\x70",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("on\x6d\x6fusem\x6fve",RadWindowDrag); document.body.detachEvent("onmou\x73\x65up",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("mo\x75s\x65move",RadWindowDrag, false); document.removeEventListener("\x6do\x75seup",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 "\x73i\x7ae":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("\x44I\x56"); RadWindowActiveWindowSpan.className="RadE\x54a\x62leWr\x61ppe\x72Res\x69\x7aeS\x70an"; RadWindowActiveWindowSpan.style.position="a\x62s\x6flute"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="\x76\x69sibl\x65"; 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 "\x6d\x6fve":RadWindowActiveWindowSpan.style.cursor="\x64\x65fa\x75lt"; break; case "\x73i\x7ae":RadWindowActiveWindowSpan.style.cursor="\x73\x65-resi\x7ae"; 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+"p\x78"; el.style.top=top+"p\x78"; }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+"p\x78"; RadWindowActiveWindowSpan.style.height=height+"\x70x"; }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!="R\x61d\x57indo\x77Con\x74ent")){break; }}catch (exc){alert('in \x74h\x65 Exc\x65pti\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("o\x6e\x6be\x79dow\x6e",Document_OnKeyDown); }else if (document.body.addEventListener){document.body.addEventListener("k\x65y\x64own",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="\133"+id+"]"; }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="st\x61\x74us:no\x3b"+"\x72\x65s\x69zabl\x65:ye\x73;"+"cent\x65r\x3ayes;"+"help\x3an\x6f;"+"\x6di\x6eimiz\x65:no\x3b"+"\x6d\x61xi\x6dize:\x6eo;"+"\x73\x63r\x6fll\x3ano\x3b"+"borde\x72\x3athin\x3b"+"s\x74a\x74usba\x72:no\x3b"+"\x64\x69alo\x67Wid\x74h:"+radWindowInfo.Width+"\x70\x78;"+"di\x61\x6cogHei\x67ht\x3a"+radWindowInfo.Height+"p\x78"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="ja\x76a\x73crip\x74:\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\x62l\x61nk","stat\x75s\x3dno,t\x6folb\x61r=n\x6f,l\x6fca\x74ion\x3dno,\x72es\x69z\x61b\x6ce=\x79e\x73,\x6de\x6eu\x62ar\x3dn\x6f,\x77i\x64th\x3d"+radWindowInfo.Width+"\x2c\x68ei\x67ht="+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("SP\x41\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("R\x61d\x57indo\x77Con\x74ent\x46ra\x6de"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("Rad\x57i\x6edowC\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!="CSS1C\x6f\x6dpa\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="\x6aavasc\x72ipt:\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+" \x3d\040\156\x65w \x52adW\x69ndo\x77(\047"+id+"\047\x29;"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "\x77\x69ndow\x2erad\x57ind\x6fw_"+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?"\152\x61vas\x63ript\x3a\047\047;": ""; var closeFunc=bHide?"\x53\x68owWi\x6edow\x28fal\x73e)": "Close\x28)"; var html=""; html+="\011\x09\074tab\x6ce \x62orde\x72=\x270\047 id=\x27Rad\x57in\x64o\x77Co\x6et\x65n\x74Wr\x61p\x70e\x72"+id+"\047 cl\x61ss=\x27Rad\x45Tab\x6ceW\x72app\x65r\047 st\x79le\x3d\047wi\x64t\x68:\x20"+width+"\073heig\x68t:"+height+";z\x2di\x6edex:\x31000\x3b po\x73it\x69on:\x61bso\x6cut\x65;\047\x20c\x65ll\x73p\x61c\x69ng\x3d\x270\047 \x63el\x6cp\x61d\x64i\x6e\x67=\x270\x27 >\x0a"+"\x09\x09\x09\074tr \x20st\x79le=\x27he\x69ght\x3a1px\x3b\047>\012"+"\x09\x09\011\011\074\x74\x64 wi\x64th\x3d\0471\047\040\x63l\x61s\x73=\x27Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72H\x65a\x64er\x4ce\x66\x74\047 n\x6fw\x72a\x70>\x3c/\x74d\x3e\012"+"\x09\x09\011\011\074\164\x64 \x77id\x74h=\x27100\x25\047 cla\x73s\x3d\047Ra\x64E\x54a\x62l\x65W\x72ap\x70e\x72H\x65a\x64e\x72C\x65n\x74e\x72\047 n\x6fw\x72a\x70=\x27t\x72u\x65\047 \x6fn\x6do\x75s\x65d\x6fw\x6e=\x27r\x61d\x57i\x6ed\x6fw\x5f"+id+"\x2eD\x72agM\x6fde=\x22mov\x65\042;\x20ret\x75rn \x72ad\x57in\x64o\x77_"+id+".OnD\x72a\x67Star\x74(e\x76ent\x29;\047\x20ons\x65lec\x74st\x61rt\x3d\x27re\x74u\x72n \x66a\x6cs\x65;\x27>\x0a"+"\x09\x09\011\011\x09\x3cspa\x6e \x69d=\x27Rad\x57ind\x6fwC\x61pt\x69o\x6e"+id+"\047 o\x6ese\x6cect\x73tar\x74=\047ret\x75rn\x20fal\x73e;\x27 c\x6ca\x73s\x3d\047Ra\x64E\x52a\x64W\x69n\x64ow\x48e\x61d\x65r\x27\x3e"+caption+"\x3c\x2fspa\x6e>\012"+"\011\x09\011\011\074\x2ft\x64>\012"; if (!bIsModal){html+="\x09\x09\x3ctd w\x69dt\x68=\0471\x27 cl\x61ss=\x27Ra\x64ETa\x62l\x65W\x72a\x70pe\x72H\x65a\x64e\x72C\x65nt\x65r\x27 \x6eo\x77r\x61p\x3e\x0a"+"\011\011\011\x09\x09\074spa\x6e \x63las\x73=\047Rad\x45Ra\x64Wi\x6ed\x6fw\x42ut\x74o\x6eP\x69n\x4ff\x66\047 i\x64=\x27B\x75t\x74o\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>"+"\011\x09\011\074\057\x74d\x3e\012"; }var scrolling="a\x75t\x6f"; 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 "no":case "\x61\x75to":scrolling=customizedScrolling; break; default:break; }}}html+="\x09\x09\011\011\074\164\x64 \x77id\x74h=\x271\047 cla\x73s=\x27R\x61dE\x54a\x62l\x65W\x72ap\x70e\x72H\x65ad\x65r\x43e\x6et\x65r\x27 \x6eo\x77r\x61p>\x0a"+"\x09\x09\011\x3c\x73pa\x6e cl\x61s\x73=\047RadE\x52ad\x57ind\x6fw\x42u\x74t\x6fnC\x6co\x73e\x27 i\x64=\x27B\x75tt\x6fn\x43l\x6fs\x65\x27 o\x6ec\x6ci\x63k\x3d\047ra\x64W\x69n\x64o\x77_"+id+"."+closeFunc+"\047\x3e&\x6ebsp;\x3c/s\x70an>\x0a"+"\011\011\011\x09\x3c/t\x64>\012"+"\011\011\x09\x09\074td \x77id\x74h=\x271\047 cla\x73s=\x27Rad\x45T\x61b\x6ceW\x72a\x70p\x65r\x48ea\x64e\x72R\x69g\x68t\x27 n\x6f\x77r\x61p>\x3c/\x74d\x3e\x0a"+"\011\011\011\x3c\x2ftr\x3e\012"+"\011\011\011\x3c\x74r s\x74yle\x3d\047hei\x67ht:\x3100\x25\047 >\x0a"+"\x09\x09\x09\011\074\x74\x64 s\x74yl\x65=\047hei\x67ht:\x3100\x25;\x27 c\x6fl\x73p\x61n\x3d\0475\x27>\012"+"\x09\x09\011\011\x09\x3ctab\x6ce \x68ei\x67ht=\x27100\x25\047 st\x79l\x65=\x27he\x69g\x68t\x3a1\x300%\x27 \x62o\x72de\x72=\x270\x27 \x77i\x64t\x68=\x271\x300\x25\047 \x20ce\x6cl\x73p\x61c\x69n\x67=\x270\x27 \x63e\x6cl\x70a\x64d\x69n\x67=\x270\x27>\x0a"+"\011\011\011\x09\x09\011\074\164\x72\x20st\x79le=\x27hei\x67ht\x3a1\x300%\x27>\x0a"+"\011\011\011\x09\x09\011\011\x3c\x74d\x20wid\x74h=\x271\047 cl\x61s\x73=\x27Ra\x64E\x54a\x62l\x65Wr\x61p\x70e\x72B\x6fd\x79Le\x66\x74\047 \x6eow\x72a\x70>\x3c/\x74d\x3e\x0a"+"\011\x09\011\011\x09\x09\011\x3c\x74d\x20id=\x27Ra\x64Win\x64ow\x43o\x6et\x65nt\x57i\x6ed\x6fw"+id+"\047 \x20sty\x6ce=\x27heig\x68t:\x3100%\x3bbor\x64er\x3a0px\x20s\x6fli\x64 \x62l\x75e\x3b\047 h\x65i\x67h\x74=\x2710\x30%\x27 \x77\x69dt\x68=\x271\x300\x25\x27 c\x6ca\x73s\x3d\047Ra\x64E\x54a\x62l\x65W\x72a\x70p\x65r\x42o\x64y\x43e\x6et\x65r\x27 \x61l\x69\x67\x6e\x3d\047l\x65f\x74\047 \x76a\x6ci\x67n\x3d\x27to\x70\x27 \x6fn\x73e\x6ce\x63t\x73t\x61\x72t\x3d\x27re\x74u\x72\x6e \x66a\x6cs\x65\x3b\047>\x0a"+"\x09\011\x09\011\011\011\x09\011\074ifr\x61me\x20na\x6de=\x27Rad\x57i\x6ed\x6fw\x43on\x74e\x6et\x27 \x66r\x61me\x62o\x72d\x65r\x3d\x270p\x78\x27 s\x74y\x6ce\x3d\047h\x65ig\x68t\x3a1\x300\x25;\x77i\x64t\x68:\x310\x30%\x3bb\x6fr\x64e\x72:\x30p\x78 \x73o\x6c\x69d\x20g\x72e\x65n\x27 \x69\x64=\x27R\x61d\x57i\x6ed\x6fw\x43\x6fn\x74e\x6et\x46r\x61m\x65"+id+"\047 \x73rc=\x27"+url+"\047 s\x63rol\x6cing\x3d\047"+scrolling+"\047 \x62ord\x65r=\x27no\047 >\074/i\x66ram\x65>\012"+"\x09\x09\011\011\011\x09\x09\074/td>\x0a"+"\011\x09\011\011\x09\x09\011\x3c\x74d\x20wid\x74h=\x271\047 cl\x61s\x73=\x27Ra\x64E\x54a\x62l\x65Wr\x61p\x70e\x72Bo\x64y\x52i\x67\x68t\x27 n\x6fw\x72a\x70>\x3c/\x74d\x3e\012"+"\x09\x09\011\011\x09\x09\074\057\164\x72>\x0a"+"\x09\x09\011\011\011\x3c/\x74ab\x6ce>\x0a"+"\011\011\011\x09\x3c/t\x64>\012"+"\x09\x09\011\074/tr>\x0a"+"\011\x09\011\074\x74\x72 st\x79le\x3d\047heig\x68t:1\x70x;\x27>\012"+"\011\011\011\x09\x3ctd\x20co\x6csp\x61n=\x275\047 wid\x74h=\x2710\x30%\x27 \x73ty\x6ce\x3d\x27he\x69g\x68t:\x31p\x78;\x27 \x3e\012"+"\011\011\011\x09\x09\074tabl\x65 \x62or\x64er=\x270\047 wi\x64th\x3d\0471\x300%\x27 \x68e\x69g\x68t=\x271\x27 \x63e\x6cl\x73pa\x63\x69n\x67=\x270\x27 c\x65l\x6cp\x61d\x64i\x6eg\x3d\0470\x27>\x0a"+"\011\011\011\x09\x09\011\074\164\162\x3e\012"+"\011\011\011\x09\x09\011\011\x3ct\x64 w\x69dt\x68=\0471\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\011\074td c\x6fls\x70an\x3d\0473\047 id\x3d\047Bo\x72d\x65r\x42o\x74t\x6fm\x27 w\x69d\x74h\x3d\04710\x30\x25\047 c\x6ca\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\011\x09\x09\011\011\x3c\x74d\x20wid\x74h=\x271\047 id\x3d\x27Co\x72ne\x72B\x6ft\x74o\x6dR\x69gh\x74\x27 c\x6ca\x73s\x3d\x27Ra\x64E\x54a\x62l\x65W\x72a\x70p\x65rF\x6fo\x74e\x72R\x69g\x68t\x27 \x6fn\x6do\x75s\x65d\x6fw\x6e=\x27r\x61d\x57i\x6ed\x6f\x77_"+id+"\x2e\x44ra\x67Mod\x65=\042\x73ize\x22; \x72etu\x72n r\x61dW\x69nd\x6fw\x5f"+id+"\x2e\x4fn\x44ragS\x74ar\x74(ev\x65nt\x29;\047 \x6fns\x65lec\x74s\x74a\x72t=\x27r\x65t\x75rn\x20f\x61l\x73e\x3b\047 n\x6fw\x72a\x70>\x26n\x62s\x70;\x3c/\x74d\x3e\012"+"\011\011\011\x09\x09\011\074\x2f\x74r>\x0a"+"\x09\x09\011\011\011\x3c/\x74ab\x6ce>\x0a"+"\x09\x09\011\011\x3c/\x74d>\x0a"+"\011\011\011\x3c\x2ft\x72>\012"+"\011\x09\074/tabl\x65>\x0a"; return html; };RadEditorWindowManager.prototype.SetOverImage= function (imageId){ this._overImage=document.getElementById(imageId); };RadEditorWindowManager.prototype.GetOverImage= function ( ){if (!this._overImage){ this._overImage=document.getElementById("OV\x45R\x5fIMG"); }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+"px"; overImage.style.height=viewPortSize.height+"\x70\x78"; overImage.style.zIndex=wnd.ZIndex; overImage.style.display=""; }else {overImage.style.display="no\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["G\x65tDialo\x67Arg\x75men\x74s"]= function (isInSpell){if (window["\x72a\x64Wind\x6fw"]){if (isInSpell){return window["radWi\x6ed\x6fw"].Argument.CustomArguments; }else {return window["r\x61d\x57indo\x77"].Argument; }}else {return null; }};window["isRadW\x69n\x64ow"]= true; window["rad\x57i\x6edow"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["\x72\x61dW\x69ndow"]){if (window.dialogArguments){window["\x72\x61dW\x69ndo\x77"].Window=window; }window["\x72\x61dWi\x6edow"].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\x54TON" || (eventTarget.tagName=="\x49\x4ePU\x54" && eventTarget.type.toLowerCase( )=="b\x75tt\x6fn"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}

