AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlCalendarPeer",!1);
AdfDhtmlCalendarPeer.prototype.InitDomElement=function(a,b){AdfDhtmlCalendarPeer.superclass.InitDomElement.call(this,a,b);AdfDomUtils.isInVisibleSubtree(b)&&(this._restoreScrollPosition(a,b),this.isScrollRestored=!0);this._nextZIndex=10;if(null!=a.getDropTarget()&&null==a.getDragSource()){var d=new AdfCalendarDragSource(AdfDnDContext.ACTION_MOVE,AdfDnDContext.ACTION_MOVE);a.setDragSource(d)}this._splitterid=a.getClientId()+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._SPLITTER_COMPONENT_ID;
if(d=AdfAgent.AGENT.getElementById(this._splitterid))d.style.top=d.parentNode.firstChild.offsetHeight+"px";this._isBusy=!1};
AdfDhtmlCalendarPeer.prototype.BindToComponent=function(a,b){AdfDhtmlCalendarPeer.superclass.BindToComponent.call(this,a,b);var d=AdfPage.PAGE,e=d.getLookAndFeel(),f=a.getClientId()+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._DATE_RANGE_TOOLBAR_ITEM_ID;if(f=AdfAgent.AGENT.getElementById(f))e=e.getTranslatedString(AdfDhtmlCalendarPeer._CAL_CURRENT_ACTIVITY_DISPLAY_RANGE_ANNOUNCE_MSG,f.innerHTML),d.announceToAssistiveTechnology(e);if(a.getProperty(AdfDhtmlCalendarPeer._VIEW_KEY)==AdfDhtmlCalendarPeer._VIEW_WEEK){d=
a.getClientId();e=null;for(f=0;null==e&&7>f;f++)e=this._getAllDayActFocus(d,f,AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_FIRST_ALLDAY);e&&e.setAttribute("tabIndex","0")}};AdfDhtmlCalendarPeer.prototype.ComponentRemoved=function(a){this._saveScrollAndSplitterPosition(a);this._killCalendarActivityMouseTimeout();AdfDhtmlCalendarPeer.superclass.ComponentRemoved.call(this,a)};
AdfDhtmlCalendarPeer.InitSubclass=function(){AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.MOUSE_DOWN_EVENT_TYPE,AdfUIInputEvent.CLICK_EVENT_TYPE,AdfUIInputEvent.DOUBLE_CLICK_EVENT_TYPE,AdfActionEvent.ACTION_EVENT_TYPE,AdfUIInputEvent.KEY_UP_EVENT_TYPE,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE,AdfUIInputEvent.MOUSE_IN_EVENT_TYPE);this._CALENDAR_ACTIVITY_KEY="_adfAct";this._CALENDAR_ACTIVITY_ALL_DAY_KEY="_adfActAD";this._CALENDAR_ACTIVITY_DURATION_KEY=
"_adfActDu";this._CALENDAR_DAY_KEY="_adfDay";this._CALENDAR_DAY_CELL_KEY="_adfDyCl";this._CALENDAR_ACTIVE_DATE_KEY="_adfActive";this._CALENDAR_TIME_SLOT_KEY="_adfTm";this._RESIZE_TIME_INDICATOR_KEY="_adfRi";this._RESIZE_All_DAY_INDICATOR_KEY="_adfRiAD";this._KILL_HOVER_INDICATOR_KEY="_adfNoHov";this._ALL_DAY_DURATION_TEXT_KEY="_adDurtxt";this._ALL_DAY_HEADER_TEXT_KEY="_adHdtxt";this._HAS_CALENDAR_DAY_LINK="_adfcdl";this._TIME_ACTIVITY_COLUMN_KEY="_adfTmAtCm";this._SCROLL_DAY_KEY="scrDay";this._SCROLL_LIST_KEY=
"scrList";this._SCROLL_START_HOUR="stHr";this._ALL_DAY_CONTAINER_SUB_ID="allDayC";this._SPLITTER_COMPONENT_ID="_adfCalSp";this._DATE_RANGE_TOOLBAR_ITEM_ID="_adfCalDR";this._START_HOUR_SUBID_KEY="startHour";this._FACET_ID_ACTIVITY_HOVER="_adfIdAH";this._FACET_ID_ACTIVITY_DETAIL="_adfIdATL";this._FACET_ID_ACTIVITY_CONTEXT_MENU="_adfIdACM";this._FACET_ID_ACTIVITY_DELETE="_adfIdAD";this._FACET_ID_CREATE="_adfIdC";this._FACET_ID_CONTEXT_MENU="_adfIdCM";this._VIEW_KEY="view";this._VIEW_DAY="day";this._VIEW_WEEK=
"week";this._VIEW_MONTH="month";this._VIEW_LIST="list";this._TIME_SLOTS_PER_HOUR="timeSlotsPerHour";this._SCROLL_DAY_HEIGHT="scrDayHeight";this._ALLDAY="ALLDAY";this._TIME="TIME";this._DURATION="DURATION";this._VIEW_BUTTON_ID_DAY="_adfCalDV";this._VIEW_BUTTON_ID_WEEK="_adfCalWV";this._VIEW_BUTTON_ID_MONTH="_adfCalMV";this._VIEW_BUTTON_ID_LIST="_adfCalLV";this._DATE_BUTTON_ID_TODAY="_adfCalTD";this._DATE_BUTTON_ID_PREVIOUS="_adfCalPD";this._DATE_BUTTON_ID_NEXT="_adfCalND";this._EVENT_TRIGGER_MOUSE=
"MOUSE";this._EVENT_TRIGGER_FOCUS="FOCUS";this._EVENT_TRIGGER_KEY="KEY";this._EVENT_TRIGGER_HOVER="HOVER";this._EVENT_TRIGGER_CONTEXT_MENU="CONTEXT_MENU";this._EVENT_BUTTON_NONE="NONE";this._EVENT_BUTTON_LEFT="LEFT";this._EVENT_BUTTON_MIDDLE="MIDDLE";this._EVENT_BUTTON_RIGHT="RIGHT";this._MONTH_GRID_ID="mg";this._MONTH_HEADER_ID="mh";this._CAL_MONTH_OVERFLOW_LINK="ol";this._CAL_MONTH_TIMED_ACTIVITY_WRAPPER="taw";this._CAL_MONTH_OVERFLOW_LINK_CLASS="af|calendar::month-overflow-link";this._CAL_MONTH_OVERFLOW_LINK_WRAPPER_CLASS=
"af|calendar::month-overflow-link-wrapper";this._CAL_MONTH_NUM_OVERFLOW="no";this._CAL_MONTH_OVERFLOW_LINK_TEXT="af_calendar.LABEL_OVERFLOW";this._CAL_MONTH_OVERFLOW_LINK_LABEL="af_calendar.TIP_MORE_ACTIVITIES";this._CAL_CURRENT_ACTIVITY_DISPLAY_RANGE_ANNOUNCE_MSG="af_calendar.TIP_CURRENT_ACTIVITY_DISPLAY_RANGE_ANNOUNCE_MSG";this._MONTH_ROW_ID="_adfCalMR";this._CALENDAR_WEEK_TIMED_ACTIVITIES_CELL_SUB_ID="tact";this._CALENDAR_WEEK_HEADER_ID="wh";this._CAL_WEEK_FOCUS_FIRST_ALLDAY=0;this._CAL_WEEK_FOCUS_LAST_ALLDAY=
1;this._CAL_WEEK_FOCUS_PREV_ALLDAY=2;this._CAL_WEEK_FOCUS_NEXT_ALLDAY=3;this._CAL_ACT_COL_NUM="arc";this._CAL_ACT_ROW_NUM="arw";this._DROP_TARGET_CLASS="p_AFDropTarget";this._DRAG_SOURCE_CLASS="p_AFDragSource";this._DRAG_END_CLASS="p_AFDragEnd";this._MOVEABLE_CLASS="p_AFMoveable";this._AUTOSCROLL_MARGIN=20;this._PADDING_AFTER_ALL_DAY_ACTIVITIES=15;this._NAMING_SEP=":";this._MONTH_VIEW_ALLDAY_HT="af|calendar-tr-month-all-day-activity-height"};
AdfDhtmlCalendarPeer.prototype.HandleComponentContextMenu=function(a){if(!this.IsBusy()){var b=a.getNativeEventTarget();if(b){var d=this.getDomElement(),e=this._getParentActivity(d,b);e&&d!=e?this._handleActivityContextMenu(a,d,e,!1):(e=this._getComponentEventSource(a),this._queueCalendarEvent(e,a,d,b,null,0,AdfDhtmlCalendarPeer._EVENT_BUTTON_NONE,AdfDhtmlCalendarPeer._EVENT_TRIGGER_CONTEXT_MENU)&&this._showContextMenu(e,d,a,AdfDhtmlCalendarPeer._FACET_ID_CONTEXT_MENU))}}};
AdfDhtmlCalendarPeer.prototype.HandleComponentMouseDown=function(a){if(!this.IsBusy()){var b=a.getNativeEventTarget(),d=AdfAgent.AGENT;delete this._eatMouseClick;var e=d.getAttribute(b,AdfDhtmlCalendarPeer._RESIZE_TIME_INDICATOR_KEY),b=d.getAttribute(b,AdfDhtmlCalendarPeer._RESIZE_All_DAY_INDICATOR_KEY);if(a.isLeftButtonPressed()&&(e||b))this._hideActivityHoverPopup(),e?this._handleTimeResizeIndicatorMouseDown(a):this._handleAlldayResizeIndicatorMouseDown(a),a.cancel(),a.stopBubbling(),this._eatMouseClick=
!0}};
AdfDhtmlCalendarPeer.prototype.HandleComponentMouseOver=function(a){if(!this.IsBusy()){var b=this.getDomElement(),d=this.getComponent(),e=a.getNativeEventTarget(),f=this._getParentActivity(b,e);this._changeCursorForMovableActivity(d,f);if(a=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_HOVER)){var g=!1;1==e.nodeType&&"IMG"==e.tagName&&(g=!0);g||(g=this._getParentWithAttr(f,e,AdfDhtmlCalendarPeer._KILL_HOVER_INDICATOR_KEY));if(g)this._killCalendarActivityMouseTimeout();else if(f&&
b!=f){if(b=f.id,e=this._calendarActivityMouseId,(f=this._calendarActivityMouseTimeout)&&(e&&e!=b)&&this._killCalendarActivityMouseTimeout(),null==f&&(!this._resizedActivity&&!this._draggedActivity)&&(a=d.findComponent(a),null==e||e!=b||!a.isPopupVisible()))this._calendarActivityMouseId=b,d={componentId:d.getClientId(),activityRootId:b},this._calendarActivityMouseTimeout=page.scheduleTimer(this,this._onMouseOverTimeout,d,1E3)}else null!=this._calendarActivityMouseId&&this._killCalendarActivityMouseTimeout()}}};
AdfDhtmlCalendarPeer.prototype.HandleComponentClick=function(a){this.IsBusy()||this._eatMouseClick||this._handleClickEvents(a,1)};AdfDhtmlCalendarPeer.prototype.HandleComponentDblClick=function(a){this.IsBusy()||this._handleClickEvents(a,2)};
AdfDhtmlCalendarPeer.prototype.HandleComponentKeyDown=function(a){if(!this.IsBusy()){var b=a.getNativeEvent(),d=b.keyCode;if(AdfKeyStroke.ENTER_KEY==d||AdfKeyStroke.M_KEY==d){var e=this.getDomElement(),f=this.getComponent(),g=a.getNativeEventTarget(),h=this._getParentActivity(e,g);if(h&&e!=h)AdfKeyStroke.M_KEY==d&&b.ctrlKey&&b.altKey?this._handleActivityContextMenu(a,e,h,!0):AdfKeyStroke.ENTER_KEY==d&&(a=a.getKeyStroke(),this._queueCalendarActivityEvent(f,h,a,0,AdfDhtmlCalendarPeer._EVENT_BUTTON_NONE,
AdfDhtmlCalendarPeer._EVENT_TRIGGER_KEY),this._launchPopupFacet(f,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_DETAIL));else if(h=this._getDisplayChangeElement(e,g))this._hideActivityHoverPopup(),h=AdfAgent.AGENT.getAttribute(h,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY),AdfCalendarDisplayChangeEvent.queue(f,h,AdfDhtmlCalendarPeer._VIEW_DAY)}}};
AdfDhtmlCalendarPeer.prototype.HandleComponentKeyUp=function(a){if(!this.IsBusy()){var b=this.getDomElement(),d=a.getNativeEventTarget(),e=this._getParentActivity(b,d),f=this.getComponent().getProperty(AdfDhtmlCalendarPeer._VIEW_KEY),g=this.getComponent(),h=a.getKeyStroke(),k=a.getKeyCode();if(e&&b!=e){if(AdfKeyStroke.TAB_KEY==k||AdfKeyStroke.ARROWDOWN_KEY==k||AdfKeyStroke.ARROWUP_KEY==k||AdfKeyStroke.ARROWRIGHT_KEY==k||AdfKeyStroke.ARROWLEFT_KEY==k){if(f==AdfDhtmlCalendarPeer._VIEW_MONTH)return this._handleKeyUpForMonth(k,
e,a);if(f==AdfDhtmlCalendarPeer._VIEW_WEEK)return this._handleKeyUpForWeek(k,e,a);if(f==AdfDhtmlCalendarPeer._VIEW_DAY)return this._handleKeyUpForDay(k,e,a);if(f==AdfDhtmlCalendarPeer._VIEW_LIST)return this._handleKeyUpForList(k,e,a)}AdfKeyStroke.ENTER_KEY!=k&&(this._queueCalendarActivityEvent(g,e,h,0,AdfDhtmlCalendarPeer._EVENT_BUTTON_NONE,AdfDhtmlCalendarPeer._EVENT_TRIGGER_KEY),AdfKeyStroke.DELETE_KEY==k&&this._launchPopupFacet(g,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_DELETE))}else if(null!=AdfAgent.AGENT.getAttribute(d,
AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY))return f==AdfDhtmlCalendarPeer._VIEW_DAY?this._handleKeyUpForDay(k,d):f==AdfDhtmlCalendarPeer._VIEW_WEEK?this._handleKeyUpForWeek(k,d):f==AdfDhtmlCalendarPeer._VIEW_MONTH?this._handleKeyUpForMonth(k,d):f==AdfDhtmlCalendarPeer._VIEW_LIST?this._handleKeyUpForList(k,d):!1}};
AdfDhtmlCalendarPeer.prototype.HandleComponentAction=function(a){if(!this.IsBusy()){var b=this.getComponent(),d=b.getClientId(),e=this._getComponentEventSource(a).getClientId();d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._VIEW_BUTTON_ID_DAY==e?this._actionToDisplayChange(a,b,AdfDhtmlCalendarPeer._VIEW_DAY):d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._VIEW_BUTTON_ID_WEEK==e?this._actionToDisplayChange(a,b,AdfDhtmlCalendarPeer._VIEW_WEEK):d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._VIEW_BUTTON_ID_MONTH==
e?this._actionToDisplayChange(a,b,AdfDhtmlCalendarPeer._VIEW_MONTH):d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._VIEW_BUTTON_ID_LIST==e?this._actionToDisplayChange(a,b,AdfDhtmlCalendarPeer._VIEW_LIST):d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._DATE_BUTTON_ID_TODAY==e?this._actionToDisplayChange(a,b,null,AdfCalendarDisplayChangeEvent.DATE_TODAY):d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._DATE_BUTTON_ID_NEXT==e?this._actionToDisplayChange(a,b,null,AdfCalendarDisplayChangeEvent.DATE_NEXT):
d+AdfDhtmlCalendarPeer._NAMING_SEP+AdfDhtmlCalendarPeer._DATE_BUTTON_ID_PREVIOUS==e&&this._actionToDisplayChange(a,b,null,AdfCalendarDisplayChangeEvent.DATE_PREVIOUS)}};AdfDhtmlCalendarPeer.prototype.handleMonthOverflowLinkClick=function(){return!1};AdfDhtmlCalendarPeer.prototype.needsResizeNotify=function(){var a=this.getComponent().getProperty(AdfDhtmlCalendarPeer._VIEW_KEY);if(a==AdfDhtmlCalendarPeer._VIEW_MONTH||a==AdfDhtmlCalendarPeer._VIEW_DAY||a==AdfDhtmlCalendarPeer._VIEW_WEEK)return!0};
AdfDhtmlCalendarPeer.prototype.resizeNotify=function(a,b,d,e,f){b=this.getComponent().getProperty(AdfDhtmlCalendarPeer._VIEW_KEY);f!=d&&(b==AdfDhtmlCalendarPeer._VIEW_DAY?this._resizeAllDayActsArea(d,f):b==AdfDhtmlCalendarPeer._VIEW_WEEK?this._resizeAllDayActsArea(d,f):b==AdfDhtmlCalendarPeer._VIEW_MONTH&&this._resizeMonthGrid(d,f),this.isScrollRestored||(this._restoreScrollPosition(a,this.getDomElement()),this.isScrollRestored=!0))};
AdfDhtmlCalendarPeer.prototype.showActivityPopup=function(a,b,d){var e=this.getComponent();a=e.findComponent(a);b=e.getClientId()+"::"+b+"::"+d;if(b=AdfAgent.AGENT.getElementById(b))d={},d[AdfDhtmlPopupHints.ALIGN_ELEMENT]=b,d[AdfRichPopup.HINT_ALIGN]=AdfRichPopup.ALIGN_AFTER_START,d[AdfDhtmlPopupHints.AUTODISMISS]=AdfDhtmlPopupHints.AUTODISMISS_MOUSEOUT,d[AdfDhtmlPopupHints.AUTODISMISS_MOUSEOUT_ID]=b,a.show(d)};
AdfDhtmlCalendarPeer.prototype.getActivityForEvent=function(a){if(this._resizedActivity)return null;var b=a.getNativeEventTarget(),d=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._RESIZE_TIME_INDICATOR_KEY);d||(d=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._RESIZE_All_DAY_INDICATOR_KEY));if(d)return null;d=this.getComponent();b=d.getProperty(AdfDhtmlCalendarPeer._VIEW_KEY);if(b==AdfDhtmlCalendarPeer._VIEW_LIST)return null;var e=a.getNativeEventTarget();a=this.getDomElement();var e=this._getParentActivity(a,
e),f=null!=e&&null!=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_DURATION_KEY),d=-1==d.getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._TIME);return b==AdfDhtmlCalendarPeer._VIEW_DAY&&f&&d?null:e&&a!=e?(b=this._getProviderAndActivityIdFromElement(e),d=null!=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY),new AdfCalendarActivity(b.providerId,b.activityId,d)):null};
AdfDhtmlCalendarPeer.prototype.getDragNodeForActivity=function(a,b){var d=this.getComponent(),e=AdfAgent.AGENT;this._hideActivityHoverPopup();d=d.getClientId()+"::"+b.getProviderId()+"::"+b.getActivityId();(d=e.getElementById(d))||(d=this._getParentActivity(this.getDomElement(),a.getNativeEventTarget()));this._draggedActivity=d;var f=d.cloneNode(!0);e.copyStyle(d,f);e=f.style;e.left=e.top="0px";e.height=d.clientHeight+"px";var g=null,h=null;if(b.isAllDay())for(var g=f.getElementsByTagName("span"),
k=g.length,l=0;l<k;l++){var m=g[l];if(null!=m.getAttribute(AdfDhtmlCalendarPeer._ALL_DAY_DURATION_TEXT_KEY)){h=m;break}}null!=h?this._resizeDragNodeForAllDayActivity(d,e,g,h):e.width=d.clientWidth+"px";AdfDomUtils.addCSSClassName(d,AdfDhtmlCalendarPeer._DRAG_SOURCE_CLASS);return f};AdfDhtmlCalendarPeer.prototype.dragDropEnd=function(a,b){var d=this._draggedActivity;d&&(b==AdfDnDContext.ACTION_NONE&&AdfDomUtils.removeCSSClassName(d,AdfDhtmlCalendarPeer._DRAG_SOURCE_CLASS),this._draggedActivity=null)};
AdfDhtmlCalendarPeer.prototype.getDragOffsetForActivity=function(a,b){var d=AdfAgent.AGENT,e=this.getComponent().getClientId()+"::"+b.getProviderId()+"::"+b.getActivityId();(e=d.getElementById(e))||(e=this._getParentActivity(this.getDomElement(),a.getNativeEventTarget()));e=d.getElementPosition(e);d=d.getMousePosition(a.getNativeEvent());xOffset=d.x-e.x;yOffset=d.y-e.y;return{x:xOffset,y:yOffset}};
AdfDhtmlCalendarPeer.prototype.getDropSiteAndDataFromHints=function(a,b,d,e){AdfAssert.assertNumber(b);AdfAssert.assertNumber(d);AdfAssert.assert(null!=e);var f=e[AdfCalendarDropTarget.HINT_LAST_DROP_SITE],g=e[AdfCalendarDropTarget.HINT_LAST_DROP_SITE_DATA];if(f&&g){var h=g.bounds;AdfAssert.assertObject(h);if(b>=h.left&&d>=h.top&&b<=h.right&&d<=h.bottom){e[AdfCalendarDropTarget.HINT_DROP_SITE]=f;e[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=g;return}}this._getDropSiteAndData(a,b,d,e)};
AdfDhtmlCalendarPeer.prototype.showDragFeedback=function(a,b,d,e,f,g,h,k,l){f!=b&&(null!=f&&(AdfAssert.assertObject(g),AdfAssert.assertDomElement(g.domElement),AdfDomUtils.removeCSSClassName(g.domElement,AdfDhtmlCalendarPeer._DROP_TARGET_CLASS),g.siteDayCell&&AdfDomUtils.removeCSSClassName(g.siteDayCell,AdfDhtmlCalendarPeer._DROP_TARGET_CLASS)),null!=b&&(AdfAssert.assertObject(d),AdfAssert.assertDomElement(d.domElement),AdfDomUtils.addCSSClassName(d.domElement,AdfDhtmlCalendarPeer._DROP_TARGET_CLASS),
d.siteDayCell&&AdfDomUtils.addCSSClassName(d.siteDayCell,AdfDhtmlCalendarPeer._DROP_TARGET_CLASS)))};
AdfDhtmlCalendarPeer.prototype._resizeDragNodeForAllDayActivity=function(a,b,d,e){var f=AdfAgent.AGENT;e.style.display="";for(var g=d.length,h=0;h<g;h++){var k=d[h];null==f.getAttribute(k,AdfDhtmlCalendarPeer._ALL_DAY_HEADER_TEXT_KEY)&&(k!==e&&!AdfDomUtils.isAncestor(k,e))&&(k.style.display="none")}d=a.parentNode.childNodes;g=d.length;for(h=0;h<g;h++)if(a=d[h],null!=f.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY)){b.width=a.clientWidth+"px";break}};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndData=function(a,b,d,e){var f=this.getComponent().getProperty(AdfDhtmlCalendarPeer._VIEW_KEY),g=!1;f==AdfDhtmlCalendarPeer._VIEW_DAY?g=this._getDropSiteAndDataForDayView(a,b,d,e):f==AdfDhtmlCalendarPeer._VIEW_WEEK?g=this._getDropSiteAndDataForWeekView(a,b,d,e):f==AdfDhtmlCalendarPeer._VIEW_MONTH&&(g=this._getDropSiteAndDataForMonthView(a,b,d,e));g||(e[AdfCalendarDropTarget.HINT_DROP_SITE]=null,e[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=null)};
AdfDhtmlCalendarPeer.prototype._getDragSourceActivity=function(a,b,d){if(a=a.getTransferable())if(a=a.getTransferData(AdfDataFlavor.OBJECT_FLAVOR),null!=a){b=a.length;for(d=0;d<b;d++){var e=a[d];if(e instanceof AdfCalendarActivity)return e}}return null};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForDayView=function(a,b,d,e){var f=AdfAgent.AGENT,g=this.getComponent();a=this._getDragSourceActivity(a,b,d);var h=!1;if(this._isAllDayRegionDisplayed()){var k=g.getClientId(),k=AdfRichUIPeer.CreateSubId(k,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID),k=f.getElementById(k);AdfAssert.assertDomElement(k);f.pointInElementBounds(k,b,d)&&!a&&(h={},h.date=f.getAttribute(k,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY),-1!=g.getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._ALLDAY)?
h.timeType=AdfDhtmlCalendarPeer._ALLDAY:h.timeType=AdfDhtmlCalendarPeer._DURATION,e[AdfCalendarDropTarget.HINT_DROP_SITE]=h,dropSiteData={},dropSiteData.domElement=k,dropSiteData.bounds=f.getElementPageBounds(k),e[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=dropSiteData,h=!0)}if(!h&&(!a||!a.isAllDay()))h=this._getDropSiteAndDataForTimedDayView(b,d,e);return h};
AdfDhtmlCalendarPeer.prototype._isAllDayRegionDisplayed=function(){var a=this.getComponent().getShowActivityTypes();return-1!=a.indexOf(AdfDhtmlCalendarPeer._ALLDAY)||-1!=a.indexOf(AdfDhtmlCalendarPeer._DURATION)&&-1!=a.indexOf(AdfDhtmlCalendarPeer._TIME)};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForTimedDayView=function(a,b,d){var e=AdfAgent.AGENT,f=null,g=this._getDateTimeGridContainer(),h=g.scrollTop,k=g.firstChild.rows[0].cells[1].firstChild,g=k.childNodes,l=g.length;if(e.pointInElementBounds(k,a,b))for(i=0;i<l;i++)if(k=g[i],f||(f=e.getAttribute(k,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY)),k.offsetTop+k.offsetHeight>h){var m=e.getAttribute(k,AdfDhtmlCalendarPeer._CALENDAR_TIME_SLOT_KEY);if(null!=m&&e.pointInElementBounds(k,a,b))return d[AdfCalendarDropTarget.HINT_DROP_SITE]=
this._getDropSiteForTimeSlot(f,m),a={},a.domElement=k,a.bounds=e.getElementPageBounds(k),d[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=a,!0}return!1};AdfDhtmlCalendarPeer.prototype._getDropSiteForTimeSlot=function(a,b){var d={},e=this._getTimeSlotsPerHour();d.date=a;d.hour=Math.round(b/e-0.5);d.min=b%e*(60/e);-1!=this.getComponent().getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._TIME)?d.timeType=AdfDhtmlCalendarPeer._TIME:d.timeType=AdfDhtmlCalendarPeer._DURATION;return d};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForWeekView=function(a,b,d,e){var f=AdfAgent.AGENT,g=this.getComponent();a=this._getDragSourceActivity(a,b,d);var h=!1;if(this._isAllDayRegionDisplayed()&&(g=g.getClientId(),g=AdfRichUIPeer.CreateSubId(g,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID),g=f.getElementById(g),AdfAssert.assertDomElement(g),f.pointInElementBounds(g,b,d)&&(!a||a.isAllDay())))h=this._getDropSiteAndDataForAllDayWeekView(g,b,d,e);if(!h&&(!a||!a.isAllDay()))h=this._getDropSiteAndDataForTimedWeekView(b,
d,e);return h};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForAllDayWeekView=function(a,b,d,e){var f=AdfAgent.AGENT,g=a.childNodes,h=g.length;for(i=0;i<h;i++){a=g[i];var k=f.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY);if(null!=k&&f.pointInElementBounds(a,b,d))return b=-1!=this.getComponent().getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._ALLDAY)?AdfDhtmlCalendarPeer._ALLDAY:AdfDhtmlCalendarPeer._DURATION,e[AdfCalendarDropTarget.HINT_DROP_SITE]={date:k,timeType:b},b={},b.domElement=a,
b.bounds=f.getElementPageBounds(a),e[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=b,!0}return!1};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForTimedWeekView=function(a,b,d){var e=AdfAgent.AGENT,f=this._getDateTimeGridContainer(),g=f.scrollTop,f=f.firstChild.rows[0].cells[1].firstChild;if(e.pointInElementBounds(f,a,b)){var h=f.childNodes,k=h.length,l=null,f=null;for(i=0;i<k;i++){var m=h[i],n=e.getAttribute(m,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY);if(null!=n&&m.offsetTop+m.offsetHeight>g&&e.pointInElementBounds(m,a,b)){l=n;f=m;break}}if(null!=l)for(i=0;i<k;i++)if(a=h[i],g=e.getAttribute(a,
AdfDhtmlCalendarPeer._CALENDAR_TIME_SLOT_KEY),null!=g&&(m=e.getElementPosition(a),b>m.y&&b<m.y+a.offsetHeight))return d[AdfCalendarDropTarget.HINT_DROP_SITE]=this._getDropSiteForTimeSlot(l,g),b={},b.domElement=a,b.siteDayCell=f,h=e.getElementPageBounds(a),e=e.getElementPageBounds(f),b.bounds={top:h.top,left:e.left,bottom:h.bottom,right:e.right},d[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=b,!0}return!1};
AdfDhtmlCalendarPeer.prototype._getDropSiteAndDataForMonthView=function(a,b,d,e){a=AdfAgent.AGENT;var f=!1,g=this.getComponent().getClientId(),g=AdfRichUIPeer.CreateSubId(g,AdfDhtmlCalendarPeer._MONTH_GRID_ID);if((g=AdfAgent.AGENT.getElementById(g))&&a.pointInElementBounds(g,b,d))for(var h=g.childNodes,k=h.length,l=null,m=0;m<k&&!l;m++){var n=h[m];if(a.pointInElementBounds(g,b,d))for(var p=n.childNodes,q=p.length,r=0;r<q;r++){var n=p[r],s=a.getAttribute(n,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY);
if(null!=s&&a.pointInElementBounds(n,b,d)){l={};l.date=s;l.timeType="UNKNOWN";e[AdfCalendarDropTarget.HINT_DROP_SITE]=l;f={};f.domElement=n;f.bounds=a.getElementPageBounds(n);e[AdfCalendarDropTarget.HINT_DROP_SITE_DATA]=f;f=!0;break}}}return f};AdfDhtmlCalendarPeer.prototype._actionToDisplayChange=function(a,b,d,e){this._hideActivityHoverPopup();a.cancel();a.stopBubbling();AdfCalendarDisplayChangeEvent.queue(b,e,d)};
AdfDhtmlCalendarPeer.prototype._calculateMonthGridCapacity=function(a,b){var d={},e=AdfPage.PAGE.getLookAndFeel().getSkinProperty(AdfDhtmlCalendarPeer._MONTH_VIEW_ALLDAY_HT);d.activityHt=null!=e?parseFloat(e):0<a.clientHeight?a.clientHeight:b.dayHeaderHt;d.spacerHt=1.1;var e=AdfAgent.AGENT,f=e.getComputedStyle(a),g=e.getStyleProperty(f,"margin-bottom");null==g&&(g=e.getStyleProperty(f,"marginBottom"));if(null!=g){var h=g.lastIndexOf("px");-1!=h?d.spacerHt=parseFloat(g.substring(0,h)):(h=g.lastIndexOf("em"),
-1!=h&&(g=g.substring(0,h),d.spacerHt=parseFloat(g)*b._EMToPxRatio))}d.overflowHt=d.activityHt;g=e.getStyleProperty(f,"font-size");null==g&&(g=e.getStyleProperty(f,"fontSize"));null!=g&&(h=g.lastIndexOf("px"),-1!=h&&(d.overflowHt=parseFloat(g.substring(0,h))));b.activityInfo=d;b.maxNumActivities=Math.floor((b.dayCellHt-(b.dayHeaderHt+d.spacerHt+d.overflowHt))/(d.spacerHt+d.activityHt));b.activityInfo.overflowTopStr=b.dayHeaderHt+b.maxNumActivities*(b.activityInfo.activityHt+b.activityInfo.spacerHt)+
b.activityInfo.spacerHt+"px"};
AdfDhtmlCalendarPeer.prototype._calculateMonthGridInfo=function(a,b){var d={},e=AdfPage.PAGE.getLocaleContext().isRightToLeft();if(null!=a){for(var f=a.childNodes[0].childNodes,g=f.length,h=0;h<g;h++){var k=AdfAgent.AGENT.getAttribute(f[h],AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY),l=AdfAgent.AGENT.getAttribute(f[h],AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER),m=AdfAgent.AGENT.getAttribute(f[h],AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK);if(!k&&!l&&!m){f=f[h];g=f.childNodes[0];d.dayCellHt=
f.clientHeight;d.dayHeaderHt=g.clientHeight;break}}f=a.style.top;f=parseFloat(f.substring(0,f.lastIndexOf("em")));d._EMToPxRatio=a.offsetTop/f}if(null!=b){f=b.childNodes.length;d.numDaysInWeek=f;g={};h=Array(f);for(k=0;k<f;k++)l=e?b.childNodes[k].style.right:b.childNodes[k].style.left,g[l]=k,h[k]=parseFloat(l);d.percentToIndexMap=g;d.percentArray=h;d.cellWidth=h[1]-h[0]}return d};
AdfDhtmlCalendarPeer.prototype._createOverflowLinkForMonthGrid=function(a,b,d,e){var f=AdfPage.PAGE.getLookAndFeel(),g=AdfAgent.AGENT,h=document.createElement("div");AdfDomUtils.addCSSClassName(h,f.getStyleClass(AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK_WRAPPER_CLASS));g.setAttribute(h,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK);g.setAttribute(h,AdfDhtmlCalendarPeer._CAL_MONTH_NUM_OVERFLOW,b);g.setAttribute(h,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM,
e.maxNumActivities);a=this._getDayCellAttrValue(a,d);g.setAttribute(h,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY,a);a=document.createElement("a");AdfDomUtils.addCSSClassName(a,f.getStyleClass(AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK_CLASS));a.href="#";a.onclick=this.handleMonthOverflowLinkClick;a.tabIndex=-1;d=f.getTranslatedString(AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK_TEXT,b);a.innerHTML=d;h.appendChild(a);g.setAttribute(h,"role","link");b=f.getTranslatedString(AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK_LABEL,
b);g.setAttribute(h,"aria-label",b);h.tabIndex=-1;return h};AdfDhtmlCalendarPeer.prototype._getActivityInfo=function(a,b){if(null==a)return null;var d={};d.startDay=this._getDayIndexOfGridElem(b,a);var e;e=AdfAgent.AGENT.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY)?a.style.width:a.parentNode.style.width;e=parseFloat(e.substring(0,e.lastIndexOf("%")));d.activityLength=b.numDaysInWeek;for(var f=0;f<b.numDaysInWeek;f++)if(e<=b.percentArray[f]){d.activityLength=f;break}return d};
AdfDhtmlCalendarPeer.prototype._getActivityLinkInList=function(a){var b=AdfAgent.AGENT;for(a=AdfDomUtils.getFirstChildElement(a);null!=a;){var d=AdfDomUtils.getFirstChildElement(a);if(null!=d&&null!=b.getAttribute(d,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY))return d;a=AdfDomUtils.getNextElement(a)}};
AdfDhtmlCalendarPeer.prototype._getListRowWithDayLink=function(a,b){for(var d=AdfAgent.AGENT,e=b?AdfDomUtils.getNextElement(a):AdfDomUtils.getPreviousElement(a);null!=e;){if(null!=d.getAttribute(e,AdfDhtmlCalendarPeer._HAS_CALENDAR_DAY_LINK))return e;e=b?AdfDomUtils.getNextElement(e):AdfDomUtils.getPreviousElement(e)}};AdfDhtmlCalendarPeer.prototype._getDisplayChangeElement=function(a,b){return this._getParentWithAttr(a,b,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY)};
AdfDhtmlCalendarPeer.prototype._getActiveDayFromDom=function(a){a=AdfRichUIPeer.getDomElementForComponent(a);return AdfAgent.AGENT.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVE_DATE_KEY)};AdfDhtmlCalendarPeer.prototype._getParentActivity=function(a,b){return this._getParentWithAttr(a,b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY)};
AdfDhtmlCalendarPeer.prototype._getDayCellAttrValue=function(a,b){var d=this._getValueWithAttr(a,b,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY);return null==d?null:d};
AdfDhtmlCalendarPeer.prototype._getAllDayActFocus=function(a,b,d){a=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID);a=AdfAgent.AGENT.getElementById(a);if(!a)return null;a=AdfDomUtils.getFirstChildElement(a);for(var e=d==AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_FIRST_ALLDAY?99999:-1,f=null;null!=a&&null!=AdfAgent.AGENT.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY);){var g=AdfAgent.AGENT.getAttribute(a,AdfDhtmlCalendarPeer._CAL_ACT_COL_NUM);if(g==b)g=parseInt(AdfAgent.AGENT.getAttribute(a,
AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM)),d==AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_FIRST_ALLDAY?g<e&&(e=g,f=a):g>e&&(e=g,f=a);else if(g>b)break;a=AdfDomUtils.getNextElement(a)}return f};
AdfDhtmlCalendarPeer.prototype._getAdjacentAllDayActToFocus=function(a,b,d){a=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID);var e=AdfAgent.AGENT.getElementById(a);if(!e)return null;a=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);b=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_ACT_COL_NUM);for(var e=AdfDomUtils.getFirstChildElement(e),f=d==AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_NEXT_ALLDAY?99999:-1,g=null;null!=e&&null!=AdfAgent.AGENT.getAttribute(e,
AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY);){var h=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CAL_ACT_COL_NUM);if(h==b)h=parseInt(AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM)),d==AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_NEXT_ALLDAY?h>a&&h<f&&(f=h,g=e):h<a&&h>f&&(f=h,g=e);else if(h>b)break;e=AdfDomUtils.getNextElement(e)}return g};
AdfDhtmlCalendarPeer.prototype._getDayFocusInWeek=function(a,b){var d=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._CALENDAR_WEEK_HEADER_ID),d=AdfAgent.AGENT.getElementById(d);return 0>b||b>=d.childNodes.length?null:AdfDomUtils.getFirstChildElement(d.childNodes[b])};
AdfDhtmlCalendarPeer.prototype._getTimedActFocusInHourGrid=function(a,b){var d=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._CALENDAR_WEEK_TIMED_ACTIVITIES_CELL_SUB_ID),d=AdfAgent.AGENT.getElementById(d);if(!d)return null;d=AdfDomUtils.getFirstChildElement(d);do{if(null==d)break;var e=AdfAgent.AGENT.getAttribute(d,AdfDhtmlCalendarPeer._CAL_ACT_COL_NUM);if(null==e||e<b)d=AdfDomUtils.getNextElement(d);else{d=e==b?d.childNodes[0].childNodes[0]:null;break}}while(1);return d};
AdfDhtmlCalendarPeer.prototype._getDayFocusInMonthWeek=function(a,b,d){if(null!=a){a=AdfDomUtils.getLastChildElement(a);b=d.numDaysInWeek-1-b;for(d=0;d<b;d++)a=AdfDomUtils.getPreviousElement(a);if(null!=a)return a.childNodes[0].childNodes[0]}return null};AdfDhtmlCalendarPeer.prototype._getTimeSlotAttrValue=function(a,b){var d=this._getValueWithAttr(a,b,AdfDhtmlCalendarPeer._CALENDAR_TIME_SLOT_KEY);return null==d?null:d};AdfDhtmlCalendarPeer.prototype._getTimeSlotsPerHour=function(){return this.getComponent().getProperty(AdfDhtmlCalendarPeer._TIME_SLOTS_PER_HOUR)};
AdfDhtmlCalendarPeer.prototype._getParentWithAttr=function(a,b,d){for(;b&&b!=a;){if(1==b.nodeType&&AdfAgent.AGENT.getAttribute(b,d))return b;b=b.parentNode}return null};
AdfDhtmlCalendarPeer.prototype._getNextMonthElement=function(a,b){var d=b?AdfDomUtils.getNextElement(a):AdfDomUtils.getPreviousElement(a);null==d&&null!=AdfAgent.AGENT.getAttribute(a.parentNode,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER)&&(d=b?AdfDomUtils.getNextElement(a.parentNode):AdfDomUtils.getPreviousElement(a.parentNode));null!=d&&null!=AdfAgent.AGENT.getAttribute(d,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER)&&(d=b?AdfDomUtils.getFirstChildElement(d):AdfDomUtils.getLastChildElement(d));
return d};AdfDhtmlCalendarPeer.prototype._getOverflowLink=function(a){var b=a;AdfAgent.AGENT.getAttribute(a.parentNode,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER)&&(b=a.parentNode);for(;null!=(b=AdfDomUtils.getNextElement(b));)if(null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK))return b;return null};
AdfDhtmlCalendarPeer.prototype._getDayIndexOfGridElem=function(a,b){for(var d=AdfPage.PAGE.getLocaleContext().isRightToLeft(),e=b,f;;){f=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CAL_ACT_COL_NUM);if(null!=f)break;if(null!=a){var g=d?e.style.right:e.style.left;if(0<g.length){f=a.percentToIndexMap[g];break}}e=e.parentNode}return parseInt(f)};
AdfDhtmlCalendarPeer.prototype._getValueWithAttr=function(a,b,d){for(var e;b&&b!=a;){1==b.nodeType&&(e=AdfAgent.AGENT.getAttribute(b,d));if(1==b.nodeType&&e)return e;b=b.parentNode}return null};
AdfDhtmlCalendarPeer.prototype._handleKeyUpForDay=function(a,b,d){var e=this.getComponent().getClientId(),f,g=!1;if(null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY)){var h=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY);if(AdfKeyStroke.ARROWDOWN_KEY==a)f=AdfDomUtils.getNextElement(b),null==f&&h&&(f=this._getTimedActFocusInHourGrid(e,0),g=!0);else if(AdfKeyStroke.ARROWUP_KEY==a&&(f=AdfDomUtils.getPreviousElement(b),null==f&&!h&&
(a=AdfRichUIPeer.CreateSubId(e,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID),a=AdfAgent.AGENT.getElementById(a))))f=AdfDomUtils.getLastChildElement(a),g=!0}return f?(this._switchfocusAndMarkActiveDescendant(b,f,d,g),!0):!1};
AdfDhtmlCalendarPeer.prototype._handleKeyUpForList=function(a,b,d){var e=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY),f=AdfAgent.AGENT,g,h=b.parentNode.parentNode;if(e)if(AdfKeyStroke.ARROWDOWN_KEY==a||AdfKeyStroke.ARROWUP_KEY==a)h=(a=AdfKeyStroke.ARROWDOWN_KEY==a)?AdfDomUtils.getNextElement(h):AdfDomUtils.getPreviousElement(h),null!=h&&1==h.childNodes.length&&(h=a?AdfDomUtils.getNextElement(h):AdfDomUtils.getPreviousElement(h)),null!=h&&(g=this._getActivityLinkInList(h));
else{if(AdfKeyStroke.ARROWLEFT_KEY==a||AdfKeyStroke.ARROWRIGHT_KEY==a)e=AdfPage.PAGE.getLocaleContext().isRightToLeft(),!e&&AdfKeyStroke.ARROWRIGHT_KEY==a||e&&AdfKeyStroke.ARROWLEFT_KEY==a?(h=this._getListRowWithDayLink(h,!0),null!=h&&(g=AdfDomUtils.getFirstChildElement(h),g=AdfDomUtils.getFirstChildElement(AdfDomUtils.getNextElement(g)),null==g&&(g=this._getActivityLinkInList(h)))):(null==f.getAttribute(h,AdfDhtmlCalendarPeer._HAS_CALENDAR_DAY_LINK)&&(h=this._getListRowWithDayLink(h,!1)),g=AdfDomUtils.getChildElements(h)[1],
g=AdfDomUtils.getFirstChildElement(g),null==g&&(h=AdfDomUtils.getPreviousElement(h),null!=h&&(h=AdfDomUtils.getPreviousElement(h),g=this._getActivityLinkInList(h))))}else null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY)&&(AdfKeyStroke.ARROWDOWN_KEY==a||AdfKeyStroke.ARROWUP_KEY==a?(h=this._getListRowWithDayLink(h,AdfKeyStroke.ARROWDOWN_KEY==a),null!=h&&(h=AdfDomUtils.getChildElements(h)[1],g=AdfDomUtils.getFirstChildElement(h))):AdfKeyStroke.ARROWRIGHT_KEY==a?(g=AdfDomUtils.getNextElement(AdfDomUtils.getNextElement(b.parentNode)),
null!=g&&(g=AdfDomUtils.getFirstChildElement(g))):AdfKeyStroke.ARROWLEFT_KEY==a&&(h=AdfDomUtils.getPreviousElement(h),null!=h&&(h=AdfDomUtils.getPreviousElement(h),g=this._getActivityLinkInList(h))));return g?(this._switchfocusAndMarkActiveDescendant(b,g,d),!0):!1};
AdfDhtmlCalendarPeer.prototype._handleKeyUpForMonth=function(a,b,d){var e=AdfPage.PAGE.getLocaleContext().isRightToLeft(),f=this.getComponent().getClientId(),g,h=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY),k=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK),l=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY),f=AdfRichUIPeer.CreateSubId(f,AdfDhtmlCalendarPeer._MONTH_HEADER_ID),f=AdfAgent.AGENT.getElementById(f),
f=this._calculateMonthGridInfo(null,f),m=this._getDayIndexOfGridElem(f,b);if(h||k){var n=null!=AdfAgent.AGENT.getAttribute(b.parentNode,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER);if(AdfKeyStroke.ARROWDOWN_KEY==a)k?(g=AdfDomUtils.getNextElement(b.parentNode),g=this._getDayFocusInMonthWeek(g,m,f)):(g=this._getNextMonthElement(b,!0),null!=g&&(a=this._getDayIndexOfGridElem(f,g),a!=m?g=null:"none"==g.style.display&&(g=this._getOverflowLink(g))),null==g&&(g=AdfDomUtils.getNextElement(n?b.parentNode.parentNode:
b.parentNode),g=this._getDayFocusInMonthWeek(g,m,f)));else if(AdfKeyStroke.ARROWUP_KEY==a){a=!1;for(e=b;!a;){g=this._getNextMonthElement(e,!1);if(null==g)break;if("none"==g.style.display)e=g;else if(a=this._getDayIndexOfGridElem(f,g),a==m)a=!0;else{g=null;break}}null==g&&(g=this._getDayFocusInMonthWeek(n?b.parentNode.parentNode:b.parentNode,m,f))}else if(AdfKeyStroke.ARROWLEFT_KEY==a||AdfKeyStroke.ARROWRIGHT_KEY==a){e=AdfKeyStroke.ARROWLEFT_KEY==a&&e||AdfKeyStroke.ARROWRIGHT_KEY==a&&!e;m=this._getDayIndexOfGridElem(f,
b);k=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);h=!1;for(a=b;!h;){g=this._getNextMonthElement(a,e);if(null==g)break;if("none"!=g.style.display&&(a=this._getDayIndexOfGridElem(f,g),a!=m))if(a=Math.abs(a-m),1==a){a=AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);if(null==a){g=null;break}k==a&&(h=!0)}else if(1<a){g=null;break}a=g}null==g&&(m=e?m+1:m-1,0<=m&&m<f.numDaysInWeek&&(g=this._getDayFocusInMonthWeek(n?b.parentNode.parentNode:b.parentNode,m,f)))}}else if(l)if(AdfKeyStroke.ARROWLEFT_KEY==
a||AdfKeyStroke.ARROWRIGHT_KEY==a)m=(n=AdfKeyStroke.ARROWLEFT_KEY==a&&e||AdfKeyStroke.ARROWRIGHT_KEY==a&&!e)?m+1:m-1,0<=m&&m<f.numDaysInWeek?(g=n?AdfDomUtils.getNextElement(b.parentNode.parentNode):AdfDomUtils.getPreviousElement(b.parentNode.parentNode),g=AdfDomUtils.getFirstChildElement(g),g=AdfDomUtils.getFirstChildElement(g)):(m=m==f.numDaysInWeek&&n?AdfDomUtils.getNextElement(b.parentNode.parentNode.parentNode):AdfDomUtils.getPreviousElement(b.parentNode.parentNode.parentNode),null!=m&&(g=this._getDayFocusInMonthWeek(m,
n?0:f.numDaysInWeek-1,f)));else if(AdfKeyStroke.ARROWUP_KEY==a){if(e=AdfDomUtils.getPreviousElement(b.parentNode.parentNode.parentNode),null!=e){if(e.childNodes.length!=f.numDaysInWeek){g=AdfDomUtils.getFirstChildElement(e);null!=AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER)&&(g=AdfDomUtils.getFirstChildElement(g));do{if(null==g)break;if(null==AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY)&&null==AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK))break;
a=this._getDayIndexOfGridElem(f,g);if(a==m)"none"!=g.style.display&&(n=g);else if(a>m)break;g=this._getNextMonthElement(g,!0)}while(1)}g=null!=n?n:this._getDayFocusInMonthWeek(e,m,f)}}else if(AdfKeyStroke.ARROWDOWN_KEY==a){n=b.parentNode.parentNode.parentNode;if(n.childNodes.length!=f.numDaysInWeek){g=AdfDomUtils.getFirstChildElement(n);null!=AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER)&&(g=AdfDomUtils.getFirstChildElement(g));do{if(null==g)break;if(null==
AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY)&&null==AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK)){g=null;break}a=this._getDayIndexOfGridElem(f,g);if(a==m)break;else if(a>m){g=null;break}g=this._getNextMonthElement(g,!0)}while(1)}null==g&&(n=AdfDomUtils.getNextElement(n),null!=n&&(g=this._getDayFocusInMonthWeek(n,m,f)))}return g?(this._switchfocusAndMarkActiveDescendant(b,g,d),!0):!1};
AdfDhtmlCalendarPeer.prototype._handleKeyUpForWeek=function(a,b,d){var e=AdfPage.PAGE.getLocaleContext().isRightToLeft(),f=this.getComponent().getClientId(),g,h,k=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY);g=AdfRichUIPeer.CreateSubId(f,AdfDhtmlCalendarPeer._CALENDAR_WEEK_HEADER_ID);var l=AdfAgent.AGENT.getElementById(g),m=this._calculateMonthGridInfo(null,l),n=this._getDayIndexOfGridElem(m,b),l=!1;if(k)if(k=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY),
AdfKeyStroke.ARROWDOWN_KEY==a)h=!k?AdfDomUtils.getNextElement(b):this._getAdjacentAllDayActToFocus(f,b,AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_NEXT_ALLDAY),k&&null==h&&(h=this._getTimedActFocusInHourGrid(f,n),null!=h&&(l=!0)),null==h&&(h=this._getDayFocusInWeek(f,n));else if(AdfKeyStroke.ARROWUP_KEY==a)h=!k?AdfDomUtils.getPreviousElement(b):this._getAdjacentAllDayActToFocus(f,b,AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_PREV_ALLDAY),!k&&null==h&&(h=this._getAllDayActFocus(f,n,this._CAL_WEEK_FOCUS_LAST_ALLDAY),
null!=h&&(l=!0)),null==h&&(h=this._getDayFocusInWeek(f,n));else{if(AdfKeyStroke.ARROWRIGHT_KEY==a||AdfKeyStroke.ARROWLEFT_KEY==a){h=(a=AdfKeyStroke.ARROWRIGHT_KEY==a&&!e||AdfKeyStroke.ARROWLEFT_KEY==a&&e)?AdfDomUtils.getNextElement(b):AdfDomUtils.getPreviousElement(b);if(k)for(e=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);null!=h;){g=this._getDayIndexOfGridElem(m,h);g=Math.abs(g-n);if(1==g){g=AdfAgent.AGENT.getAttribute(h,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);if(null==g){h=
null;break}if(e==g)break}else if(1<g){h=null;break}h=a?AdfDomUtils.getNextElement(h):AdfDomUtils.getPreviousElement(h)}else h=this._getTimedActFocusInHourGrid(f,a?n+1:n-1);null==h&&(h=this._getDayFocusInWeek(f,a?n+1:n-1),k||(l=!0))}}else if(b.parentNode.parentNode.id==g)if(AdfKeyStroke.ARROWDOWN_KEY==a)h=this._getAllDayActFocus(f,n,AdfDhtmlCalendarPeer._CAL_WEEK_FOCUS_FIRST_ALLDAY),null==h&&(h=this._getTimedActFocusInHourGrid(f,n));else if(AdfKeyStroke.ARROWLEFT_KEY==a||AdfKeyStroke.ARROWRIGHT_KEY==
a)n=(f=AdfKeyStroke.ARROWLEFT_KEY==a&&e||AdfKeyStroke.ARROWRIGHT_KEY==a&&!e)?n+1:n-1,0<=n&&n<m.numDaysInWeek&&(h=f?AdfDomUtils.getNextElement(b.parentNode):AdfDomUtils.getPreviousElement(b.parentNode),h=AdfDomUtils.getFirstChildElement(h));return h?(this._switchfocusAndMarkActiveDescendant(b,h,d,l),!0):!1};
AdfDhtmlCalendarPeer.prototype._hideMonthGridActivity=function(a,b,d){a.style._display=a.style.display;a.style.display="none";a=this._getActivityInfo(a,b);for(b=0;b<a.activityLength;b++){var e=d[a.startDay+b];d[a.startDay+b]=++e}};AdfDhtmlCalendarPeer.prototype._isActivityDraggableAcrossDays=function(a){return"week"==this.getComponent().getView()?null==AdfAgent.AGENT.getAttribute(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_DURATION_KEY):!1};
AdfDhtmlCalendarPeer.prototype._restoreScrollPosition=function(a,b){var d=a.getClientId(),e=AdfAgent.AGENT,f=a.getProperty(AdfDhtmlCalendarPeer._VIEW_KEY),g=null,h=null;if(f!=AdfDhtmlCalendarPeer._VIEW_MONTH){if(f==AdfDhtmlCalendarPeer._VIEW_LIST)g=AdfDhtmlCalendarPeer._SCROLL_LIST_KEY;else if(f==AdfDhtmlCalendarPeer._VIEW_DAY||f==AdfDhtmlCalendarPeer._VIEW_WEEK)g=AdfDhtmlCalendarPeer._SCROLL_DAY_KEY,h=this._getPageProperty(a,AdfDhtmlCalendarPeer._SCROLL_DAY_HEIGHT),this._setPageProperty(a,AdfDhtmlCalendarPeer._SCROLL_DAY_HEIGHT,
null);f=this._getPageProperty(a,g);this._setPageProperty(a,g,null);if(null!=f){if(g=AdfRichUIPeer.CreateSubId(d,g),g=e.getElementById(g)){var k=this._getPageProperty(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVE_DATE_KEY),l=this._getActiveDayFromDom(a);this._setPageProperty(a,AdfDhtmlCalendarPeer._CALENDAR_ACTIVE_DATE_KEY,null);l===k?(h&&(f=g.scrollHeight*f/h),g.scrollTop=f):this._scrollToStartHour(d,e)}}else this._scrollToStartHour(d,e)}};
AdfDhtmlCalendarPeer.prototype._saveScrollAndSplitterPosition=function(a){var b=a.getClientId(),d=AdfAgent.AGENT,e=a.getProperty(AdfDhtmlCalendarPeer._VIEW_KEY),f=null;if(e!=AdfDhtmlCalendarPeer._VIEW_MONTH){if(e==AdfDhtmlCalendarPeer._VIEW_LIST)f=AdfDhtmlCalendarPeer._SCROLL_LIST_KEY;else if(e==AdfDhtmlCalendarPeer._VIEW_DAY||e==AdfDhtmlCalendarPeer._VIEW_WEEK)f=AdfDhtmlCalendarPeer._SCROLL_DAY_KEY;b=AdfRichUIPeer.CreateSubId(b,f);if(d=d.getElementById(b))b=this._getActiveDayFromDom(a),this._setPageProperty(a,
AdfDhtmlCalendarPeer._CALENDAR_ACTIVE_DATE_KEY,b),AdfDomUtils.isInVisibleSubtree(d)&&(this._setPageProperty(a,f,d.scrollTop),(e==AdfDhtmlCalendarPeer._VIEW_DAY||e==AdfDhtmlCalendarPeer._VIEW_WEEK)&&this._setPageProperty(a,AdfDhtmlCalendarPeer._SCROLL_DAY_HEIGHT,d.scrollHeight))}};
AdfDhtmlCalendarPeer.prototype._scrollToStartHour=function(a,b){var d=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._START_HOUR_SUBID_KEY),d=b.getElementById(d),e=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._SCROLL_DAY_KEY);(e=b.getElementById(e))&&d&&b.scrollToPos(e,null,d.offsetTop)};AdfDhtmlCalendarPeer.prototype._getPageProperty=function(a,b){var d=a.getClientId(),e;(d=AdfPage.PAGE.getPageProperty(d))&&(e=d[b]);return e};
AdfDhtmlCalendarPeer.prototype._setPageProperty=function(a,b,d){a=a.getClientId();var e=AdfPage.PAGE,f=e.getPageProperty(a);f||(f={},e.setPageProperty(a,f));f[b]=d};
AdfDhtmlCalendarPeer.prototype._setTimeActDragInfo=function(a,b){var d=AdfAgent.AGENT;this._resizedActivity=a;this._resizedActivityContainer=a.firstChild.firstChild;this._resizedActivityInitHeight=b;this._resizedActivityInitWidth=this._resizedActivityContainer.clientWidth;this._parentDay=a.parentNode.parentNode;this._parentDayLeftBoundary=d.getElementLeft(this._parentDay);this._parentDayRightBoundary=this._parentDayLeftBoundary+this._parentDay.offsetWidth;this._activityLeftBoundary=d.getElementLeft(this._resizedActivity);
this._activityRightBoundary=this._activityLeftBoundary+this._resizedActivityInitWidth};AdfDhtmlCalendarPeer.prototype._showMonthGridActivity=function(a,b,d){a.style.display=a.style._display||"";a=this._getActivityInfo(a,b);for(b=0;b<a.activityLength;b++){var e=d[a.startDay+b];d[a.startDay+b]=--e}};AdfDhtmlCalendarPeer.prototype._isPopupVisible=function(a,b){var d=AdfAgent.AGENT.getAttribute(this.getDomElement(),b);return d?a.findComponent(d).isPopupVisible():!1};
AdfDhtmlCalendarPeer.prototype._launchPopupFacet=function(a,b){var d=AdfAgent.AGENT.getAttribute(this.getDomElement(),b);if(d){var d=a.findComponent(d),e={};e[AdfRichPopup.HINT_LAUNCH_ID]=a.getClientId();d.show(e)}};
AdfDhtmlCalendarPeer.prototype._onMouseOverTimeout=function(a){delete this._calendarActivityMouseTimeout;var b=a.componentId;a=a.activityRootId;var d=AdfPage.PAGE.findComponent(b);a=AdfAgent.AGENT.getElementById(a);if(d&&a){this.bind(d);var e=this._isPopupVisible(d,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_DETAIL),f=this._isPopupVisible(d,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_DELETE),g=this._isPopupVisible(d,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_CONTEXT_MENU);if(!e&&(!f&&!g)&&(this._queueCalendarActivityEvent(d,
a,null,0,AdfDhtmlCalendarPeer._EVENT_BUTTON_NONE,AdfDhtmlCalendarPeer._EVENT_TRIGGER_HOVER),e=AdfRichUIPeer.getDomElementForComponent(d),e=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_HOVER)))d=d.findComponent(e),e={},e[AdfRichPopup.HINT_LAUNCH_ID]=b,e[AdfDhtmlPopupHints.ALIGN_ELEMENT]=a,e[AdfDhtmlPopupHints.AUTODISMISS]=AdfDhtmlPopupHints.AUTODISMISS_MOUSEOUT,e[AdfDhtmlPopupHints.AUTODISMISS_MOUSEOUT_ID]=a.id,d.show(e)}};
AdfDhtmlCalendarPeer.prototype._killCalendarActivityMouseTimeout=function(){this._calendarActivityMouseTimeout&&(AdfPage.PAGE.cancelTimer(this._calendarActivityMouseTimeout),delete this._calendarActivityMouseTimeout)};
AdfDhtmlCalendarPeer.prototype._queueCalendarActivityEvent=function(a,b,d,e,f,g){g!=AdfDhtmlCalendarPeer._EVENT_TRIGGER_HOVER&&this._hideActivityHoverPopup();var h=this._getProviderAndActivityIdFromElement(b);AdfFocusUtils.focusElement(b);AdfCalendarActivityEvent.queue(a,h.providerId,h.activityId,d,e,f,g)};
AdfDhtmlCalendarPeer.prototype._resizeAllDayActsArea=function(a,b){var d=AdfPage.PAGE,e=this.getComponent();if("auto"==e.getSplitterPosition()){var f=e.getClientId();this._splitterComponent=d.findComponent(this._splitterid);var e=AdfAgent.AGENT,f=AdfRichUIPeer.CreateSubId(f,AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID),g=e.getElementById(f);if(g){var h=e.getElementById(this._splitterid),f=Math.floor(0.4*h.offsetHeight);if(null==this._EMToPxRatio){var k=h.parentNode;this._EMToPxRatio=parseFloat(k.style.top)/
k.offsetTop}k=AdfDhtmlCalendarPeer._PADDING_AFTER_ALL_DAY_ACTIVITIES;if(g=AdfDomUtils.getChildElements(g)){var l=g.length,m=0,n=0;if(!0==this._splitterComponent.getCollapsed()){var p=AdfDomUtils.getFirstChildElement(h);p.style.visibility="hidden";p.style.display=""}for(h=0;h<l;h++){var q=g[h];if("true"==e.getAttribute(q,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_KEY)){var r=q.offsetTop;r>m&&(m=r);0==n&&(n=q.offsetHeight)}}!0==this._splitterComponent.getCollapsed()&&(p.style.display="none",p.style.visibility=
"");k+=m+n}p=Math.min(f,k);e.getPlatform()==AdfAgent.GECKO_PLATFORM&&(p=Math.max(36,p));this._splitterComponent.getSplitterPosition()!=p&&d.scheduleTimer(this,this._setSplitterPositionCallback,p,0)}}};AdfDhtmlCalendarPeer.prototype._setSplitterPositionCallback=function(a){this._splitterComponent.setProperty(AdfRichPanelSplitter.SPLITTER_POSITION,a,!1,AdfUIComponent.PROPAGATE_LOCALLY)};
AdfDhtmlCalendarPeer.prototype._resizeMonthGrid=function(a,b){var d=AdfPage.PAGE.getLocaleContext().isRightToLeft(),e=null==a||b<a,f=this.getComponent(),g=f.getClientId(),h=AdfRichUIPeer.CreateSubId(g,AdfDhtmlCalendarPeer._MONTH_GRID_ID),k=AdfAgent.AGENT.getElementById(h);if(k)for(var h=k.childNodes,l=h.length,g=AdfRichUIPeer.CreateSubId(g,AdfDhtmlCalendarPeer._MONTH_HEADER_ID),g=AdfAgent.AGENT.getElementById(g),k=this._calculateMonthGridInfo(k,g),g=0;g<l;g++){for(var m=Array(k.numDaysInWeek),n=Array(k.numDaysInWeek),
p=Array(k.numDaysInWeek),q=Array(k.numDaysInWeek),r=Array(k.numDaysInWeek),s=Array(k.numDaysInWeek),u=0;u<k.numDaysInWeek;u++)s[u]=0;for(var u=h[g],t=u.childNodes,v=t.length,w=0;w<v;w++){var z=AdfAgent.AGENT.getAttribute(t[w],AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY),y,A=AdfAgent.AGENT.getAttribute(t[w],AdfDhtmlCalendarPeer._CAL_MONTH_TIMED_ACTIVITY_WRAPPER);y=AdfAgent.AGENT.getAttribute(t[w],AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK);var B=this._getDayIndexOfGridElem(k,t[w]);if(z)y=
t[w],null==k.activityInfo&&this._calculateMonthGridCapacity(y,k);else if(A)y=t[w].childNodes[0],null==k.activityInfo&&this._calculateMonthGridCapacity(y,k);else if(y){z=AdfAgent.AGENT.getAttribute(t[w],AdfDhtmlCalendarPeer._CAL_MONTH_NUM_OVERFLOW);r[B]=z;u.removeChild(t[w]);w--;v--;continue}else m[B]=t[w];if(e)if(z)y=t[w],z=AdfAgent.AGENT.getAttribute(y,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM),z>=k.maxNumActivities&&("none"!=y.style.display&&this._hideMonthGridActivity(y,k,s),null==n[B]&&(n[B]=y),null==
p[B]&&(p[B]=y));else{if(A){A=t[w];y=A.childNodes.length;for(var C=0,D=0;D<y;D++){var G=A.childNodes[D],z=AdfAgent.AGENT.getAttribute(G,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM);z>=k.maxNumActivities&&("none"!=G.style.display&&this._hideMonthGridActivity(G,k,s),C++,null==p[B]&&(p[B]=G))}if(null==n[B])if(C==y)n[B]=A;else if(0<C){for(z=AdfDomUtils.getNextElement(A);null!=AdfAgent.AGENT.getAttribute(z,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK);)z=AdfDomUtils.getNextElement(z);n[B]=z}}}else if(z)y=t[w],
z=AdfAgent.AGENT.getAttribute(y,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM),z<k.maxNumActivities?"none"==y.style.display&&this._showMonthGridActivity(y,k,s):(null==n[B]&&(n[B]=y),null==p[B]&&(p[B]=y));else if(A){A=t[w];y=0;C=A.childNodes.length;for(D=0;D<C;D++)G=A.childNodes[D],z=AdfAgent.AGENT.getAttribute(G,AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM),z<k.maxNumActivities?"none"==G.style.display&&this._showMonthGridActivity(G,k,s):(null==p[B]&&(p[B]=G),y++);if(null==n[B])if(y==C)n[B]=A;else if(0<y){for(z=
AdfDomUtils.getNextElement(A);null!=AdfAgent.AGENT.getAttribute(z,AdfDhtmlCalendarPeer._CAL_MONTH_OVERFLOW_LINK);)z=AdfDomUtils.getNextElement(z);n[B]=z}}}for(t=0;t<k.numDaysInWeek;t++)if(v=n[t],w=(parseInt(r[t])||0)+(parseInt(s[t])||0),0<w){z=null!=p[t];B=this._getActivityInfo(p[t],k);for(A=0;z&&A<B.activityLength;A++)if(1<(parseInt(r[t+A])||0)+(parseInt(s[t+A])||0))z=!1;if(!0==z&&AdfAgent.AGENT.getAttribute(p[t],AdfDhtmlCalendarPeer._CAL_ACT_ROW_NUM)<k.maxNumActivities){p[t].style.display=p[t].style._display||
"";for(v=0;v<B.activityLength;v++)s[t+v]-=1}else{if(null==v)for(B=t-1;0<=B;B--)if(null!=q[B]){v=AdfDomUtils.getNextElement(q[B]);break}w=this._createOverflowLinkForMonthGrid(f,w,m[t],k);d?w.style.right=m[t].style.right:w.style.left=m[t].style.left;w.style.top=k.activityInfo.overflowTopStr;w.style.width=m[t].style.width;u.insertBefore(w,v);q[t]=w}}}};
AdfDhtmlCalendarPeer.prototype._showContextMenu=function(a,b,d,e,f){if(b=AdfAgent.AGENT.getAttribute(b,e))this._killCalendarActivityMouseTimeout(),this.showContextMenu(d.getNativeEvent(),b,a,f,null,a.getClientId()),d.cancel()};
AdfDhtmlCalendarPeer.prototype._handleActivityContextMenu=function(a,b,d,e){var f=this._getComponentEventSource(a);this._queueCalendarActivityEvent(f,d,null,0,AdfDhtmlCalendarPeer._EVENT_BUTTON_NONE,AdfDhtmlCalendarPeer._EVENT_TRIGGER_CONTEXT_MENU);var g=null;e&&(g=d);this._showContextMenu(f,b,a,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_CONTEXT_MENU,g)};
AdfDhtmlCalendarPeer.prototype._handleClickEvents=function(a,b){var d=a.getNativeEventTarget();if(a.isLeftButtonPressed()&&d){var e=this._getComponentEventSource(a),f=this.getDomElement(),g=this._getDisplayChangeElement(f,d);g?(this._hideActivityHoverPopup(),d=AdfAgent.AGENT.getAttribute(g,AdfDhtmlCalendarPeer._CALENDAR_DAY_KEY),AdfCalendarDisplayChangeEvent.queue(e,d,AdfDhtmlCalendarPeer._VIEW_DAY)):(g=this._getParentActivity(f,d))&&f!=g?(this._queueCalendarActivityEvent(e,g,null,b,AdfDhtmlCalendarPeer._EVENT_BUTTON_LEFT,
AdfDhtmlCalendarPeer._EVENT_TRIGGER_MOUSE),this._launchPopupFacet(e,AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_DETAIL)):this._queueCalendarEvent(e,a,f,d,null,b,AdfDhtmlCalendarPeer._EVENT_BUTTON_LEFT,AdfDhtmlCalendarPeer._EVENT_TRIGGER_MOUSE)&&this._launchPopupFacet(e,AdfDhtmlCalendarPeer._FACET_ID_CREATE)}};
AdfDhtmlCalendarPeer.prototype._queueCalendarEvent=function(a,b,d,e,f,g,h,k){var l=this._getDayCellAttrValue(d,e),m=this._getTimeSlotAttrValue(d,e),n=e.parentNode,p=AdfAgent.AGENT.getElementPosition(n);null==m&&null!=this._getParentWithAttr(d,e,AdfDhtmlCalendarPeer._TIME_ACTIVITY_COLUMN_KEY)&&(e=AdfAgent.AGENT.getMousePosition(b.getNativeEvent()),m=e.y,e=24*this._getTimeSlotsPerHour(),e=n.offsetHeight/e,m=Math.max(m-p.y,0)/e,m=Math.round(m-0.5));n==d&&(l=AdfAgent.AGENT.getAttribute(n,AdfDhtmlCalendarPeer._CALENDAR_ACTIVE_DATE_KEY));
if(null==l){e=AdfAgent.AGENT.getMousePosition(b.getNativeEvent());b=n.offsetWidth/7;p=Math.max(e.x-p.x,0)/b;p=Math.round(p-0.5);6<p&&(p=6);n=n.childNodes;b=null;for(d=0;d<n.length;d++)if(e=n[d],1==e.nodeType&&(b=AdfAgent.AGENT.getAttribute(e,AdfDhtmlCalendarPeer._CALENDAR_DAY_CELL_KEY)),b&&d==p){l=b;break}}return null!=l&&void 0!=l?(p=n=null,null!=m&&(p=this._getTimeSlotsPerHour(),n=Math.round(m/p-0.5),p=m%p*(60/p)),this._hideActivityHoverPopup(),AdfCalendarEvent.queue(a,l,n,p,f,g,h,k),!0):!1};
AdfDhtmlCalendarPeer.prototype._handleTimeResizeIndicatorMouseDown=function(a){var b=a.getNativeEventTarget();a=a.getNativeEvent();var d=AdfAgent.AGENT,e=this.getComponent(),f=this.getDomElement();d.disableUserSelect(f);var g=this._getParentActivity(f,b);this._resizedActivity=g;var h=g.firstChild.firstChild;this._resizedActivityInitHeight=h.clientHeight;this._resizedActivityInitWidth=h.clientWidth;this._resizedActivityInitHeightInEM=parseFloat(h.style.height);this._EMToPxRatio=this._resizedActivityInitHeightInEM/
this._resizedActivityInitHeight;this._resizeStartY=a.clientY;this._resizeStartX=a.clientX;h.style.height=this._resizedActivityInitHeight+"px";h._newHeight=this._resizedActivityInitHeight;var k=this._dayGridCellRowsContainer;if(!k){k=this._getParentWithAttr(f,g,AdfDhtmlCalendarPeer._TIME_ACTIVITY_COLUMN_KEY);AdfAssert.assertDomElement(k);this._dayGridCellRowsContainer=k;-1==e.getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._TIME)&&e.getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._DURATION);
e=k.childNodes;for(f=0;f<e.length;f++)if(k=e[f],null!=d.getAttribute(k,AdfDhtmlCalendarPeer._CALENDAR_TIME_SLOT_KEY)){this._minIncrementSize=k.clientHeight;break}this._dateTimeGridContainer=this._getDateTimeGridContainer()}this._isActivityDraggableAcrossDays(g)&&(this._setTimeActDragInfo(g,h.clientHeight),this._gridTop=d.getElementTop(this._dateTimeGridContainer),this._gridLeftBoundary=d.getElementLeft(this._dateTimeGridContainer),this._gridRightBoundary=d.getElementLeft(this._dateTimeGridContainer)+
this._dateTimeGridContainer.clientWidth,this._deltaDays=0);this._scrollTopBeforeDrag=this._dateTimeGridContainer.scrollTop;this._resizedActivityContainer=h;g.style.zIndex=++this._nextZIndex;this._activityResizeDragCallback||(this._activityResizeDragCallback=this.createCallback(this._handleTimeActivityResizeDrag),this._activityResizeDropCallback=this.createCallback(this._handleTimeActivityResizeDrop),this._activityResizeAbortCallback=this.createCallback(this._handleTimeActivityResizeAbort));AdfPage.PAGE.startDrag(a,
this._activityResizeDragCallback,this._activityResizeDropCallback,this._activityResizeAbortCallback);b.style.cursor="default";this._activityResizeIndicator=b};
AdfDhtmlCalendarPeer.prototype._handleAlldayResizeIndicatorMouseDown=function(a){var b=a.getNativeEventTarget(),d=a.getNativeEvent(),e=AdfAgent.AGENT,f=this.getDomElement();e.disableUserSelect(f);var g=this._getParentActivity(f,b);this._resizedActivity=g;this._resizedActivityInitWidthInPercent=g.style.width;this._resizedActivityInitOffsetLeft=g.offsetLeft;this._resizeStartX=d.clientX;var h=this._getParentWithAttr(f,g,AdfDhtmlCalendarPeer._MONTH_ROW_ID);h&&(this._initMonthRowTop=e.getElementTop(h),
this._monthRowHeight=h.clientHeight,this._deltaWeeks=0);f=this._alldayContainer;f||(f=this._getComponentEventSource(a),"month"==f.getView()?f=h:(f=AdfRichUIPeer.CreateSubId(f.getClientId(),AdfDhtmlCalendarPeer._ALL_DAY_CONTAINER_SUB_ID),f=e.getElementById(f)));AdfAssert.assertDomElement(f);this._alldayContainer=f;a=Math.ceil(0.005*f.clientWidth);var h=f.clientWidth,e=e.getElementLeft(f),k=AdfPage.PAGE.getLocaleContext().isRightToLeft(),f=f.clientWidth/7,l=this._getActivityX(g,k);this._minX=this._getMinX(k,
l,f,a);this._maxX=k?e+a:e+h-a;this._alldayContainerX=e;this._dayWidth=f;this._activityX=l;this._activityEndPadding=a;AdfDomUtils.addCSSClassName(g,AdfDhtmlCalendarPeer._DRAG_END_CLASS);g.style.zIndex=++this._nextZIndex;this._alldayActivityResizeDragCallback||(this._alldayActivityResizeDragCallback=this.createCallback(this._handleAlldayActivityResizeDrag),this._alldayActivityResizeDropCallback=this.createCallback(this._handleAlldayActivityResizeDrop),this._alldayActivityResizeAbortCallback=this.createCallback(this._handleAlldayActivityResizeAbort));
AdfPage.PAGE.startDrag(d,this._alldayActivityResizeDragCallback,this._alldayActivityResizeDropCallback,this._alldayActivityResizeAbortCallback);b.style.cursor="default";this._activityResizeIndicator=b};AdfDhtmlCalendarPeer.prototype._getActivityX=function(a,b){var d=AdfAgent.AGENT;return b?d.getElementLeft(a)+resizedActivity.clientWidth:d.getElementLeft(a)};AdfDhtmlCalendarPeer.prototype._getMinX=function(a,b,d,e){return a?b-d+e:b+d-e};
AdfDhtmlCalendarPeer.prototype._getClientActivityId=function(a,b,d){a=this.getComponent().getClientId()+"::"+a+"::"+b;null!=d&&(a=a+"::"+d);return a};
AdfDhtmlCalendarPeer.prototype._handleTimeActivityResizeDrag=function(a,b,d){d=this._resizedActivity;var e=d.offsetTop;b=this._resizedActivityContainer;var f=this._resizedActivityInitHeight,g=this._dayGridCellRowsContainer,h=this._minIncrementSize;this._autoscrollCalendarIfNecessary(a);var k=a.clientY;if(this._isActivityDraggableAcrossDays(d)){var l=AdfPage.PAGE.getLocaleContext().isRightToLeft(),m=AdfAgent.AGENT,n=a.clientX;if(n>=this._parentDayLeftBoundary&&n<=this._parentDayRightBoundary)d.style.width=
Math.max(this._resizedActivityInitWidth,l?this._activityRightBoundary-n:n-this._activityLeftBoundary)+"px";else{var p=m.getElementPageBounds(this._parentDay);a=this._getProviderAndActivityIdFromElement(d);var q=a.suffix;if(!l&&n<p.left||l&&n>p.right){if(null!=q&&0<q.length&&(0<q?q--:q=null,a=this._getClientActivityId(a.providerId,a.activityId,q),a=m.getElementById(a)))this._deltaDays--,d.parentNode.removeChild(d),b=a.firstChild.firstChild,null!=b._initHeight?(this._setTimeActDragInfo(a,b._initHeight),
this._resizeStartY=b._resizeStartY):(this._setTimeActDragInfo(a,h),this._resizeStartY=m.getElementTop(a)+h,b.style.height=h+"px",f=h)}else if(!l&&n>p.right&&n<this._gridRightBoundary||l&&n<p.left&&n>this._gridLeftBoundary){b._initHeight=this._resizedActivityInitHeight;l=g.scrollHeight-e;b._newHeight=l;b.style.height=l+"px";b._resizeStartY=this._resizeStartY;l=d.cloneNode(!0);q?q++:q=0;l.id=this._getClientActivityId(a.providerId,a.activityId,q);b=l.style;b.zIndex=++this._nextZIndex;b.top=0;b.left=
0;for(b=AdfDomUtils.getNextElement(d.parentNode.parentNode);null!=b;){if(null!=m.getAttribute(b,"arc")){b.firstChild.appendChild(l);break}b=AdfDomUtils.getNextElement(b)}m.elementsAdded(l);b=l.firstChild.firstChild;this._setTimeActDragInfo(l,0);this._deltaDays++;this._resizeStartY=this._gridTop-this._dateTimeGridContainer.scrollTop}}}k-=this._resizeStartY;k+=this._dateTimeGridContainer.scrollTop-this._scrollTopBeforeDrag;k=Math.ceil(k/h)*h;f+k>=h&&e+f+k<=g.offsetHeight?(d=f+k,b.style.height=d+"px",
b._newHeight=d):e+f+k>g.offsetHeight&&(d=null!=AdfAgent.AGENT.getAttribute(d,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_DURATION_KEY)?f+k:g.offsetHeight-e-2,b.style.height=d+"px",b._newHeight=d)};
AdfDhtmlCalendarPeer.prototype._handleAlldayActivityResizeDrag=function(a,b,d){b=this._resizedActivity;var e=this._alldayContainer;d=this._dayWidth;var f=this._activityEndPadding,g=this._maxX,h=this._minX,k=this._activityX,l=AdfPage.PAGE.getLocaleContext().isRightToLeft(),m=0,n=a.clientX;l?(n<g?n=g:n>h&&(n=h),m=k-n):(n>g?n=g:n<h&&(n=h),m=n-k);this._resizeNewX=n;b.style.width=m+"px";if(g=this._initMonthRowTop)if(a=a.clientY,a>g+this._monthRowHeight){if(g=AdfDomUtils.getNextElement(e)){this._deltaWeeks+=
1;a=AdfAgent.AGENT;var h=b.cloneNode(!0),m=this._getProviderAndActivityIdFromElement(b),p=m.suffix;p||(p=0);52==p?p=1:p++;h.id=this._getClientActivityId(m.providerId,m.activityId,p);a.copyStyle(b,h);m=h.style;m.zIndex=++this._nextZIndex;g.appendChild(h);a.elementsAdded(g);l?(e=k-this._alldayContainerX+f,b.style.width=e+"px",m.right=".25%",k=this._getActivityX(h,l),m.width=k-n+"px"):(m.left=".25%",k=this._getActivityX(h,l),m.width=n-k+"px",e=e.clientWidth-b.offsetLeft-f,b.style.width=e+"px");this._minX=
this._getMinX(l,k,d,f);this._activityX=k;this._alldayContainer=g;this._resizedActivity=h;this._initMonthRowTop=a.getElementTop(g)}}else a<g&&(a=AdfAgent.AGENT,m=this._getProviderAndActivityIdFromElement(b),p=m.suffix,null!=p&&(p--,k=this._getClientActivityId(m.providerId,m.activityId,p),g=a.getElementById(k),!g&&0==p&&(k=this._getClientActivityId(m.providerId,m.activityId,null),g=a.getElementById(k),g||(k=this._getClientActivityId(m.providerId,m.activityId,52),g=a.getElementById(k))),g&&AdfDomUtils.isVisible(g)&&
(this._deltaWeeks-=1,h=0,k=this._getActivityX(g,l),h=l?k-n:n-k,this._minX=this._getMinX(l,k,d,f),g.width=h+"px",e.removeChild(b),b=AdfDomUtils.getPreviousElement(e),this._activityX=k,this._alldayContainer=b,this._resizedActivity=g,this._initMonthRowTop=a.getElementTop(b))))};AdfDhtmlCalendarPeer.prototype._getDateTimeGridContainer=function(){var a=this.getComponent().getClientId(),a=AdfRichUIPeer.CreateSubId(a,AdfDhtmlCalendarPeer._SCROLL_DAY_KEY);return AdfAgent.AGENT.getElementById(a)};
AdfDhtmlCalendarPeer.prototype._autoscrollCalendarIfNecessary=function(a){var b=AdfAgent.AGENT,d=this._dateTimeGridContainer;if(d.scrollHeight>d.offsetHeight&&(a=b.getMousePosition(a),b=b.getElementPosition(d),b=Math.max(a.y-b.y,0),a=b>d.offsetHeight-AdfDhtmlCalendarPeer._AUTOSCROLL_MARGIN,b<AdfDhtmlCalendarPeer._AUTOSCROLL_MARGIN||a))b=d.scrollTop+(a?this._minIncrementSize:-this._minIncrementSize),0<=b&&b<d.scrollHeight&&(d.scrollTop=b)};
AdfDhtmlCalendarPeer.prototype._handleTimeActivityResizeDrop=function(a){var b=AdfAgent.AGENT,d=this._resizedActivity,e=0,f=0,g=this._resizedActivityContainer,h=g._newHeight,f=(h-this._resizedActivityInitHeight)/this._minIncrementSize,k=this._getTimeSlotsPerHour(),e=0<f?Math.floor(f/k):Math.ceil(f/k),l=60/k,f=Math.round(f%k*l),h=h*this._EMToPxRatio;if(this._isActivityDraggableAcrossDays(d)&&!(0>this._deltaDays))if(0==this._deltaDays)d.style.width=this._resizedActivityInitWidth+"px";else{for(var e=
e+24*(this._deltaDays-1),m=d.parentNode.parentNode;0<this._deltaDays;)m=AdfDomUtils.getPreviousElement(m),null!=m&&null!=AdfAgent.AGENT.getAttribute(m,"arc")&&this._deltaDays--;if(null!=m)for(var n=this._getProviderAndActivityIdFromElement(d),m=m.firstChild.firstChild;null!=m;){var p=this._getProviderAndActivityIdFromElement(m);if(p.providerId==n.providerId&&p.activityId==n.activityId){n=(m.firstChild.firstChild._newHeight-m.firstChild.firstChild._initHeight)/this._minIncrementSize;e+=0<n?Math.floor(n/
k):Math.ceil(n/k);f+=Math.round(n%k*l);break}m=AdfDomUtils.getNextElement(m)}}this._doTimeActivityResizeCleanup(g,h);if(null!=b.getAttribute(d,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_DURATION_KEY))var q=this._getDayCellAttrValue(this.getDomElement(),d);this._queueCalendarActivityDurationChangeEvent(d,e,f,q);b.eatEvent(a)};
AdfDhtmlCalendarPeer.prototype._handleAlldayActivityResizeDrop=function(a){var b=AdfAgent.AGENT,d=this._resizedActivity,e=0,f=AdfPage.PAGE.getLocaleContext().isRightToLeft(),g=this._dayWidth,e=Math.ceil((this._resizeNewX-this._alldayContainerX)/g),h=0;f?(h=this._resizeStartX+g/2,g=Math.ceil((h-this._alldayContainerX)/g),h=g-e):(h=this._resizeStartX-g/2,g=Math.ceil((h-this._alldayContainerX)/g),h=e-g);e=0;this._initMonthRowTop&&(e=this._deltaWeeks);e=24*h+168*e;0==e&&(d.style.width=this._resizedActivityInitWidthInPercent);
this._doAlldayActivityResizeCleanup(d);this._queueCalendarActivityDurationChangeEvent(d,e,0);b.eatEvent(a)};AdfDhtmlCalendarPeer.prototype._queueCalendarActivityDurationChangeEvent=function(a,b,d,e){if(0!=b||0!=d)this._hideActivityHoverPopup(),a=this._getProviderAndActivityIdFromElement(a),AdfCalendarActivityDurationChangeEvent.queue(this.getComponent(),a.providerId,a.activityId,b,d,e)};
AdfDhtmlCalendarPeer.prototype._handleTimeActivityResizeAbort=function(){this._doTimeActivityResizeCleanup(this._resizedActivityContainer,this._resizedActivityInitHeightInEM)};AdfDhtmlCalendarPeer.prototype._handleAlldayActivityResizeAbort=function(){var a=this._resizedActivity;a.style.width=this._resizedActivityInitWidthInPercent;this._doAlldayActivityResizeCleanup(a)};AdfDhtmlCalendarPeer.prototype._doTimeActivityResizeCleanup=function(a,b){a.style.height=b+"em";this._doActivityResizeCleanup(a)};
AdfDhtmlCalendarPeer.prototype._doAlldayActivityResizeCleanup=function(a){AdfDomUtils.removeCSSClassName(a,AdfDhtmlCalendarPeer._DRAG_END_CLASS);this._doActivityResizeCleanup(a)};AdfDhtmlCalendarPeer.prototype._doActivityResizeCleanup=function(a){this._alldayContainer=this._resizedActivity=null;AdfAgent.AGENT.enableUserSelect(this.getDomElement());AdfAssert.assertDomElement(this._activityResizeIndicator);this._activityResizeIndicator.style.cursor="";this._activityResizeIndicator=null};
AdfDhtmlCalendarPeer.prototype._changeCursorForMovableActivity=function(a,b){if(b&&null!=a.getDragSource()&&!this._resizedActivity){var d=a.getProperty(AdfDhtmlCalendarPeer._VIEW_KEY);if(d!=AdfDhtmlCalendarPeer._VIEW_LIST){var e=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_ALL_DAY_KEY),f=null!=AdfAgent.AGENT.getAttribute(b,AdfDhtmlCalendarPeer._CALENDAR_ACTIVITY_DURATION_KEY),g=-1==a.getShowActivityTypes().indexOf(AdfDhtmlCalendarPeer._TIME);if(!f||!(g&&d==AdfDhtmlCalendarPeer._VIEW_DAY))(!e||
d!=AdfDhtmlCalendarPeer._VIEW_DAY)&&!AdfDomUtils.containsCSSClassName(b,AdfDhtmlCalendarPeer._MOVEABLE_CLASS)&&AdfDomUtils.addCSSClassName(b,AdfDhtmlCalendarPeer._MOVEABLE_CLASS)}}};AdfDhtmlCalendarPeer.prototype._hideActivityHoverPopup=function(){this._killCalendarActivityMouseTimeout();var a=AdfAgent.AGENT.getAttribute(this.getDomElement(),AdfDhtmlCalendarPeer._FACET_ID_ACTIVITY_HOVER);a&&this.getComponent().findComponent(a).hide()};
AdfDhtmlCalendarPeer.prototype._getProviderAndActivityIdFromElement=function(a){a=a.id.split("::");var b="",d="",e="",f=a.length;3<=f&&(b=a[1],d=a[2],3<f&&(e=a[3]));return{providerId:b,activityId:d,suffix:e}};AdfDhtmlCalendarPeer.prototype._getComponentEventSource=function(a){var b=this.getComponent();a=a.getSource();return a.getClientId()==this._splitterid?b:a};
AdfDhtmlCalendarPeer.prototype._switchfocusAndMarkActiveDescendant=function(a,b,d,e){AdfAssert.assertDomElement(a);AdfAssert.assertDomElement(b);AdfFocusUtils.focusElement(b);a.setAttribute("tabIndex",e?"0":"-1");b.setAttribute("tabIndex","0");d&&(d.cancel(),d.stopBubbling())};AdfDhtmlCalendarPeer.prototype.IsBusy=function(a){return this._isBusy};AdfDhtmlCalendarPeer.prototype.SetBusy=function(a){this._isBusy=a};