var __aspxPCWIdSuffix="_PW";function ASPxPCResizeCursorInfo(horizontalDirection,verticalDirection,horizontalOffset,verticalOffset){this.horizontalDirection=horizontalDirection;this.verticalDirection=verticalDirection;this.horizontalOffset=horizontalOffset;this.verticalOffset=verticalOffset;this.course=verticalDirection+horizontalDirection;} ASPxClientPopupControl=_aspxCreateClass(ASPxClientControl,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.leadingAfterInitCall=true;this.adjustInnerControlsSizeOnShow=true;this.animationDelay=30;this.animationMaxDelay=400;this.appearAfter=300;this.disappearAfter=500;this.allowResize=false;this.enableAnimation=true;this.allowCorrectYOffsetPosition=true;this.contentUrl="";this.contentUrlArray=[];this.cookieName="";this.closeAction="OuterMouseClick";this.popupAction="LeftMouseClick";this.popupElementID="";this.popupElementIDArray=[];this.showOnPageLoad=false;this.showOnPageLoadArray=[];this.popupHorizontalAlign=__aspxNotSetAlignIndicator;this.popupVerticalAlign=__aspxNotSetAlignIndicator;this.popupHorizontalOffset=0;this.popupVerticalOffset=0;this.shadowHeight=5;this.shadowWidth=5;this.windows=[];this.windowCount=0;this.isDragged=false;this.isResized=false;this.zIndex=-1;this.left=0;this.top=0;this.isDraggedArray=[];this.isResizedArray=[];this.zIndexArray=[];this.leftArray=[];this.topArray=[];this.height=0;this.width=0;this.heightArray=[];this.widthArray=[];this.isLiveResizingMode=true;this.isPopupPositionCorrectionOn=true;this.SSLSecureBlankUrl="";this.windowElements=new Object();this.hideBodyScrollWhenModal=true;this.popupElement=null;this.popupElements=[];this.headerHeight=0;this.headerHeightArray=[];this.footerHeight=0;this.footerHeightArray=[];this.ResizeBorderSize=6;this.ResizeCornerBorderSize=20;this.CloseButtonClick=new ASPxClientEvent();this.CloseUp=new ASPxClientEvent();this.PopUp=new ASPxClientEvent();this.Resize=new ASPxClientEvent();this.Shown=new ASPxClientEvent();aspxGetPopupControlCollection().Add(this);},Initialize:function(){this.InitializeArrays();if(this.HasDefaultWindow())this.InitializeWindow(-1);for(var i=0;i0){if(this.contentUrlArray.length==0)this.InitializeArray(this.contentUrlArray,"");if(this.popupElementIDArray.length==0)this.InitializeArray(this.popupElementIDArray,"");if(this.showOnPageLoadArray.length==0)this.InitializeArray(this.showOnPageLoadArray,false);if(this.isDraggedArray.length==0)this.InitializeArray(this.isDraggedArray,false);if(this.isResizedArray.length==0)this.InitializeArray(this.isResizedArray,false);if(this.zIndexArray.length==0)this.InitializeArray(this.zIndexArray,-1);if(this.leftArray.length==0)this.InitializeArray(this.leftArray,0);if(this.topArray.length==0)this.InitializeArray(this.topArray,0);if(this.widthArray.length==0)this.InitializeArray(this.widthArray,0);if(this.heightArray.length==0)this.InitializeArray(this.heightArray,0);if(__aspxIE){if(this.headerHeightArray.length==0)this.InitializeArray(this.headerHeightArray,-1);if(this.footerHeightArray.length==0)this.InitializeArray(this.footerHeightArray,-1);}}},InitializeArray:function(array,value){for(var i=0;i0){this.FirstShowWindow(index,false);aspxGetPopupControlCollection().SetWindowElementZIndex(element,this.GetZIndex(index));element.isPopupPositionCorrectionOn=true;}}},AfterInitializeWindow:function(index){if(this.GetShowOnPageLoad(index)&&this.GetZIndex(index)<0){this.FirstShowWindow(index,true);var element=this.GetWindowElement(index);if(element!=null)element.isPopupPositionCorrectionOn=true;}},AttachOnDragStartEventToWindowImages:function(index){this.AttachChildImagesPreventDragStartEvent(this.GetWindowHeaderElement(index));this.AttachChildImagesPreventDragStartEvent(this.GetWindowFooterElement(index));},AttachChildImagesPreventDragStartEvent:function(parentElem){var images=parentElem==null?null:_aspxGetElementsByTagName(parentElem,"img");if(images!=null){for(var i=0;i0)?this.windows.length:this.windowCount;},GetWindowIFrame:function(index){var element=this.GetWindowElement(index);var iFrame=element.overflowElement;if(!_aspxIsExists(iFrame)){iFrame=this.FindWindowIFrame(index);element.overflowElement=iFrame;}return iFrame;},FindWindowIFrame:function(index){return _aspxGetElementById(this.name+"_DXPWIF"+index);},GetWindowModalElement:function(index){var element=this.GetWindowElement(index);if(!_aspxIsExists(element))return;var modalElement=element.modalElement;if(!_aspxIsExists(modalElement)){modalElement=this.FindWindowModalElement(index);element.modalElement=modalElement;if(_aspxIsExists(modalElement)){modalElement.DXModalPopupControl=this;modalElement.DXModalPopupWindowIndex=index;}}return modalElement;},FindWindowModalElement:function(index){return _aspxGetElementById(this.name+"_DXPWMB"+index);},GetWindowElementId:function(index){return this.name+__aspxPCWIdSuffix+index;},GetWindowElement:function(index){if(!_aspxIsExistsElement(this.windowElements[index]))this.windowElements[index]=_aspxGetElementById(this.GetWindowElementId(index));return this.windowElements[index];},GetWindowChild:function(index,idPostfix){return _aspxGetChildById(this.GetWindowElement(index),this.name+idPostfix);},GetWindowContentIFrameDivElementID:function(index){return this.name+"_CIFD"+index;},GetWindowContentIFrameDivElement:function(index){return this.GetWindowChild(index,"_CIFD"+index);},GetWindowContentIFrameElementId:function(index){return this.name+"_CIF"+index;},GetWindowContentIFrameElement:function(index){return this.GetWindowChild(index,"_CIF"+index);},GetWindowContentIFrameUrl:function(index){if(0<=index&&index0)return mainCell.firstChild.offsetWidth;return this.GetWindowWidthInternal(index);}},GetCurrentWindowHeight:function(index){var element=this.GetWindowElement(index);if(element!=null){var mainCell=this.GetWindowMainCell(element);if(mainCell.firstChild.offsetHeight>0)return mainCell.firstChild.offsetHeight;return this.GetWindowHeightInternal(index);}},GetClientPopupPos:function(element,popupElement,pos,isX,isDragged){var index=this.GetWindowIndex(element);var popupPosition=null;if(isDragged)popupPosition=new _aspxPopupPosition(this.GetPosition(index,isX),false);else{popupPosition=isX?this.GetClientPopupPosX(element,popupElement,pos):this.GetClientPopupPosY(element,popupElement,pos);popupPosition.position=_aspxPrepareClientPosForElement(popupPosition.position,element,isX);}if(__aspxFirefox&&_aspxIsExists(this.GetWindowModalElement(index)))popupPosition.position-=isX?_aspxGetDocumentScrollLeft():_aspxGetDocumentScrollTop();if(__aspxIE&&!__aspxIE55&&popupElement!=null&&_aspxIsExistsAbsoluteOrRelativePosParent(popupElement))popupPosition.position-=_aspxGetIEDocumentClientOffset(isX);return popupPosition;},GetClientPopupPosX:function(element,popupElement,x){var mainElement=this.GetWindowMainCell(element);var popupPosition=_aspxGetPopupAbsoluteX(mainElement,popupElement,this.popupHorizontalAlign,this.popupHorizontalOffset,x,this.GetWindowLeft(this.GetWindowIndex(element)));return this.CorrectPopupPositionForClientWindow(element,popupPosition,true);},GetClientPopupPosY:function(element,popupElement,y){var mainElement=this.GetWindowMainCell(element);var popupPosition=_aspxGetPopupAbsoluteY(mainElement,popupElement,this.popupVerticalAlign,this.popupVerticalOffset,y,this.GetWindowTop(this.GetWindowIndex(element)));return(this.allowCorrectYOffsetPosition?this.CorrectPopupPositionForClientWindow(element,popupPosition,false):popupPosition);},CorrectPopupPositionForClientWindow:function(element,popupPosition,isX){if(element.isPopupPositionCorrectionOn){var min=isX?_aspxGetDocumentScrollLeft():_aspxGetDocumentScrollTop();var max=min+(isX?_aspxGetDocumentClientWidth():_aspxGetDocumentClientHeight());max-=(isX?element.offsetWidth+this.shadowWidth:element.offsetHeight+this.shadowHeight);if(popupPosition.position>max)popupPosition.position=max;if(popupPosition.position0&&newHeight>0){_aspxSetStylePosition(resizePanel,newLeft-_aspxGetIEDocumentClientOffset(true),newTop-_aspxGetIEDocumentClientOffset(false));_aspxSetStyleSize(resizePanel,newWidth,newHeight);this.SetWindowLeft(index,newLeft);this.SetWindowTop(index,newTop);}},OnResizeWindow:function(index,cursor,resizePanel){this.SetClientWindowSize(index,resizePanel.offsetWidth,resizePanel.offsetHeight);var element=this.GetWindowElement(index);var mainCell=this.GetWindowMainCell(element);var heightCorrection=mainCell.offsetHeight-resizePanel.offsetHeight;var widthCorrection=mainCell.offsetWidth-resizePanel.offsetWidth;var left=_aspxGetAbsoluteX(resizePanel)-(cursor.horizontalDirection=="w"?widthCorrection:0)-_aspxGetIEDocumentClientOffset(true);var top=_aspxGetAbsoluteY(resizePanel)-(cursor.verticalDirection=="n"?heightCorrection:0)-_aspxGetIEDocumentClientOffset(false);left=_aspxPrepareClientPosForElement(left,element,true);top=_aspxPrepareClientPosForElement(top,element,false);_aspxSetStylePosition(element,left,top);this.DoShowWindowIFrame(index,left,top,__aspxInvalidDimension,__aspxInvalidDimension);},OnResizeStop:function(evt,index,cursor,resizePanel){if(this.allowResize){if(!this.isLiveResizingMode){var collection=aspxGetControlCollection();var windowElement=this.GetWindowElement(index);collection.CollapseControls(windowElement);this.OnResizeWindow(index,cursor,resizePanel);} this.CreateResizeCursorInfo(evt,index);this.UpdateWindowsStateInputElement();this.UpdateWindowsStateCookie();this.RaiseResize(index);if(!this.isLiveResizingMode)collection.AdjustControls(windowElement);}},SetClientWindowSize:function(index,width,height){var element=this.GetWindowElement(index);var mainCell=this.GetWindowMainCell(element);var clientWindow=this.GetWindowClientTable(index);var windowHorizontalTwoBorderSize=mainCell.offsetWidth-clientWindow.offsetWidth;var windowVerticalTwoBorderSize=mainCell.offsetHeight-clientWindow.offsetHeight;var contentIFrameDiv=this.GetWindowContentIFrameDivElement(index);var contentIFrame=this.GetWindowContentIFrameElement(index);width-=windowHorizontalTwoBorderSize;height-=windowVerticalTwoBorderSize;if(width>=0&&height>=0){if(__aspxIE){this.GetWindowContentElement(index).style.height="0px";mainCell.style.height="0px";}else{if(_aspxIsExists(contentIFrame))contentIFrame.style.height="0px";if(_aspxIsExists(contentIFrameDiv))contentIFrameDiv.style.height="0px";} _aspxSetStyleSize(clientWindow,width,height);_aspxSetStyleSize(mainCell,width,height);if(__aspxMozilla){_aspxSetElementDisplay(element,false);_aspxSetElementDisplay(element,true);} _aspxSetStyleSize(element,clientWindow.offsetWidth+this.shadowWidth+windowHorizontalTwoBorderSize,clientWindow.offsetHeight+this.shadowHeight+windowVerticalTwoBorderSize);this.CorrectContentCellHeight(element,true);this.SetWindowWidth(index,clientWindow.offsetWidth);this.SetWindowHeight(index,clientWindow.offsetHeight);if(_aspxIsExists(contentIFrameDiv))contentIFrameDiv.style.height="100%";if(_aspxIsExists(contentIFrame))contentIFrame.style.height="100%";}},CreateResizeCursorInfo:function(evt,index){var element=this.GetWindowElement(index);var mainCell=this.GetWindowMainCell(element);var clientWindow=this.GetWindowClientTable(index);var headerElement=this.GetWindowHeaderElement(index);var left=_aspxGetAbsoluteX(mainCell);var top=_aspxGetAbsoluteY(mainCell);var x=_aspxGetEventX(evt);var y=_aspxGetEventY(evt);var leftOffset=Math.abs(x-left);var rightOffset=Math.abs(x-left-mainCell.offsetWidth+1);var topOffset=Math.abs(y-top);var bottomOffset=Math.abs(y-top-mainCell.offsetHeight+1);var cursorInfo=this.CreateResizeBorderCursorInfo(index,leftOffset,rightOffset,topOffset,bottomOffset);var gripCell=this.GetWindowHeaderGripElement(index);if(gripCell){var gripCursorInfo=this.CreateGripCursorInfo(index,mainCell,gripCell,rightOffset,bottomOffset);if(_aspxIsExists(gripCursorInfo))cursorInfo=gripCursorInfo;} this.UpdateResizeCursor(clientWindow,cursorInfo.verticalDirection,cursorInfo.horizontalDirection);this.UpdateResizeCursor(mainCell,cursorInfo.verticalDirection,cursorInfo.horizontalDirection);if(_aspxIsExists(headerElement))this.UpdateResizeCursor(headerElement,cursorInfo.verticalDirection,cursorInfo.horizontalDirection);return cursorInfo;},CreateGripCursorInfo:function(index,mainCell,gripCell,rightOffset,bottomOffset){var gripWidth=mainCell.offsetWidth-(_aspxGetAbsoluteX(gripCell)-_aspxGetAbsoluteX(mainCell));var gripHeight=mainCell.offsetHeight-(_aspxGetAbsoluteY(gripCell)-_aspxGetAbsoluteY(mainCell));if(gripHeight>bottomOffset&&gripWidth>rightOffset)return new ASPxPCResizeCursorInfo("e","s",rightOffset,bottomOffset);return null;},CreateResizeBorderCursorInfo:function(index,leftOffset,rightOffset,topOffset,bottomOffset){var ResizeBorderSize=this.ResizeBorderSize;var verticalDirection=this.GetResizeVerticalCourse(ResizeBorderSize,topOffset,bottomOffset);ResizeBorderSize=verticalDirection!=""?this.ResizeCornerBorderSize:this.ResizeBorderSize;var horizontalDirection=this.GetResizeHorizontalCourse(ResizeBorderSize,leftOffset,rightOffset);if(verticalDirection==""&&horizontalDirection!="")verticalDirection=this.GetResizeVerticalCourse(this.ResizeCornerBorderSize,topOffset,bottomOffset);var horizontalOffset=leftOffsettopOffset)return "n";if(ResizeBorderSize>bottomOffset)return "s";return "";},GetResizeHorizontalCourse:function(ResizeBorderSize,leftOffset,rightOffset){if(ResizeBorderSize>leftOffset)return "w";if(ResizeBorderSize>rightOffset)return "e";return "";},UpdateResizeCursor:function(element,verticalDirection,horizontalDirection){var cursor=verticalDirection+horizontalDirection;if(cursor!=""){cursor+="-resize";this.ShowTemporaryCursor(element,cursor);}else this.HideTemporaryCursor(element);},ShowTemporaryCursor:function(element,cursor){_aspxChangeStyleAttribute(element,"cursor",cursor);},HideTemporaryCursor:function(element){_aspxRestoreStyleAttribute(element,"cursor");},ResizeWindowIFrame:function(index){if(!this.renderIFrameForPopupElements)return;if(!this.InternalIsWindowVisible(index))return;var iFrame=this.GetWindowIFrame(index);if(_aspxIsExists(iFrame)){var cell=this.GetWindowMainCell(this.GetWindowElement(index));_aspxSetStyleSize(iFrame,cell.offsetWidth,cell.offsetHeight);}},ShowDragCursor:function(index){var dragElement=this.GetDragElement(index);if(dragElement)this.ShowTemporaryCursor(dragElement,"move");},HideDragCursor:function(index){var dragElement=this.GetDragElement(index);if(dragElement!=null)this.HideTemporaryCursor(dragElement);},GetDragElement:function(index){var headerElement=this.GetWindowHeaderElement(index);var element=this.GetWindowElement(index);if(element!=null)return(headerElement!=null?headerElement:this.GetWindowMainCell(element));return null;},OnActivateMouseDown:function(evt,index){this.OnActivate(index);},OnCloseButtonClick:function(index){this.RaiseCloseButtonClick(index);this.DoHideWindow(index);},OnMouseDown:function(evt,index,isDraggingAllowed){if(_aspxGetIsLeftButtonPressed(evt)){_aspxClearSelection();var isResizing=false;if(this.allowResize)isResizing=this.OnResizeStart(evt,index);if(isDraggingAllowed&&!isResizing)this.OnDragStart(evt,index);}},OnMouseMove:function(evt,index){this.CreateResizeCursorInfo(evt,index);},StartAnimation:function(animationDivElement,index,horizontalPopupPosition,verticalPopupPosition){var element=this.GetWindowMainTable(animationDivElement);var clientX=horizontalPopupPosition.position;var clientY=verticalPopupPosition.position;var args="(\""+this.name+"\", "+index+")";var onTimerString="aspxPCATimer"+args;var onAnimStopCallString="aspxPCAStop"+args;_aspxInitAnimationDiv(animationDivElement,clientX,clientY,onTimerString,onAnimStopCallString);var horizontalDirection=_aspxGetAnimationHorizontalDirection(horizontalPopupPosition,this.popupHorizontalAlign,this.popupVerticalAlign);var verticalDirection=_aspxGetAnimationVerticalDirection(verticalPopupPosition,this.popupHorizontalAlign,this.popupVerticalAlign);var xPos=horizontalDirection*animationDivElement.offsetHeight;var yPos=verticalDirection*animationDivElement.offsetWidth;_aspxSetStylePosition(element,xPos,yPos);_aspxSetElementVisibility(animationDivElement,true);this.DoShowWindowIFrame(index,clientX,clientY,0,0);animationDivElement.timerID=window.setTimeout(animationDivElement.onTimerString,this.animationDelay);},GetWindowsState:function(){var state="";if(this.HasDefaultWindow()){state+=this.GetWindowState(-1);}for(var i=0;i=0;i--){var id=this.visiblePopupWindowIds[i];if(id==excptId)continue;if(srcElement!=null&&_aspxGetParentById(srcElement,id)!=null)continue;var pos=id.lastIndexOf(__aspxPCWIdSuffix);var name=id.substring(0,pos);var index=id.substr(pos+__aspxPCWIdSuffix.length);var popupControl=aspxGetPopupControlCollection().Get(name);if(popupControl!=null&&((popupControl.closeAction!="CloseButton"&&popupControl.closeAction!="None")||applyToAll)){popupControl.DoHideWindow(parseInt(index));}}},DoShowAtCurrentPos:function(name,index){var pc=this.Get(name);if(pc!=null&&!pc.InternalIsWindowVisible(index))pc.DoShowWindowAtPos(index,this.overXPos,this.overYPos,false,true,true);},ActivateWindowElement:function(element){var visibleWindowsCount=this.visiblePopupWindowIds.length;if(__aspxPopupControlZIndex<=element.style.zIndex&&element.style.zIndex!=visibleWindowsCount*2+__aspxPopupControlZIndex){this.DeleteWindowFromZIndexOrder(element);} this.SetWindowElementZIndex(element,__aspxPopupControlZIndex+visibleWindowsCount*2);},DeleteWindowFromZIndexOrder:function(element){for(var i=this.visiblePopupWindowIds.length-1;i>=0;i--){var windowElement=_aspxGetElementById(this.visiblePopupWindowIds[i]);if(!_aspxIsExists(windowElement))_aspxArrayRemoveAt(this.visiblePopupWindowIds,i);else if(windowElement.style.zIndex>element.style.zIndex)this.SetWindowElementZIndex(windowElement,windowElement.style.zIndex-2);}},SetWindowElementZIndex:function(element,zIndex){element.style.zIndex=zIndex;var iFrame=element.overflowElement;if(_aspxIsExists(iFrame))iFrame.style.zIndex=zIndex-1;var modalElement=element.modalElement;if(_aspxIsExists(modalElement))modalElement.style.zIndex=zIndex-1;this.UpdateWindowsStateInputElement(element.id);this.UpdateWindowsStateCookie(element.id);},AdjustModalElementsBounds:function(){for(var i=0;i-1;},IsDisappearTimerActive:function(){return this.disappearTimerID>-1;},SetAppearTimer:function(name,index,timeout){this.appearTimerID=_aspxSetTimeout("aspxPEMOverTimer(\""+name+"\", "+index+")",timeout);},SetDisappearTimer:function(name,index,timeout){this.disappearTimerID=_aspxSetTimeout("aspxPEMOutTimer(\""+name+"\", "+index+")",timeout);},InitDragObject:function(control,index,x,y){this.draggingControl=control;this.draggingWindowIndex=index;this.gragXOffset=x;this.gragYOffset=y;this.selectBanned=true;},InitOverObject:function(control,index,evt){this.overControl=control;this.overWindowIndex=index;this.SaveCurrentMouseOverPos(evt);},InitResizeObject:function(control,index,cursor,resizePanel){this.resizeControl=control;this.resizeIndex=index;this.resizeCursor=cursor;this.resizePanel=resizePanel;this.selectBanned=true;},IsResizeInint:function(){return this.resizeControl!=null;},ClearDragObject:function(){this.draggingControl=null;this.draggingWindowIndex=-1;this.gragXOffset=0;this.gragYOffset=0;this.selectBanned=this.resizeControl!=null;},ClearResizeObject:function(){this.resizeControl=null;this.resizeIndex=-2;this.resizeCursor="";this.selectBanned=this.draggingControl!=null;this.resizePanel.parentNode.removeChild(this.resizePanel);},Drag:function(evt){var x=_aspxGetEventX(evt)+this.gragXOffset;var y=_aspxGetEventY(evt)+this.gragYOffset;this.draggingControl.OnDrag(this.draggingWindowIndex,x,y);},DragStop:function(){this.draggingControl.OnDragStop(this.draggingWindowIndex);this.ClearDragObject();},ResizeStop:function(evt){this.resizeControl.OnResizeStop(evt,this.resizeIndex,this.resizeCursor,this.resizePanel);aspxGetPopupControlCollection().ClearResizeObject();},OnPWMouseMove:function(evt,name,index){if(this.draggingControl==null&&this.overControl==null&&this.resizeControl==null){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null)pc.OnMouseMove(evt,index);}},OnMouseDown:function(evt){var srcElement=_aspxGetEventSource(evt);this.DoHideAllWindows(srcElement,"",false);aspxGetPopupControlCollection().ClearAppearTimer();},OnMouseMove:function(evt){if(this.draggingControl!=null){if(__aspxIE&&!_aspxGetIsLeftButtonPressed(evt))return this.DragStop();else this.Drag(evt);}else if(this.overControl!=null){this.OnMouseOver(evt);}else if(this.resizeControl!=null){if(__aspxIE&&!_aspxGetIsLeftButtonPressed(evt))this.ResizeStop(evt);else this.resizeControl.OnResize(evt,this.resizeIndex,this.resizeCursor,this.resizePanel);}},OnMouseOver:function(evt){var element=_aspxFindParentPopupElementByEvent(evt,aspxTestPopupControlOverElement);if(element!=null){this.ClearDisappearTimer();this.SaveCurrentMouseOverPos(evt);return _aspxCancelBubble(evt);} this.OnMouseOut();},OnMouseOut:function(){if(!_aspxIsExists(this.overControl)||_aspxIsExists(this.draggingControl))return;this.ClearAppearTimer();if(this.overControl.closeAction=="MouseOut"&&this.overControl.InternalIsWindowVisible(this.overWindowIndex)){if(!this.IsDisappearTimerActive())this.SetDisappearTimer(this.overControl.name,this.overWindowIndex,this.overControl.disappearAfter);}else this.OverStop();},OnMouseUp:function(evt){if(this.draggingControl!=null)this.DragStop();if(this.resizeControl!=null)this.ResizeStop(evt);},OnResize:function(evt){this.AdjustModalElementsBounds();},OnScroll:function(evt){this.AdjustModalElementsBounds();},OnSelectStart:function(){return!this.selectBanned;},OverStop:function(){this.overControl=null;this.overWindowIndex=-1;},SaveCurrentMouseOverPos:function(evt){this.overXPos=_aspxGetEventX(evt);this.overYPos=_aspxGetEventY(evt);},RegisterVisibleModalElement:function(element){if(_aspxArrayIndexOf(this.visibleModalElements,element)==-1)_aspxArrayPush(this.visibleModalElements,element);},UnregisterVisibleModalElement:function(element){_aspxArrayRemove(this.visibleModalElements,element);},RegisterVisibleWindow:function(element){if(_aspxArrayIndexOf(this.visiblePopupWindowIds,element.id)==-1)_aspxArrayPush(this.visiblePopupWindowIds,element.id);},UnregisterVisibleWindow:function(element){this.DeleteWindowFromZIndexOrder(element);_aspxArrayRemove(this.visiblePopupWindowIds,element.id);},UpdateWindowsStateCookie:function(id){var pos=id.lastIndexOf(__aspxPCWIdSuffix);var name=id.substring(0,pos);var popupControl=aspxGetPopupControlCollection().Get(name);if(popupControl!=null)popupControl.UpdateWindowsStateCookie(false);},UpdateWindowsStateInputElement:function(id){var pos=id.lastIndexOf(__aspxPCWIdSuffix);var name=id.substring(0,pos);var popupControl=aspxGetPopupControlCollection().Get(name);if(popupControl!=null)popupControl.UpdateWindowsStateInputElement(false);},HideAllWindows:function(){this.DoHideAllWindows(null,"",true);}});var __aspxPopupControlCollection=null;function aspxGetPopupControlCollection(){if(__aspxPopupControlCollection==null)__aspxPopupControlCollection=new ASPxClientPopupControlCollection();return __aspxPopupControlCollection;} ASPxClientPopupWindow=_aspxCreateClass(null,{constructor:function(popupControl,index,name){this.popupControl=popupControl;this.index=index;this.name=name;},GetHeaderImageUrl:function(){return this.popupControl.GetWindowHeaderImageUrl(this.index);},SetHeaderImageUrl:function(value){this.popupControl.SetWindowHeaderImageUrl(this.index,value);},GetFooterImageUrl:function(){return this.popupControl.GetWindowFooterImageUrl(this.index);},SetFooterImageUrl:function(value){this.popupControl.SetWindowFooterImageUrl(this.index,value);},GetHeaderNavigateUrl:function(){return this.popupControl.GetWindowHeaderNavigateUrl(this.index);},SetHeaderNavigateUrl:function(value){this.popupControl.SetWindowHeaderNavigateUrl(this.index,value);},GetFooterNavigateUrl:function(){return this.popupControl.GetWindowFooterNavigateUrl(this.index);},SetFooterNavigateUrl:function(value){this.popupControl.SetWindowFooterNavigateUrl(this.index,value);},GetHeaderText:function(){return this.popupControl.GetWindowHeaderText(this.index);},SetHeaderText:function(value){this.popupControl.SetWindowHeaderText(this.index,value);},GetFooterText:function(){return this.popupControl.GetWindowFooterText(this.index);},SetFooterText:function(value){this.popupControl.SetWindowFooterText(this.index,value);}});ASPxClientPopupWindowEventArgs=_aspxCreateClass(ASPxClientEventArgs,{constructor:function(processOnServer,window){this.constructor.prototype.constructor.call(this);this.window=window;}});function aspxPEMOverTimer(name,index){aspxGetPopupControlCollection().DoShowAtCurrentPos(name,index);} function aspxPEMOutTimer(name,index){var pc=aspxGetPopupControlCollection().Get(name);aspxGetPopupControlCollection().OverStop();if(pc!=null)pc.DoHideWindow(index);} function aspxPWCBClick(name,index){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null)pc.OnCloseButtonClick(index);} function aspxPWCBMDown(evt){return _aspxCancelBubble(evt);} function aspxPEMOver(evt){var element=_aspxFindParentPopupElementByEvent(evt,aspxTestPopupControlElement);if(element!=null){var popupControl=element.DXPopupControl;var index=element.DXPopupWindowIndex;if(!popupControl.InternalIsWindowVisible(index)){aspxGetPopupControlCollection().SetAppearTimer(popupControl.name,index,popupControl.appearAfter);aspxGetPopupControlCollection().InitOverObject(popupControl,index,evt);}}} function aspxPWMEMDown(evt){var element=_aspxGetEventSource(evt);if(element!=null){var popupElement=element.DXModalPopupControl.GetPopupElement(element.DXModalPopupWindowIndex);popupElement.isPopuped=true;}} function aspxPEMEvent(evt){var element=_aspxFindParentPopupElementByEvent(evt,aspxTestPopupControlElement);if(element!=null){if(evt.type=="mousedown"){if(element.DXPopupControl.InternalIsWindowVisible(element.DXPopupWindowIndex))element.isPopuped=true;else element.isPopuped=false;aspxGetPopupControlCollection().OnMouseDown(evt);}else{if(element.DXPopupControl.popupAction=="RightMouseClick"||_aspxGetIsLeftButtonPressed(evt)){if(element.DXPopupControl.popupAction=="RightMouseClick")_aspxPreventContextMenu(evt);if(!(element.isPopuped&&element.DXPopupControl.closeAction=="OuterMouseClick"))element.DXPopupControl.DoShowWindow(element.DXPopupWindowIndex,evt);if(element.DXPopupControl.closeAction=="MouseOut")aspxGetPopupControlCollection().InitOverObject(element.DXPopupControl,element.DXPopupWindowIndex,evt);return false;}}}} function aspxPWDGMDown(evt,name,index){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null){pc.OnActivateMouseDown(evt,index);pc.OnMouseDown(evt,index,true);}if(!__aspxIE)evt.preventDefault();return aspxPWCBMDown(evt);} function aspxPWGripMDown(evt,name,index){aspxPWMDown(evt,name,index,false);return aspxPWCBMDown(evt);} function aspxPWMDown(evt,name,index,isDraggingAllowed){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null){pc.OnActivateMouseDown(evt,index);pc.OnMouseDown(evt,index,isDraggingAllowed);}} function aspxPWResize(name,index){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null)pc.ResizeWindowIFrame(index);} function aspxPWMMove(evt,name,index){aspxGetPopupControlCollection().OnPWMouseMove(evt,name,index);} function aspxPCATimer(name,index){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null)pc.OnAnimationTimer(index);} function aspxPCAStop(name,index){var pc=aspxGetPopupControlCollection().Get(name);if(pc!=null)pc.OnAnimationStop(index);} _aspxAttachEventToDocument("mousedown",aspxPopupControlDocumentMouseDown);function aspxPopupControlDocumentMouseDown(evt){if(_aspxFindParentPopupElementByEvent(evt,aspxTestPopupControlElement)==null)return aspxGetPopupControlCollection().OnMouseDown(evt);} _aspxAttachEventToDocument("mouseup",aspxPopupControlDocumentMouseUp);function aspxPopupControlDocumentMouseUp(evt){return aspxGetPopupControlCollection().OnMouseUp(evt);} _aspxAttachEventToDocument("mousemove",aspxPopupControlDocumentMouseMove);function aspxPopupControlDocumentMouseMove(evt){if(typeof(aspxGetPopupControlCollection)!="undefined")aspxGetPopupControlCollection().OnMouseMove(evt);} _aspxAttachEventToDocument("mouseout",aspxPopupControlDocumentMouseOut);function aspxPopupControlDocumentMouseOut(){if(typeof(aspxGetPopupControlCollection)!="undefined")aspxGetPopupControlCollection().OnMouseOut();} _aspxAttachEventToElement(window,"resize",aspxPopupControlWindowResize);function aspxPopupControlWindowResize(evt){aspxGetPopupControlCollection().OnResize(evt);} _aspxAttachEventToElement(window,"scroll",aspxPopupControlWindowScroll);function aspxPopupControlWindowScroll(evt){aspxGetPopupControlCollection().OnScroll(evt);} _aspxAttachEventToDocument("selectstart",aspxPopupControlDocumentSelectStart);function aspxPopupControlDocumentSelectStart(evt){var ret=aspxGetPopupControlCollection().OnSelectStart(evt);if(!ret)return false;} function aspxTestPopupControlElement(element){return(_aspxIsExists(element.DXPopupControl)&&_aspxIsExists(element.DXPopupWindowIndex));} function aspxTestPopupControlOverElement(element){var collection=aspxGetPopupControlCollection();var windowId=collection.overControl.GetWindowElementId(collection.overWindowIndex);var popupElementId=collection.overControl.GetPopupElement(collection.overWindowIndex).id;return(element.id==windowId||element.id==popupElementId);}