function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "C\x53\x531Comp\x61t"!=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="\156\x6fne"; }else { this.SetHeight(this.Height); displayStyle="inline"; }}};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?"": "\x6eone"; 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+'p\x78'; this.ContentWrapperTable.style.top=y+'\x70x'; }}}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("Ra\x64WindowC\x6fntentWr\x61\160\x70er"+this.Id); this.ContentWindow=document.getElementById("Rad\x57indowCo\x6etentWind\x6fw"+this.Id); this.Caption=document.getElementById("RadWindo\x77Caption"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("No win\x64ow Id p\x72ovided"); }} ; 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": "hidde\x6e"; }} ; RadWindow.prototype.Close= function (exitCode,dialogCallbackFunction,execCallBack){if (null!=this.OnClientClosing && (this.OnClientClosing(exitCode)== false)){return; } this.ShowWindow( false); this.ExitCode=exitCode; if (this.AdjustPosInterval>-1){window.clearInterval(this.AdjustPosInterval); this.AdjustPosInterval=-1; }if (this.IsModal)this.ReleaseCapture( ); try {if (this.CallbackFunc && false !=execCallBack)this.CallbackFunc(this.ReturnValue,this.Param); if (dialogCallbackFunction){dialogCallbackFunction(this.ReturnValue,this.Param); }}catch (ex){}if (this.Parent)this.Parent.DestroyWindow(this ); if (!this.UseRadWindow && this.Window)this.Window.close( ); } ; RadWindow.prototype.ToggleCanMove= function (oDiv){if (!this.UseRadWindow)return; this.CanMove=!this.CanMove; oDiv.className=this.CanMove?"Ra\x64ERadWin\x64owButto\x6e\120\x69nOff": "\x52adERad\x57\151\x6e\144\x6f\x77B\x75\164\x74onPinO\x6e"; 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="\x61bsol\x75\164\x65"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("Update\x57indowPo\x73\050\x27"+this.Id+"\x27)",iInterval); };function UpdateWindowPos(wndId){var wnd=GetEditorRadWindowManager( ).LookupWindow(wndId); if (wnd)wnd.SetPosition( ); }RadWindow.prototype.CanDrag= function ( ){if (!this.UseRadWindow)return true; return ("\x6dove"==this.DragMode && this.CanMove) || ("si\x7ae"==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+'\x70x'; 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+"px"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"\160\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("\x62order","\x31"); this.ContentWrapperTable.style.height=height+"\160\x78"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("\142\x6frder","\x30"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "CSS1Comp\x61t"==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="hidden"; }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("\x6fnmousem\x6f\x76e",RadWindowDrag); document.body.attachEvent("\x6fnmou\x73\x65up",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\x6douse\x6d\x6fve",RadWindowDrag, false); document.addEventListener("\x6douseup",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("\x6fnmo\x75\163\x65move",RadWindowDrag); document.body.detachEvent("\x6fnm\x6f\165\x73eup",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("\x6dous\x65\x6dov\x65",RadWindowDrag, false); document.removeEventListener("mou\x73eup",RadWindowDragEnd, false); }if (RadWindowActiveWindow.IsModal)RadWindowActiveWindow.SetCapture( ); RadWindowUnInitializeDrag(RadWindowActiveWindow); RadWindowActiveWindow.SetContentVisible( true); }function RadWindowDrag(e){if (RadWindowActiveWindow.CanDrag( )){switch (RadWindowActiveWindow.DragMode){case "move":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("DIV"); RadWindowActiveWindowSpan.className="RadET\x61bleWrap\x70\145\x72\122\x65sizeS\x70an"; RadWindowActiveWindowSpan.style.position="absol\x75\164\x65"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="\x76isibl\x65"; RadWindowActiveWindowSpan.style.top=targetWindow.ContentWrapperTable.style.top; RadWindowActiveWindowSpan.style.left=targetWindow.ContentWrapperTable.style.left; RadWindowActiveWindowSpan.style.width=parseInt(targetWindow.GetWidth( ))+"\x70\170"; RadWindowActiveWindowSpan.style.height=parseInt(targetWindow.GetHeight( ))+"p\x78"; switch (targetWindow.DragMode){case "\x6dov\x65":RadWindowActiveWindowSpan.style.cursor="\x64ef\x61\x75lt"; break; case "\x73ize":RadWindowActiveWindowSpan.style.cursor="se-\x72esize"; 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+"px"; el.style.top=top+"px"; }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 && "CSS1Co\x6dpat"!=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!="\x52adWin\x64\x6fw\x43\157\x6e\164\x65nt")){break; }}catch (exc){alert('in t\x68\145\x20\105\x78\143e\x70tion!'); 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("onkeyd\x6fwn",Document_OnKeyDown); }else if (document.body.addEventListener){document.body.addEventListener("k\x65ydown",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+"]"; }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="\x73tatu\x73\x3an\x6f\073"+"\x72esizab\x6c\145\x3a\x79es\x3b"+"cen\x74\145r\x3ayes;"+"h\x65\154p\x3a\156\x6f\073"+"\x6dinimize\x3a\156\x6f\x3b"+"maxim\x69\172e\x3ano;"+"scro\x6c\x6c:no\x3b"+"\x62order:th\x69n;"+"\x73tatu\x73\142\x61\x72:n\x6f\073"+"\x64ialogW\x69\x64th\x3a"+radWindowInfo.Width+"px;"+"dialog\x48eight:"+radWindowInfo.Height+"\x70x"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="\x6aavascri\x70\164\x3a\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="\x6aa\x76\x61scr\x69pt:\047\047"; window.childRadWindow=radWindow; radWindow.Window=window.open(radWindowInfo.Url,"_\x62lank","\x73tatus=no\x2ctoolbar\x3d\156\x6f,locat\x69on=no,\x72esizab\x6ce=ye\x73,men\x75bar=no\x2cwidth\x3d"+radWindowInfo.Width+",he\x69\147\x68\164\x3d"+radWindowInfo.Height+"\x2cmodal=\x79\145\x73"); }else if (!radWindowInfo.UseClassicDialogs){var container=null; if (this.ContainerPool.length>0){container=this.ContainerPool.pop( ); }else {container=document.createElement("S\x50AN"); 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\x61dWindowC\x6fntentFr\x61\155\x65"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("R\x61dWindowC\x6f\156\x74entFr\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( ); 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!="CSS1Comp\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; }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="\x6aavascr\x69\x70t\x3a\047\x27;"; }eval(this.GetWindowVarName(childWindow.Id)+"\x20= null\x3b"); 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= \x6e\x65w \x52adWindo\x77\050\x27"+id+"\x27);"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "wind\x6fw.radWin\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?"\152\x61vascri\x70t:\047\x27;": ""; var closeFunc=bHide?"Sh\x6fwWindow(\x66alse)": "Clo\x73e()"; var html=""; html+="\011\011\x3ctable \x62\157\x72\144\x65r=\047\x30\047\x20id\x3d\047\x52a\x64\127\x69ndowC\x6fntent\x57rappe\x72"+id+"\x27 class=\x27\x52ad\x45TableWr\x61pper\047\040\x73tyle=\x27\x77\x69dth: "+width+"\x3bhei\x67\x68t:"+height+";z-\x69\156\x64\x65x\x3a\061\x3000; po\x73\151\x74\151\x6f\156\x3aabso\x6cute;\x27\040\x63ells\x70acing\x3d\047\x30\047\x20ce\x6clpad\x64ing=\x270\047\x20>\012"+"\011\x09\011\x3ctr\x20\040\x73tyle=\047height\x3a\061\x70x;\047\076\x0a"+"\x09\011\x09\011\x3ctd \x77idth=\047\061\x27 class\x3d\047\x52adE\x54able\x57rapper\x48eaderL\x65ft\047 nowr\x61p>\074\x2ftd\x3e\012"+"\011\x09\011\x09\074\x74d wid\x74h=\047\x3100\x25\047\x20class\x3d\047\x52a\x64\105\x54able\x57\162\x61pper\x48eaderC\x65nter\x27 nowr\x61p=\047true\x27\040\x6fnmo\x75sedow\x6e=\047\x72ad\x57indo\x77_"+id+".Dra\x67Mode=\042\155\x6f\166\x65\042\x3b retu\x72\156\x20radWin\x64ow_"+id+".O\x6e\104\x72\x61gS\x74art(eve\x6et);\047\x20ons\x65lectst\x61rt=\x27return\x20false\x3b\047\x3e\012"+"\x09\011\x09\011\x09\074\x73pa\x6e id=\047\122\x61\144\x57indowC\x61ptio\x6e"+id+"\047\x20onsele\x63tstart=\x27\x72e\x74\165\x72\156\x20\146\x61\154\x73e;\x27\040\x63lass\x3d\047\x52adER\x61dWind\x6fwHead\x65r\047\x3e"+caption+"\074/span>\012"+"\011\x09\011\x09\074\x2ftd>\x0a"; if (!bIsModal){html+="\x09\011\074\x74d wid\x74\150\x3d\047\x31\047\x20class\x3d\047\x52adETa\x62leWra\x70perHe\x61derCe\x6eter\047\040\x6eowrap\x3e\012"+"\x09\x09\011\x09\011\x3cspan cl\x61ss=\047\x52ad\x45RadWin\x64owBu\x74tonPi\x6eOff\047\040\x69d=\047\102\x75ttonP\x69n\047\x20on\x63lick\x3d\047\x72adW\x69ndow_"+id+"\x2eToggleC\x61\x6eMo\x76e(this)\x27>&nbsp\x3b\074\x2fspan>"+"\011\x09\011\x3c/td>\x0a"; }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 "\x79e\x73":case "\x6eo":case "aut\x6f":scrolling=customizedScrolling; break; default:break; }}}html+="\011\x09\011\x09\x3c\164d\x20width=\x271\047\x20class\x3d\047\x52adE\x54ableW\x72apperH\x65aderC\x65nter\047 nowr\x61p>\012"+"\x09\011\x09\074\x73pan \x63\154\x61ss=\047\x52adE\x52adWin\x64owBu\x74tonCl\x6fse\047\x20id\x3d\047\x42utto\x6eClose\x27 oncl\x69ck=\x27radWin\x64ow_"+id+"\x2e"+closeFunc+"\047\x3e&nbsp;\x3c\057\x73pan>\012"+"\x09\011\x09\011\x3c/td>\012"+"\x09\011\x09\011\x3ctd\x20width=\x27\x31\047\040\x63lass=\x27\122\x61dE\x54ableWr\x61pperHe\x61derRi\x67ht\047\x20n\x6fwrap>\x3c/td>\x0a"+"\x09\011\x09\074\x2ftr>\x0a"+"\x09\011\x09\074\x74r styl\x65=\047\x68eigh\x74:100%\x27\x20>\x0a"+"\x09\011\x09\011\x3ctd\x20style=\047height\x3a\061\x300%;\047\040\x63ols\x70an=\047\x35\047>\012"+"\x09\011\x09\011\x09\074\x74able \x68eight=\x27\061\x300%\047\x20s\x74yle=\047heigh\x74:100%\x27 bord\x65r=\047\x30\047\040\x77idt\x68=\047\x3100\x25\047\x20 cel\x6cspac\x69ng=\0470\047\x20ce\x6clpad\x64ing=\x27\060\x27>\012"+"\x09\011\x09\011\x09\011\x3ctr s\x74yle=\047\150\x65ight:1\x300%\047>\012"+"\x09\011\x09\011\x09\011\011\x3ctd wid\x74h=\047\x31\047\x20cla\x73s=\047RadET\x61bleWr\x61pperB\x6fdyLef\x74\047\x20nowr\x61p>\074\x2ft\x64>\012"+"\011\x09\011\x09\011\x09\011\x3ctd \x69\144\x3d\047\x52adWin\x64owCon\x74entW\x69ndow"+id+"\047\040\x20style=\x27\150\x65\151\x67\150\x74\x3a1\x30\060\x25;bor\x64er:0\x70x soli\x64 blue\x3b\047\x20hei\x67ht=\047\x310\x30%\047\x20wi\x64th=\047\061\x300%\047 clas\x73=\047\x52ad\x45Tabl\x65Wrap\x70erBod\x79Cent\x65r\047\x20a\x6cign=\x27\154\x65ft\047 \x76al\x69gn=\047top\x27 onse\x6cect\x73tart\x3d\047\x72et\x75rn \x66alse\x3b\047\x3e\012"+"\011\x09\011\x09\011\x09\011\x09\074\x69fr\x61me name\x3d\047\x52adW\x69ndowC\x6fntent\x27\040\x66rame\x62order\x3d\047\x30px\047 styl\x65=\047\x68ei\x67ht:10\x30%;wi\x64th:10\x30%;bo\x72der:0\x70x so\x6cid g\x72een\047 id=\x27RadW\x69ndow\x43onten\x74Fra\x6de"+id+"\047\x20src\x3d\047"+url+"\047\x20scrol\x6cing=\047"+scrolling+"\047 border=\x27\156o\x27\040\x3e\074\x2fifram\x65>\012"+"\x09\011\011\x09\011\x09\011\x3c/td>\012"+"\011\011\x09\011\x09\011\x09\074\x74d wi\x64\164\x68\075\x271\047\x20\x63lass=\x27\122\x61dETab\x6ceWrap\x70erBod\x79Right\x27\040\x6eowr\x61p>\074\x2ft\x64>\012"+"\011\x09\011\x09\011\011\x3c/tr>\012"+"\x09\011\x09\011\x09\074\x2ftabl\x65>\012"+"\011\x09\011\x09\074\x2ftd\x3e\012"+"\011\x09\011\x3c/tr>\012"+"\011\x09\011\x3ctr st\x79\154\x65\075\x27height\x3a1px;\047\076\x0a"+"\x09\011\011\x09\074\x74d cols\x70\141\x6e\075\x275\047\x20widt\x68=\047100%\047\040\x73tyle\x3d\047\x68eig\x68t:1px\x3b\047\x20>\012"+"\011\x09\011\x09\011\074\x74able b\x6frder=\047\060\x27 widt\x68=\047\061\x300%\047\x20h\x65ight=\x27\061\x27 cel\x6cspaci\x6eg=\047\x30\047 cell\x70addin\x67=\047\x30\047\076\x0a"+"\x09\x09\x09\011\x09\011\074\x74r>\012"+"\x09\011\x09\011\x09\011\x09\074\x74d wi\x64\164\x68\075\x271\047 class\x3d\047\x52adE\x54ableW\x72apper\x46ooter\x4ceft\047\x20n\x6fwrap\x3e&nbsp\x3b\074\x2ftd>\x0a"+"\011\011\x09\011\x09\011\x09\074\x74d co\x6cspan=\0473\047\x20id\x3d\047\x42ord\x65rBotto\x6d\047\x20wid\x74h=\047\x3100\x25\047\x20cla\x73s=\047\x52ad\x45Table\x57rapp\x65rFoot\x65rCent\x65r\047\x20n\x6fwrap>\x26nbsp\x3b\074\x2ftd\x3e\011\x09\012"+"\x09\011\x09\011\x09\011\x09\074\164\x64\040\x77idth=\x27\061\x27 id=\x27Corner\x42ottomR\x69ght\047 class\x3d\047\x52adE\x54ableW\x72appe\x72Foote\x72Right\x27 onmo\x75sedow\x6e=\047\x72ad\x57indo\x77_"+id+".Dr\x61\147\x4d\x6fde\x3d\042\x73ize\042\x3b r\x65turn r\x61\144\x57ind\x6fw_"+id+".OnDr\x61\147\x53\164\x61\x72t(\x65vent);\x27\040\x6fnsele\x63\164\x73tar\x74=\047\x72etu\x72n fal\x73e;\047\x20no\x77rap>&\x6ebsp;\x3c/td>\x0a"+"\x09\011\x09\011\x09\011\074\x2ftr>\012"+"\011\011\x09\011\x09\074\x2ftable\x3e\012"+"\x09\011\x09\011\074\x2ftd>\012"+"\x09\011\x09\074\x2ftr\x3e\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("\x4fVER_I\x4d\107"); }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="absol\x75te"; overImage.style.left=0; overImage.style.top=0; overImage.style.width=viewPortSize.width+"px"; 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["Get\x44ialogArg\x75ments"]= function (isInSpell){if (window["\x72adWi\x6e\144\x6fw"]){if (isInSpell){return window["rad\x57indow"].Argument.CustomArguments; }else {return window["rad\x57indow"].Argument; }}else {return null; }};window["\x69sRadW\x69\x6ed\x6f\167"]= true; window["ra\x64Window"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["ra\x64Window"]){if (window.dialogArguments){window["radWind\x6f\167"].Window=window; }window["\162\x61dWindow"].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=="\x49NPUT" && eventTarget.type.toLowerCase( )=="button"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}

