function RadWindow(id){ this.IsIE=(null!=document.all) && (window.opera==null); this.IsQuirksMode=(document.all && !window.opera && "CSS1C\x6f\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="none"; }else { this.SetHeight(this.Height); displayStyle="\151\x6eline"; }}};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+'px'; 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("R\x61dWindow\x43ontentWr\x61pper"+this.Id); this.ContentWindow=document.getElementById("Ra\x64Window\x43\157\x6etent\x57indow"+this.Id); this.Caption=document.getElementById("\x52adWindo\x77\103\x61ption"+this.Id); if (null==show){var show= true; } this.ShowWindow(show); }else {alert("N\x6f window \x49\144\x20provide\x64"); }} ; RadWindow.prototype.SetContentWindowSize= function (width,height){ this.Width=width; this.Height=height; } ; RadWindow.prototype.SetContentVisible= function (visible){if (this.ContentWindow){ this.ContentWindow.style.visibility=visible?"visible": "hidden"; }} ; 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?"\x52adERadWi\x6edowButto\x6ePinOff": "RadER\x61dWindowB\x75ttonPinO\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\x65\144"; }}else {if (this.IsIE){window.clearInterval(this.AdjustPosInterval); this.TopOffset=null; }else { this.ContentWrapperTable.style.position="\x61bs\x6f\154\x75te"; }}};RadWindow.prototype.StartUpdatePosTimer= function (iInterval){if (!this.UseRadWindow)return; this.AdjustPosInterval=window.setInterval("Update\x57\151\x6edowPos(\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) || ("\x73iz\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+'\x70x'; this.ContentWrapperTable.style.top=top+'\x70x'; }}};RadWindow.prototype.GetWidth= function ( ){var width=0; if (!this.UseRadWindow){if (this.Window)width=this.Window.dialogWidth; }else {if (this.IsIE){width=parseInt(this.ContentWrapperTable.clientWidth); }else {width=parseInt(this.ContentWrapperTable.scrollWidth); }if (isNaN(width))width=0; }return width; };RadWindow.prototype.SetWidth= function (width){width=parseInt(width); if (isNaN(width))return; if (!this.UseRadWindow){if (this.Window){if (this.Window.dialogWidth){ this.Window.dialogTop=this.Window.screenTop-30; this.Window.dialogLeft=this.Window.screenLeft-4; this.Window.dialogWidth=width+"px"; }else { this.Window.outerWidth=width; }}}else {if (width)this.ContentWrapperTable.style.width=width+"\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+"\x70x"; }else { this.Window.outerHeight=height; }}}else {var oTable=this.ContentWrapperTable; var oFirstTable=oTable.getElementsByTagName("TABL\x45")[0]; if (oFirstTable)oFirstTable.setAttribute("\x62orde\x72","1"); this.ContentWrapperTable.style.height=height+"\x70x"; this.FixIeHeight(this.ContentWrapperTable,height); oFirstTable.setAttribute("borde\x72","\060"); }};RadWindow.prototype.FixIeHeight= function (oElem,height){if (this.IsIE && "\x43SS1\x43\157\x6dpat"==document.compatMode){var oHeight=oElem.offsetHeight; if (oHeight!=0 && oHeight!=height){var difference=(oHeight-height); var newHeight=(height-difference); if (newHeight>0){oElem.style.height=(newHeight+4)+"\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="\x68idd\x65\156"; }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("\x6fnm\x6f\165\x73emove",RadWindowDrag); document.body.attachEvent("\157\x6emous\x65\165\x70",RadWindowDragEnd); }else if (document.addEventListener){document.addEventListener("\x6do\x75\x73emo\x76e",RadWindowDrag, false); document.addEventListener("\x6douseup",RadWindowDragEnd, false); }RadWindowInitializeDrag(RadWindowActiveWindow); }function RadWindowDragEnd( ){if (document.all && document.body.detachEvent){document.body.detachEvent("on\x6dousemo\x76\145",RadWindowDrag); document.body.detachEvent("\x6fnmouseup",RadWindowDragEnd); document.body.releaseCapture( ); }else if (document.removeEventListener){document.removeEventListener("\x6dou\x73\x65mo\x76\x65",RadWindowDrag, false); document.removeEventListener("m\x6fuseup",RadWindowDragEnd, false); }if (RadWindowActiveWindow.IsModal)RadWindowActiveWindow.SetCapture( ); RadWindowUnInitializeDrag(RadWindowActiveWindow); RadWindowActiveWindow.SetContentVisible( true); }function RadWindowDrag(e){if (RadWindowActiveWindow.CanDrag( )){switch (RadWindowActiveWindow.DragMode){case "mo\x76e":RadWindowMove(e); break; case "\163\x69ze":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("D\x49V"); RadWindowActiveWindowSpan.className="\x52a\x64\x45Tab\x6ceWrapper\x52esize\x53pan"; RadWindowActiveWindowSpan.style.position="\x61bsolut\x65"; RadWindowActiveWindowSpan.style.zIndex=50000; document.body.appendChild(RadWindowActiveWindowSpan); }RadWindowActiveWindowSpan.style.visibility="\x76is\x69\x62le"; RadWindowActiveWindowSpan.style.top=targetWindow.ContentWrapperTable.style.top; RadWindowActiveWindowSpan.style.left=targetWindow.ContentWrapperTable.style.left; RadWindowActiveWindowSpan.style.width=parseInt(targetWindow.GetWidth( ))+"\x70x"; RadWindowActiveWindowSpan.style.height=parseInt(targetWindow.GetHeight( ))+"\x70x"; switch (targetWindow.DragMode){case "\x6dov\x65":RadWindowActiveWindowSpan.style.cursor="\x64ef\x61\165l\x74"; break; case "siz\145":RadWindowActiveWindowSpan.style.cursor="s\x65-resize"; break; }}function RadWindowMove(e){var RadWindowX=RadWindowActiveWindow.X; var RadWindowY=RadWindowActiveWindow.Y; var el=RadWindowActiveWindowSpan; var left=0; var top=0; if (document.all){left=e.clientX*1+RadGetScrollLeft(document)-RadWindowX; top=e.clientY*1+RadGetScrollTop(document)-RadWindowY; }else {left=e.pageX*1-RadWindowX-RadGetScrollLeft(document); top=e.pageY*1-RadWindowY-RadGetScrollTop(document); }if (left<0){left=0; }if (top<0){top=0; }el.style.left=left+"\x70x"; el.style.top=top+"\x70x"; }var minWidth=155; var minHeight=43; var maxWidth; var maxHeight; function RadWindowSize(e){var offsetX=e.clientX-MousePosX; var offsetY=e.clientY-MousePosY; var oSpan=RadWindowActiveWindowSpan; var width=oSpan.clientWidth?oSpan.clientWidth:oSpan.offsetWidth; var height=oSpan.clientHeight?oSpan.clientHeight:oSpan.offsetHeight; if (document.all && !window.opera && "\x43SS1Comp\x61\164"!=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+"px"; 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!="IFRAM\x45" || topWindow.frameElement.name!="Rad\x57indowCo\x6etent")){break; }}catch (exc){alert('in \x74he Excep\x74ion!'); 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\x6ekeydown",Document_OnKeyDown); }else if (document.body.addEventListener){document.body.addEventListener("\x6beydo\x77\156",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="\x73ta\x74\165\x73:no;"+"\x72esizable\x3ayes;"+"\x63\145n\x74\145\x72\072\x79es;"+"\150\x65\x6cp:n\x6f;"+"minimi\x7a\145:\x6eo;"+"maximiz\x65\072\x6eo;"+"\x73croll:n\x6f\x3b"+"\x62order:th\x69\156\x3b"+"s\x74\141t\x75\163\x62\141r\x3ano;"+"dialo\x67\127\x69\144t\x68:"+radWindowInfo.Width+"\x70x;"+"\144i\x61\154o\x67\110\x65\x69gh\x74:"+radWindowInfo.Height+"px"; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){radWindow.InnerHTML=radWindowInfo.InnerHtml; }if (!radWindowInfo.Url || ""==radWindowInfo.Url)radWindowInfo.Url="\x6aavascr\x69\160\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="ja\x76ascript\x3a\047\x27"; window.childRadWindow=radWindow; radWindow.Window=window.open(radWindowInfo.Url,"\x5fblank","sta\x74\165\x73\075\x6eo,toolb\x61r=no,l\x6fcation\x3d\156\x6f,re\x73izabl\x65=yes,\x6denubar\x3dno,wi\x64th="+radWindowInfo.Width+"\x2che\x69\x67ht\x3d"+radWindowInfo.Height+"\x2cmodal=y\x65\x73"); }else if (!radWindowInfo.UseClassicDialogs){var container=null; if (this.ContainerPool.length>0){container=this.ContainerPool.pop( ); }else {container=document.createElement("SP\x41N"); document.body.appendChild(container); }var oHtml=this.BuildWrapperTableHtml(id,radWindowInfo.Width,radWindowInfo.Height,caption,bIsModal,radWindowInfo.CloseHide); container.innerHTML=oHtml; var contentElem=(null!=radWindowInfo.InnerObject)?radWindowInfo.InnerObject:document.getElementById("\x52adWind\x6f\167\x43ontentF\x72ame"+id); radWindow.Initialize2(contentElem, true ,container,bIsModal, ++this.TopWindowZIndex); var frm=document.getElementById("\x52adWi\x6e\x64o\x77\103\x6fnte\x6etFrame"+id); radWindow.Window=null!=frm?frm.contentWindow:null; radWindow.Iframe=frm; if (radWindowInfo.InnerHtml && radWindowInfo.InnerHtml!=""){var doc=frm.contentWindow.document; doc.open( ); doc.write(radWindowInfo.InnerHtml); doc.close( ); }else if (radWindowInfo.Url && radWindowInfo.Url!=""){frm.src=radWindowInfo.Url; }if (bIsModal){ this.SetCapture(radWindow, false); }if (null==radWindowInfo.IsVisible){radWindowInfo.IsVisible= false; }var windowStartPosition=this.GetWindowStartPosition(radWindowInfo); radWindow.SetSize(radWindowInfo.Width,radWindowInfo.Height); radWindow.ShowWindow(radWindowInfo.IsVisible,windowStartPosition.horizontal,windowStartPosition.vertical); }return radWindow; };RadEditorWindowManager.prototype.GetWindowStartPosition= function (radWindowInfo){var vcenterDeclination=parseInt(radWindowInfo.Height)/2; var hcenterDeclination=parseInt(radWindowInfo.Width)/2; var documentCenterPositions=this.GetDocumentVisibleCenter( ); var top=documentCenterPositions.vertical-vcenterDeclination; if (top<0)top=0; var left=documentCenterPositions.horizontal-hcenterDeclination; if (left<0)left=0; return {horizontal:left,vertical:top } ; } ; RadEditorWindowManager.prototype.GetDocumentVisibleCenter= function ( ){var innerWidth=0; var innerHeight=0; var canvas=document.body; var compatMode=!((RadControlsNamespace.Browser.IsMozilla || RadControlsNamespace.Browser.IsIE) && document.compatMode!="C\x53S1Compa\x74"); if (compatMode && !RadControlsNamespace.Browser.IsSafari){canvas=document.documentElement; }if (window.innerWidth){innerWidth=window.innerWidth; innerHeight=window.innerHeight; }else {innerWidth=canvas.clientWidth; innerHeight=canvas.clientHeight; }maxWidth=innerWidth; maxHeight=innerHeight; var documentVisibleCenterX=this.GetVisibleCenterCoordinate(canvas.scrollLeft,innerWidth); var documentVisibleCenterY=this.GetVisibleCenterCoordinate(canvas.scrollTop,innerHeight); return {horizontal:documentVisibleCenterX,vertical:documentVisibleCenterY } ; } ; RadEditorWindowManager.prototype.GetVisibleCenterCoordinate= function (documentStartDeclination,visibleSize){var visibleAreaMiddle=parseInt(visibleSize)/2; return parseInt(documentStartDeclination)+visibleAreaMiddle; } ; RadEditorWindowManager.prototype.DestroyWindow= function (childWindow){var nextWndToActivate=this.GetPrevWindow(childWindow.Id); this.UnregisterChild(childWindow); if (nextWndToActivate!=childWindow){ this.ActivateWindow(nextWndToActivate); }if (childWindow.Iframe){childWindow.Iframe.src="javasc\x72ipt:\047\047\x3b"; }eval(this.GetWindowVarName(childWindow.Id)+"\x20= null;"); if (childWindow.Container){ this.ContainerPool.push(childWindow.Container); }};RadEditorWindowManager.prototype.GetPrevWindow= function (id){var bNeedPrev= false; var retWnd=null; for (var i=this.ChildWindows.length-1; i>=0; i--){var wnd=this.ChildWindows[i]; if (wnd && wnd.Id==id){bNeedPrev= true; }else if (wnd && bNeedPrev){return wnd; }else if (null==retWnd){retWnd=wnd; }}return retWnd; };RadEditorWindowManager.prototype.CloseWindow= function (id){var wnd=this.LookupWindow(id); if (wnd){wnd.Close( ); }};RadEditorWindowManager.prototype.ActivateWindow= function (radWindow){if (!radWindow){radWindow=this.ActiveWindow; }if (radWindow){if (radWindow.IsModal){ this.SetCapture(radWindow, false); }if (radWindow!=this.ActiveWindow){if (this.ActiveWindow){ this.ActiveWindow.SetZIndex(this.TopWindowZIndex-1); }radWindow.SetZIndex(this.TopWindowZIndex); this.ActiveWindow=radWindow; }if (radWindow.IsModal){ this.ShowOverImage(radWindow, true); }}};RadEditorWindowManager.prototype.RegisterChild= function (childWindow){ this.ChildWindows[this.ChildWindows.length]=childWindow; };RadEditorWindowManager.prototype.UnregisterChild= function (childWindow){for (var i=0; i<this.ChildWindows.length; i++){var wnd=this.ChildWindows[i]; if (wnd==childWindow){ this.ChildWindows[i]=null; return; }}};RadEditorWindowManager.prototype.SetCapture= function (childWindow,bContainerCapture){try {if (childWindow){childWindow.SetCapture(bContainerCapture); }}catch (ex){}};RadEditorWindowManager.prototype.LookupWindow= function (id){for (var i=0; i<this.ChildWindows.length; i++){var wnd=this.ChildWindows[i]; if (wnd && id==wnd.Id){return wnd; }}return null; };RadEditorWindowManager.prototype.LookupRadWindowByBrowserWindowRef= function (browserWindow){for (var i=0; i<this.ChildWindows.length; i++){var radWindow=this.ChildWindows[i]; if (null!=radWindow && browserWindow==radWindow.Window){return radWindow; }}return null; };RadEditorWindowManager.prototype.GetCurrentRadWindow= function (browserWindow){if (browserWindow.dialogArguments && ( true ==browserWindow.dialogArguments.IsRadWindowArgs)){return browserWindow.dialogArguments.radWindow; }else if (browserWindow.opener!=null && browserWindow.opener.childRadWindow!=null){return browserWindow.opener.childRadWindow; }else {var oLast=this.LookupRadWindowByBrowserWindowRef(browserWindow); return oLast; }};RadEditorWindowManager.prototype.GetWindow= function (id){var wnd=this.LookupWindow(id); if (!wnd){var varName=this.GetWindowVarName(id); eval(varName+"\x20= new\x20\x52a\x64\127\x69ndow(\047"+id+"\047\x29;"); wnd=eval(varName); wnd.Parent=this ; this.RegisterChild(wnd); }return wnd; };RadEditorWindowManager.prototype.GetWindowVarName= function (id){return "\x77in\x64\157\x77.radWin\x64\157\x77_"+id; };RadEditorWindowManager.prototype.GetWindowFromPos= function (x,y){var wnd=null; for (var i=0; i<this.ChildWindows; i++){var childWnd=this.ChildWindows[i]; if (childWnd && childWnd.HitText(x,y)){if (!wnd || wnd.ZIndex<childWnd.ZIndex){wnd=childWnd; }}}return wnd; };RadEditorWindowManager.prototype.OnShowWindow= function (childWindow,visible){if (visible){ this.ActiveWindow=childWindow; }else {if (this.ActiveWindow==childWindow){ this.ActiveWindow=null; }}if (childWindow.IsModal){ this.ShowOverImage(childWindow,visible); }};RadEditorWindowManager.prototype.OnKeyDown= function (evt){switch (evt.keyCode){case 115:if (evt.altKey && this.ActiveWindow){}else if (evt.ctrlKey && this.ActiveWindow){}evt.keyCode=8; break; case 27:if (this.ActiveWindow){ this.ActiveWindow.Close( ); }break; default:return; }evt.cancelBubble= true; evt.returnValue= false; };RadEditorWindowManager.prototype.BuildWrapperTableHtml= function (id,width,height,caption,bIsModal,bHide){var url=document.all?"jav\x61script:\x27\047\x3b": ""; var closeFunc=bHide?"\x53how\x57\151\x6edow(f\x61\154\x73e)": "\x43los\x65\050\x29"; var html=""; html+="\011\011\x3ctab\x6ce border\x3d\047\x30\047\x20id=\x27\122\x61dWin\x64owCo\x6etentWr\x61pper"+id+"\047\x20class=\x27\122a\x64ETable\x57\162\x61\160\x70er\047\x20st\x79le=\x27\167\x69dth: "+width+"\x3bheig\x68\164\x3a"+height+";z-in\x64\145\x78\072\x31\060\x300; pos\x69tion:a\x62solute\x3b\047\x20ce\x6clspaci\x6eg=\047\x30\047 cell\x70addin\x67=\047\x30\047 >\012"+"\x09\011\011\x3ctr  styl\x65=\047\x68eigh\x74:1px;\047>\012"+"\011\x09\011\x09\074\x74d w\x69dth=\047\061\x27 class\x3d\047\x52adE\x54ableW\x72apperH\x65aderL\x65ft\047\x20n\x6fwrap>\x3c\057\x74d>\x0a"+"\x09\011\x09\011\x3ctd wid\x74h=\047\x3100%\x27\040\x63lass=\x27RadET\x61bleW\x72apperH\x65aderC\x65nter\047 nowr\x61p=\047\x74r\x75e\047\x20on\x6doused\x6fwn=\047radW\x69ndow_"+id+".D\x72\141g\x4d\157\x64\145=\x22move\042\073\x20retur\x6e\040rad\x57indo\x77\137"+id+"\x2eOnDragSt\x61\162\x74\050\x65vent);\x27\040\x6fnselec\x74start\x3d\047\x72et\x75rn fal\x73e;\047\x3e\012"+"\x09\011\x09\011\x09\074\163\x70an id=\x27\122\x61\144\x57\151\x6edowC\x61ptio\x6e"+id+"\047 onselec\x74start=\047return\x20false;\x27\040\x63lass=\x27RadER\x61dWin\x64\157\x77Head\x65r\047\x3e"+caption+"\x3c/span\x3e\012"+"\011\x09\011\x09\074\057\x74d>\012"; if (!bIsModal){html+="\011\011\x3ctd w\x69dth=\047\x31\047\040\x63lass=\x27\122\x61\144\x45Tab\x6ceWrapp\x65rHead\x65rCent\x65r\047\x20no\x77rap>\012"+"\x09\x09\011\x09\011\x3cspan c\x6cass=\047RadERa\x64\127\x69ndowB\x75tton\x50inOff\x27\040\x69d=\047\102\x75ttonP\x69n\047\x20on\x63lick=\x27radWi\x6edow_"+id+".\x54\157\x67\x67le\x43anMove(\x74his)\047\076\x26nbsp;\x3c\x2fs\x70an>"+"\x09\011\x09\074\x2ftd>\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 "y\x65s":case "no":case "\x61uto":scrolling=customizedScrolling; break; default:break; }}}html+="\011\011\x09\011\x3ctd\x20width=\x27\061\x27 class\x3d\047\x52adE\x54ableW\x72apper\x48eader\x43enter\x27 nowr\x61p>\012"+"\x09\011\x09\074\x73pan cl\x61ss=\047\x52ad\x45\122\x61dWindo\x77But\x74onClo\x73e\047\x20id=\x27Butto\x6eClose\x27\040\x6fncli\x63k=\047radWi\x6edow_"+id+"."+closeFunc+"\x27>&nbsp;\x3c\x2fsp\x61\156\x3e\012"+"\011\x09\011\x09\074\x2ftd>\x0a"+"\x09\011\x09\011\x3ctd \x77\151\x64th=\047\x31\047\x20cl\x61ss=\047RadET\x61bleWr\x61pperH\x65aderR\x69ght\047 nowr\x61p>\074\x2ft\x64>\012"+"\011\011\x09\074\x2ftr>\012"+"\011\x09\011\x3ctr \x73tyle=\047height\x3a100%\047\x20>\x0a"+"\x09\011\x09\011\074\x74\144\x20style=\x27\x68e\x69gh\x74:100%;\x27 col\x73pan=\0475\047\x3e\012"+"\011\x09\011\x09\011\x3cta\x62\154\x65 height\x3d\047\x3100%\047 styl\x65=\047\x68ei\x67ht:10\x30%\047\x20bor\x64er=\047\060\x27 wid\x74h=\047\061\x300%\047  cel\x6cspaci\x6eg=\047\060\x27 cel\x6cpadd\x69ng=\0470\047\x3e\012"+"\011\x09\011\011\x09\011\x3ctr st\x79le=\047\x68ei\x67\150\x74:100\x25\047\x3e\012"+"\011\x09\011\x09\011\x09\011\x3ctd \x77\151\x64\164h\x3d\047\x31\047\040\x63lass=\x27RadET\x61\142\x6ceWra\x70perBod\x79Left\x27\040\x6eowr\x61\160\x3e\074\x2ftd>\x0a"+"\x09\011\x09\011\x09\011\x09\074\x74d id\x3d\047\x52adWin\x64owCo\x6etentW\x69ndow"+id+"\x27  style\x3d\x27he\x69\147\x68t:100%;\x62order:\x30\160\x78\040\x73ol\x69d blue\x3b\047\x20hei\x67ht=\047\061\x300%\047\040\x77idth\x3d\047\x3100%\x27 clas\x73=\047\x52ad\x45Table\x57rapp\x65rBody\x43ente\x72\047\x20ali\x67n=\047left\x27\040\x76ali\x67n=\x27to\x70\047\x20o\x6esele\x63tsta\x72t=\047retu\x72n f\x61lse;\x27>\012"+"\x09\011\x09\011\x09\011\x09\011\x3ci\x66\162\x61\155\x65 name=\x27RadW\x69ndowC\x6fntent\x27\x20f\x72amebo\x72der=\0470px\047\040\x73tyl\x65=\047\x68eig\x68t:100\x25;wid\x74h:100\x25;bord\x65r:0p\x78 sol\x69d gre\x65n\047\x20i\x64=\047\x52a\x64Windo\x77Con\x74entF\x72ame"+id+"\047 src=\047"+url+"\x27\040\x73crollin\x67\075\x27"+scrolling+"\047\x20border=\x27\156o\x27\040\x3e\074\x2fifra\x6d\145\x3e\012"+"\011\x09\011\x09\011\x09\011\x3c/t\x64>\012"+"\x09\011\x09\011\x09\011\x09\074\x74d w\x69\144\x74h=\047\x31\047 clas\x73=\047\x52ad\x45Table\x57rappe\x72\102\x6fdyRig\x68t\047\x20no\x77rap>\x3c\057\x74d>\012"+"\x09\011\x09\011\x09\011\074\x2ftr>\012"+"\011\x09\011\x09\011\x3c/table\x3e\012"+"\011\x09\011\x09\074\x2ftd\x3e\012"+"\011\x09\011\x3c/tr>\012"+"\011\x09\011\x3ctr sty\x6c\145=\x27height\x3a\061\x70x;\047\x3e\012"+"\011\011\x09\011\x3ctd col\x73pan=\047\x35\047 width\x3d\047\x3100%\x27 styl\x65=\047\x68eig\x68t:1px\x3b\047\x20>\012"+"\x09\011\x09\011\x09\074\x74ab\x6ce borde\x72=\047\x30\047\x20wi\x64th=\x27\061\x300%\047\x20h\x65ight=\x271\047\x20cel\x6cspaci\x6eg=\047\060\x27 cel\x6cpaddi\x6eg=\047\060\x27>\012"+"\011\011\x09\011\x09\011\x3ctr>\012"+"\011\x09\011\x09\011\x09\011\x3ctd \x77idth=\047\061\x27 clas\x73=\047RadET\x61bleWra\x70perFoo\x74erLef\x74\047\x20nowr\x61p>&n\x62sp;\074/td>\012"+"\x09\011\x09\011\x09\011\x09\074td col\x73pan=\047\063\x27 id=\047Bord\x65rBot\x74om\047\x20wi\x64th=\047\061\x300%\047\040\x63las\x73=\047\x52ad\x45Table\x57rappe\x72Foot\x65rCen\x74er\047\x20n\x6fwrap\x3e&nbs\x70;\074\x2ftd\x3e\011\x09\012"+"\x09\011\x09\011\x09\011\x09\074\x74d w\x69dth=\047\x31\047 id=\047Corne\x72Botto\x6dRight\x27 clas\x73=\047\x52ad\x45Table\x57rappe\x72Foot\x65rRigh\x74\047\x20onm\x6fusedo\x77n=\047\162\x61dWind\x6fw_"+id+".Dr\x61gMode=\042\163\x69\172e\x22; retu\x72n radW\x69ndow_"+id+".OnDrag\x53tart(e\x76\145\x6e\x74);\x27 onsel\x65\143\x74start=\x27retu\x72n fal\x73e;\047\x20n\x6fwrap>\x26nbsp;\x3c/td>\012"+"\011\x09\011\x09\011\x09\074\x2ftr>\x0a"+"\x09\011\x09\011\x09\074\x2ftable\x3e\012"+"\011\x09\011\x09\074\x2ftd>\012"+"\011\x09\011\x3c/t\x72>\012"+"\x09\011\x3c/tabl\x65\076\x0a"; return html; };RadEditorWindowManager.prototype.SetOverImage= function (imageId){ this._overImage=document.getElementById(imageId); };RadEditorWindowManager.prototype.GetOverImage= function ( ){if (!this._overImage){ this._overImage=document.getElementById("\117\x56ER_I\x4dG"); }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="\x61b\x73\x6flut\x65"; overImage.style.left=0; overImage.style.top=0; overImage.style.width=viewPortSize.width+"\x70x"; overImage.style.height=viewPortSize.height+"\x70x"; overImage.style.zIndex=wnd.ZIndex; overImage.style.display=""; }else {overImage.style.display="none"; }}};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["GetD\x69alogArgu\x6dents"]= function (isInSpell){if (window["ra\x64Window"]){if (isInSpell){return window["\x72a\x64\x57ind\x6fw"].Argument.CustomArguments; }else {return window["\x72adW\x69\156\x64ow"].Argument; }}else {return null; }};window["i\x73RadWindo\x77"]= true; window["radWind\x6fw"]=GetEditorRadWindowManager( ).GetCurrentRadWindow(window); if (window["radWindo\x77"]){if (window.dialogArguments){window["\x72adWin\x64\157\x77"].Window=window; }window["\x72adWind\x6f\167"].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( )=="\x62utton"))){e.cancelBuble= true; e.returnValue= false; if (e.preventDefault)e.preventDefault( ); return false; }} ; }}

