Hello,
I have a WebForm with one Calendar / DropDownList / GridView and one DayPilotCalendar.
I can choose in the DropDownList a resource. All details will shown in the GridView.
After I click on the DayPilotCalender, I can book this resource, with the Calendar I can change the weeks/month and so on. This function works without any problems, but the whole page will be refreshed und it flickers.
So I put some UpdatePanels in there, I click once in the DayPilotCalendar it works, and after the second click I get this error in this document: WebResource_3.axd
break at: $c.removeChild($c.selected)
if(typeof DayPilot==='undefined'){var DayPilot={};};if(typeof DayPilotCalendar==='undefined'){var DayPilotCalendar=DayPilot.CalendarVisible={};};if(typeof DayPilot.Global==='undefined'){DayPilot.Global={};};(function(){var $a=function(){};if(typeof DayPilot.Calendar!=='undefined'){return;};var DayPilotCalendar={};DayPilotCalendar.selectedCells=null;DayPilotCalendar.topSelectedCell=null;DayPilotCalendar.bottomSelectedCell=null;DayPilotCalendar.selecting=false;DayPilotCalendar.column=null;DayPilotCalendar.firstSelected=null;DayPilotCalendar.firstMousePos=null;DayPilotCalendar.originalMouse=null;DayPilotCalendar.originalHeight=null;DayPilotCalendar.originalTop=null;DayPilotCalendar.globalHandlers=false;DayPilotCalendar.editing=false;DayPilotCalendar.originalText=null;DayPilotCalendar.register=function($b){if(!DayPilotCalendar.registered){DayPilotCalendar.registered=[];};var r=DayPilotCalendar.registered;for(var i=0;i<r.length;i++){if(r[i]===$b){return;}};r.push($b);};DayPilotCalendar.unregister=function($b){var a=DayPilotCalendar.registered;if(!a){return;};var i=DayPilot.indexOf(a,$b);if(i===-1){return;};a.splice(i,1);};DayPilotCalendar.getCellsAbove=function($c){var $d=[];var c=DayPilotCalendar.getColumn($c);var tr=$c.parentNode;var $e=null;while(tr&&$e!==DayPilotCalendar.firstSelected){$e=tr.getElementsByTagName("td")[c];$d.push($e);tr=tr.previousSibling;while(tr&&tr.tagName!=="TR"){tr=tr.previousSibling;}};return $d;};DayPilotCalendar.getCellsBelow=function($c){var $d=[];var c=DayPilotCalendar.getColumn($c);var tr=$c.parentNode;var $e=null;while(tr&&$e!==DayPilotCalendar.firstSelected){$e=tr.getElementsByTagName("td")[c];$d.push($e);tr=tr.nextSibling;while(tr&&tr.tagName!=="TR"){tr=tr.nextSibling;}};return $d;};DayPilotCalendar.getColumn=function($c){var i=0;while($c.previousSibling){$c=$c.previousSibling;if($c.tagName==="TD"){i++;}};return i;};DayPilotCalendar.getShadowColumn=function($f){if(!$f){return null;};var $g=$f.parentNode;while($g&&$g.tagName!=="TD"){$g=$g.parentNode;};return $g;};DayPilotCalendar.gMouseMove=function(ev){if(typeof(DayPilotCalendar)==='undefined'){return;};if(ev.insideMainD){return;}else if(ev.srcElement){if(ev.srcElement.inside){return;}};var $h=DayPilot.mc(ev);if(DayPilotCalendar.drag){document.body.style.cursor='move';if(!DayPilotCalendar.gShadow){DayPilotCalendar.gShadow=DayPilotCalendar.createGShadow(DayPilotCalendar.drag.shadowType);};var $i=DayPilotCalendar.gShadow;$i.style.left=$h.x+'px';$i.style.top=$h.y+'px';DayPilot.Global.moving=null;DayPilotCalendar.deleteShadow(DayPilotCalendar.movingShadow);DayPilotCalendar.movingShadow=null;};for(var i=0;i<DayPilotCalendar.registered.length;i++){if(DayPilotCalendar.registered[i].out){DayPilotCalendar.registered[i].out();}}};DayPilotCalendar.gUnload=function(ev){if(!DayPilotCalendar.registered){return;};var r=DayPilotCalendar.registered;for(var i=0;i<r.length;i++){var c=r[i];c.dispose();DayPilotCalendar.unregister(c);}};DayPilotCalendar.gMouseUp=function(e){var e=e||window.event;if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;};e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();};if(DayPilot.Global.resizing){if(!DayPilotCalendar.resizingShadow){DayPilot.Global.resizing.style.cursor='default';DayPilot.Global.resizing.event.root.nav.top.style.cursor='auto';DayPilot.Global.resizing=null;return;};var $j=DayPilot.Global.resizing.event;var $k=DayPilot.Global.resizing.dpBorder;var $l=DayPilotCalendar.resizingShadow.clientHeight;var top=DayPilotCalendar.resizingShadow.offsetTop;DayPilotCalendar.deleteShadow(DayPilotCalendar.resizingShadow);DayPilotCalendar.resizingShadow=null;DayPilot.Global.resizing.style.cursor='default';$j.root.nav.top.style.cursor='auto';DayPilot.Global.resizing.onclick=null;DayPilot.Global.resizing=null;if($j.root.overlap){return;};$j.root.eventResizeDispatch($j,$l,top,$k);}else if(DayPilot.Global.moving){if(!DayPilotCalendar.movingShadow){DayPilot.Global.moving.event.root.nav.top.style.cursor='auto';DayPilot.Global.moving=null;return;};var $m=DayPilot.Global.moving.helper.oldColumn;var top=DayPilotCalendar.movingShadow.offsetTop;DayPilotCalendar.deleteShadow(DayPilotCalendar.movingShadow);var $j=DayPilot.Global.moving.event;var $n=DayPilotCalendar.movingShadow.column;var $o=DayPilotCalendar.drag;DayPilot.Global.moving.event.root.nav.top.style.cursor='auto';DayPilotCalendar.drag=null;DayPilot.Global.moving=null;DayPilotCalendar.movingShadow=null;if($o){if(!$j.root.todo){$j.root.todo={};};$j.root.todo.del=$o.element;};if($j.root.overlap){return;};var ev=e||window.event;$j.root.eventMoveDispatch($j,$n,top,ev,$o);};if(DayPilotCalendar.drag){DayPilotCalendar.drag=null;document.body.style.cursor=null;};if(DayPilotCalendar.gShadow){document.body.removeChild(DayPilotCalendar.gShadow);DayPilotCalendar.gShadow=null;};DayPilotCalendar.moveOffsetY=null;};DayPilotCalendar.dragStart=function(element,$p,id,$q,$r){DayPilot.us(element);var $o=DayPilotCalendar.drag={};$o.element=element;$o.duration=$p;$o.text=$q;$o.id=id;$o.shadowType=$r?$r:'Fill';return false;};DayPilotCalendar.deleteShadow=function($i){if(!$i){return;};if(!$i.parentNode){return;};$i.parentNode.removeChild($i);};DayPilotCalendar.createGShadow=function($r){var $i=document.createElement('div');$i.setAttribute('unselectable','on');$i.style.position='absolute';$i.style.width='100px';$i.style.height='20px';$i.style.border='2px dotted #666666';$i.style.zIndex=101;if($r==='Fill'){$i.style.backgroundColor="#aaaaaa";$i.style.opacity=0.5;$i.style.filter="alpha(opacity=50)";$i.style.border='2px solid #aaaaaa';};document.body.appendChild($i);return $i;};DayPilotCalendar.moveShadow=function($s){var $i=DayPilotCalendar.movingShadow;var parent=$i.parentNode;$i.parentNode.removeChild($i);$s.firstChild.appendChild($i);$i.style.left='0px';$i.style.width=(DayPilotCalendar.movingShadow.parentNode.offsetWidth)+'px';};DayPilotCalendar.Calendar=function(id){var $t=false;if(this instanceof DayPilotCalendar.Calendar&&!this.$38){$t=true;this.$38=true;};if(!$t){throw "DayPilot.Calendar() is a constructor and must be called as 'var c = new DayPilot.Calendar(id);'";};var $b=this;this.uniqueID=null;this.id=id;this.isCalendar=true;this.clientName=id;this.clientState={};this.cache={};this.cache.pixels={};this.elements={};this.elements.events=[];this.nav={};this.hideUntilInit=true;this.afterRender=function(){};this.fasterDispose=true;this.allDayEventBorderColor="#000000";this.allDayEventFontFamily='Tahoma';this.allDayEventFontSize='8pt';this.allDayEventFontColor="#000000";this.allDayEventHeight=16;this.allowEventOverlap=true;this.allowMultiSelect=true;this.autoRefreshCommand='refresh';this.autoRefreshEnabled=false;this.autoRefreshInterval=60;this.autoRefreshMaxCount=20;this.borderColor="#000000";this.businessBeginsHour=9;this.businessEndsHour=18;this.cellBackColor="#FFFFD5";this.cellBackColorNonBusiness="#FFF4BC";this.cellBorderColor="#999999";this.cellHeight=20;this.cellDuration=30;this.columnMarginRight=5;this.cornerBackColor="#ECE9D8";this.crosshairColor='Gray';this.crosshairOpacity=20;this.crosshairType="Header";this.cssOnly=true;this.dayBeginsHour=0;this.dayEndsHour=24;this.days=1;this.deleteImageUrl=null;this.durationBarColor='blue';this.durationBarVisible=true;this.durationBarWidth=5;this.durationBarImageUrl=null;this.eventArrangement="SideBySide";this.eventBackColor='#ffffff';this.eventBorderColor="#000000";this.eventFontFamily='Tahoma';this.eventFontSize='8pt';this.eventFontColor="#000000";this.eventSelectColor='blue';this.headerFontSize='10pt';this.headerFontFamily='Tahoma';this.headerFontColor="#000000";this.headerHeight=21;this.headerLevels=1;this.height=300;this.heightSpec='BusinessHours';this.hideFreeCells=false;this.hourHalfBorderColor="#F3E4B1";this.hourBorderColor="#EAD098";this.hourFontColor="#000000";this.hourFontFamily="Tahoma";this.hourFontSize="16pt";this.hourNameBackColor="#ECE9D8";this.hourNameBorderColor="#ACA899";this.hourWidth=45;this.initScrollPos=0;this.loadingLabelText="Loading...";this.loadingLabelVisible=true;this.loadingLabelBackColor="orange";this.loadingLabelFontColor="#ffffff";this.loadingLabelFontFamily="Tahoma";this.loadingLabelFontSize="10pt";this.moveBy="Left";this.numberFormat="0.00";this.roundedCorners=false;this.rtl=false;this.selectedColor="#316AC5";this.shadow='Fill';this.showToolTip=true;this.showAllDayEvents=false;this.showAllDayEventStartEnd=true;this.showHeader=true;this.showHours=true;this.startDate=new DayPilot.Date().getDatePart();this.timeFormat='Clock12Hours';this.timeHeaderCellDuration=60;this.useEventBoxes='Always';this.useEventSelectionBars=false;this.viewType='Days';this.timeRangeSelectedHandling='Disabled';this.eventClickHandling='Disabled';this.eventDoubleClickHandling='Disabled';this.eventRightClickHandling='Disabled';this.eventDeleteHandling='Disabled';this.eventEditHandling='Disabled';this.eventHoverHandling='Bubble';this.eventResizeHandling='Disabled';this.eventMoveHandling='Disabled';this.headerClickHandling='Disabled';this.transparent=false;this.bg=false;this.separateEventsTable=true;this.autoRefreshCount=0;this.clearSelection=function(){if(!DayPilotCalendar.selectedCells){DayPilotCalendar.selectedCells=[];return;};for(var j=0;j<DayPilotCalendar.selectedCells.length;j++){var $c=DayPilotCalendar.selectedCells[j];if($c){if($c.selected){$c.removeChild($c.selected);$c.firstChild.style.display='';$c.selected=null;}}};DayPilotCalendar.selectedCells=[];};this.ie=(navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE")!==-1);this.ff=(navigator&&navigator.userAgent&&navigator.userAgent.indexOf("Firefox")!==-1);this.opera105=(function(){if(/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var v=new Number(RegExp.$1);return v>=10.5;};return false;})();this.webkit522=(function(){if(/AppleWebKit[\/\s](\d+\.\d+)/.test(navigator.userAgent)){var v=new Number(RegExp.$1);return v>=522;};return false;})();this.ie9=(navigator&&navigator.userAgent&&navigator.userAgent.indexOf("MSIE 9")!==-1);this.cleanSelection=this.clearSelection;this.postBack2=function($u,$v,$w){var $x={};$x.action=$u;$x.parameters=$w;$x.data=$v;$x.header=this.getCallBackHeader();var $y="JSON"+DayPilot.JSON.stringify($x);__doPostBack($b.uniqueID,$y);};this.callBack2=function($u,$v,$w){if(this.callbackTimeout){window.clearTimeout(this.callbackTimeout);};this.callbackTimeout=window.setTimeout(function(){$b.loadingStart();},100);var $x={};$x.action=$u;$x.parameters=$w;$x.data=$v;$x.header=this.getCallBackHeader();var $y="JSON"+DayPilot.JSON.stringify($x);if(this.backendUrl){DayPilot.request(this.backendUrl,this.callBackResponse,$y,this.ajaxError);}else{WebForm_DoCallback(this.uniqueID,$y,this.updateView,this.clientName,this.callbackError,true);}};this.dispose=function(){var c=$b;c.deleteEvents();if(c.nav.messageClose){c.nav.messageClose.onclick=null;};if(c.nav.hourTable)c.nav.hourTable.oncontextmenu=null;if(c.nav.hourTable)c.nav.hourTable.onmousemove=null;if(c.nav.header)c.nav.header.oncontextmenu=null;if(c.nav.header)c.nav.corner.oncontextmenu=null;c.nav.zoom.onmousemove=null;c.nav.scroll.onscroll=null;c.nav.scroll.root=null;DayPilot.pu(c.nav.loading);c.disposeMain();c.disposeHeader();c.nav.select=null;c.nav.cornerRight=null;c.nav.scrollable=null;c.nav.allday=null;c.nav.zoom=null;c.nav.loading=null;c.nav.events=null;c.nav.header=null;c.nav.hourTable=null;c.nav.scrolltop=null;c.nav.scroll=null;c.nav.vsph=null;c.nav.main=null;c.nav.message=null;c.nav.messageClose=null;c.nav.top=null;DayPilot.ue(window,'resize',c.resize);DayPilotCalendar.unregister(c);};this.registerDispose=function(){var $z=document.getElementById(id);$z.dispose=this.dispose;};this.callBackResponse=function($A){$b.updateView($A.responseText);};this.getCallBackHeader=function(){var h={};h.control="dpc";h.id=this.id;h.clientState=$b.clientState;h.columns=this.getTreeState();h.days=$b.days;h.startDate=$b.startDate;h.cellDuration=$b.cellDuration;h.cssOnly=$b.cssOnly;h.cssClassPrefix=$b.cssClassPrefix;h.heightSpec=$b.heightSpec;h.businessBeginsHour=$b.businessBeginsHour;h.businessEndsHour=$b.businessEndsHour;h.viewType=$b.viewType;h.dayBeginsHour=$b.dayBeginsHour;h.dayEndsHour=$b.dayEndsHour;h.headerLevels=$b.headerLevels;h.backColor=$b.cellBackColor;h.nonBusinessBackColor=$b.cellBackColorNonBusiness;h.eventHeaderVisible=$b.eventHeaderVisible;h.timeFormat=$b.timeFormat;h.timeHeaderCellDuration=$b.timeHeaderCellDuration;h.locale=$b.locale;h.showAllDayEvents=$b.showAllDayEvents;h.tagFields=$b.tagFields;h.hourNameBackColor=$b.hourNameBackColor;h.hourFontFamily=$b.hourFontFamily;h.hourFontSize=$b.hourFontSize;h.hourFontColor=$b.hourFontColor;h.selected=$b.multiselect.events();h.hashes=$b.hashes;return h;};this.out=function(){this.crosshairHide();};this.getTreeState=function(){var $B=[];$B.ignoreToJSON=true;if(!this.columns){return $B;};for(var i=0;i<this.columns.length;i++){var $s=this.columns[i];var $C=this.getNodeState($s);$B.push($C);};return $B;};this.getNodeState=function($s){var $C={};$C.Value=$s.Value;$C.Name=$s.Name;$C.ToolTip=$s.ToolTip;$C.Date=$s.Start;$C.Children=this.getNodeChildren($s.Children);return $C;};this.getNodeChildren=function($d){var $D=[];$D.ignoreToJSON=true;if(!$d){return $D;};for(var i=0;i<$d.length;i++){$D.push(this.getNodeState($d[i]));};return $D;};this.listener=function($f){if(!this.listeners){this.listeners=[];};this.listeners.push($f);};this.callListeners=function($u,$v){if(!this.listeners){return;};for(var i=0;i<this.listeners.length;i++){this.listeners[i]();}};this.updateView=function($E,$F){var $E=eval("("+$E+")");if($E.BubbleGuid){var $G=$E.BubbleGuid;var $H=this.bubbles[$G];delete this.bubbles[$G];$b.loadingStop();$H.updateView($E.Result.BubbleHTML,$H);return;};if(typeof $E.ClientState!=='undefined'){$b.clientState=$E.ClientState;};if($E.UpdateType==="None"){$b.loadingStop();$b.fireAfterRenderDetached($E.CallBackData,true);if($E.Message){$b.message($E.Message,5000);};return;};if($E.VsUpdate){var $I=document.createElement("input");$I.type='hidden';$I.name=$b.id+"_vsupdate";$I.id=$I.name;$I.value=$E.VsUpdate;$b.nav.vsph.innerHTML='';$b.nav.vsph.appendChild($I);};$b.deleteEvents();$b.multiselect.clear(true);$b.multiselect.initList=$E.SelectedEvents;if(typeof $E.TagFields!=='undefined'){$b.tagFields=$E.TagFields;};if(typeof $E.SortDirections!='undefined'){$b.sortDirections=$E.SortDirections;};if($E.UpdateType==="Full"){$b.colors=$E.Colors;$b.dirtyColors=$E.DirtyColors;$b.cellProperties=$E.CellProperties;$b.columns=$E.Columns;$b.days=$E.Days;$b.startDate=new DayPilot.Date($E.StartDate).getDatePart();$b.cellDuration=$E.CellDuration;$b.heightSpec=$E.HeightSpec?$E.HeightSpec:$b.heightSpec;$b.businessBeginsHour=$E.BusinessBeginsHour?$E.BusinessBeginsHour:$b.businessBeginsHour;$b.businessEndsHour=$E.BusinessEndsHour?$E.BusinessEndsHour:$b.businessEndsHour;$b.viewType=$E.ViewType;$b.headerLevels=$E.HeaderLevels;$b.backColor=$E.BackColor?$E.BackColor:$b.backColor;$b.nonBusinessBackColor=$E.NonBusinessBackColor?$E.NonBusinessBackColor:$b.nonBusinessBackColor;$b.eventHeaderVisible=$E.EventHeaderVisible?$E.EventHeaderVisible:$b.eventHeaderVisible;$b.timeFormat=$E.TimeFormat?$E.TimeFormat:$b.timeFormat;$b.timeHeaderCellDuration=typeof $E.TimeHeaderCellDuration!='undefined'?$E.TimeHeaderCellDuration:$b.timeHeaderCellDuration;$b.locale=$E.Locale?$E.Locale:$b.locale;$b.dayBeginsHour=typeof $E.DayBeginsHour!='undefined'?$E.DayBeginsHour:$b.dayBeginsHour;$b.dayEndsHour=typeof $E.DayEndsHour!='undefined'?$E.DayEndsHour:$b.dayEndsHour;$b.cornerBackColor=$E.CornerBackColor;$b.cornerHTML=$E.CornerHTML;$b.hours=$E.Hours;$b.prepareColumns();};if($E.Hashes){for($J in $E.Hashes){$b.hashes[$J]=$E.Hashes[$J];}};$b.loadEvents($E.Events);$b.updateHeaderHeight();if($E.UpdateType==="Full"||$b.hideFreeCells){$b.drawHeader();$b.autoHeaderHeight();$b.deleteScrollLabels();$b.updateMessagePosition();$b.drawMain();$b.drawHourTable();$b.updateHeight();$b.fixScrollHeader();$b.clearSelection();};$b.show();$b.drawEvents();$b.drawEventsAllDay();if($b.timeRangeSelectedHandling!=="HoldForever"){$b.clearSelection();};$b.updateScrollLabels();if($b.todo){if($b.todo.del){var $K=$b.todo.del;$K.parentNode.removeChild($K);$b.todo.del=null;}};$b.fireAfterRenderDetached($E.CallBackData,true);$b.loadingStop();$b.startAutoRefresh();if($E.Message){$b.message($E.Message,20000);}};this.fireAfterRenderDetached=function($v,$L){var $M=function($v,$N){return function(){if($b.afterRender){$b.afterRender($v,$N);}};};window.setTimeout($M($v,$L),0);};this.$=function($O){return document.getElementById(id+"_"+$O);};this.isOverlapping=function($s){var $i=DayPilotCalendar.movingShadow||DayPilotCalendar.resizingShadow;var $f=DayPilot.Global.moving||DayPilot.Global.resizing;if(!$i){return false;};if(!$s){$s=$f.data.DayIndex;};var $P=parseInt($i.style.top,10);var $Q=parseInt($i.style.height,10);var $R=$P+$Q;for(var i=0;i<this.events.length;i++){var $v=this.events[i];if($s!==$v.DayIndex){continue;};var pk=$f.event.value();if($v.Value===pk){continue;};var $S=$v.Top+$v.Height;if($P>=$S||$R<=$v.Top){continue;}else{return true;}};return false;};this.createShadow=function($f,$T,$r){var $U=$b.nav.events;var $V=$U.clientWidth/$U.rows[0].cells.length;var i=Math.floor(($b.coords.x-45)/$V);if(i<0){i=0;};var $s=$U.rows[0].cells[i];var $W=0;if(typeof $f.duration!=='undefined'){var $p=$f.duration;var top=Math.floor((($b.coords.y-$W)+$b.cellHeight/2) / $b.cellHeight)*$b.cellHeight+$W;var $l=$p*$b.cellHeight/(60*$b.cellDuration);}else{var e=$f.event;var $v=$f.data;var $l=$v.Height;var top=$v.Top;};var $i=document.createElement('div');$i.setAttribute('unselectable','on');$i.style.position='absolute';$i.style.width='100%';$i.style.height=$l+'px';$i.style.left='0px';$i.style.top=top+'px';$i.style.zIndex=101;$i.exclude=true;var $X=document.createElement("div");$i.appendChild($X);if(this.cssOnly){$i.className=$b.prefixCssClass("_shadow");$X.className=this.prefixCssClass("_shadow_inner");};if(!this.cssOnly){$X.style.position="absolute";$X.style.top="0px";$X.style.bottom="0px";$X.style.left="0px";$X.style.right="0px";if($r==='Fill'){$X.style.backgroundColor="#aaaaaa";$X.style.opacity=0.5;$X.style.filter="alpha(opacity=50)";$X.style.border='2px solid #aaaaaa';}else{$X.style.border='2px dotted #666666';};if(this.roundedCorners){$X.style.MozBorderRadius="5px";$X.style.webkitBorderRadius="5px";$X.style.borderRadius="5px";}};$s.firstChild.appendChild($i);return $i;};this.durationHours=function(){return this.duration()/(60*60*1000);};this.businessHoursSpan=function(){if(this.businessBeginsHour>this.businessEndsHour){return 24-this.businessBeginsHour+this.businessEndsHour;}else{return this.businessEndsHour-this.businessBeginsHour;}};this.dayHoursSpan=function(){if(this.dayBeginsHour>=this.dayEndsHour){return 24-this.dayBeginsHour+this.dayEndsHour;}else{return this.dayEndsHour-this.dayBeginsHour;}};this.duration=function($Y){var $Z=0;if(this.heightSpec==='BusinessHoursNoScroll'){$Z=this.businessHoursSpan();}else if(this.hideFreeCells&&!$Y){var $00=(this.maxEnd-1)*this.cellDuration/this.cellHeight;var $01=Math.ceil($00/60);$Z=Math.max(this.dayBeginsHour+$01,this.businessEndsHour)-this.visibleStart();}else{$Z=this.dayHoursSpan();};return $Z*60*60*1000;};this.message=function($02,$03,$04,$05){if(!$02){return;};var $03=$03||2000;var $04=$04||"#ffffff";var $05=$05||"#000000";var $06=0.8;var $07;var top=this.totalHeaderHeight();var $08=this.hourWidth;var $09=DayPilot.sw($b.nav.scroll);if(!this.cssOnly){top+=1;$08+=2;$09-=2;};if(!this.nav.message){$07=document.createElement("div");$07.style.position="absolute";$07.style.left="0px";$07.style.top=(top)+"px";$07.style.right="0px";$07.style.display='none';$07.style.paddingLeft=($08)+"px";var $X=document.createElement("div");$X.onclick=function(){$b.nav.message.style.display='none';};if(!this.cssOnly){$X.style.padding="5px";$X.style.opacity=$06;$X.style.filter="alpha(opacity="+($06*100)+")";}else{$X.className=this.prefixCssClass("_message");};$07.appendChild($X);var close=document.createElement("div");close.style.position="absolute";if(!this.cssOnly){close.style.top="5px";close.style.right=(DayPilot.sw($b.nav.scroll)+5)+"px";close.style.color=$04;close.style.lineHeight="100%";close.style.cursor="pointer";close.style.fontWeight="bold";close.innerHTML="X";}else{close.className=this.prefixCssClass("_message_close");};close.onclick=function(){$b.nav.message.style.display='none';};$07.appendChild(close);this.nav.top.insertBefore($07,this.nav.loading);this.nav.message=$07;this.nav.messageClose=close;}else{this.nav.message.style.top=top+"px";};if(this.nav.cornerRight){this.nav.message.style.paddingRight=$09+"px";}else{this.nav.message.style.paddingRight="0px";};var $0a=function(){var $X=$b.nav.message.firstChild;if(!$b.cssOnly){$X.style.padding="5px";$X.style.opacity=$06;$X.style.backgroundColor=$05;$X.style.color=$04;};$X.innerHTML=$02;var end=function(){$b.messageTimeout=setTimeout($b.hideMessage,$03);};DayPilot.fade($b.nav.message,0.2,end);};if(this.nav.message.style.display!=='none'){clearTimeout($b.messageTimeout);DayPilot.fade($b.nav.message,-0.2,$0a);}else{$0a();}};this.hideMessage=function(){var end=function(){$b.nav.message.style.display='none';};DayPilot.fade($b.nav.message,-0.2,end);};this.hideMessageNow=function(){if(this.nav.message){this.nav.message.style.display='none';}};this.updateMessagePosition=function(){if(this.nav.message){this.nav.message.style.top=(this.totalHeaderHeight())+"px";}};this.rowCount=function(){return this.duration()/(60*1000*this.cellDuration);};this.eventClickPostBack=function(e,$v){this.postBack2('EventClick',$v,e);};this.eventClickCallBack=function(e,$v){this.callBack2('EventClick',$v,e);};this.eventClickDispatch=function(e){var $07=this;var e=e||window.event;var $0b=e.ctrlKey;if(typeof(DayPilotBubble)!=='undefined'){DayPilotBubble.hideActive();};if($b.eventDoubleClickHandling==='Disabled'){$b.eventClickSingle($07,$0b);return;};if(!$b.timeouts){$b.timeouts=[];}else{for(var $0c in $b.timeouts){window.clearTimeout($b.timeouts[$0c]);};$b.timeouts=[];};var $0d=function($07,$0b){return function(){$b.eventClickSingle($07,$0b);};};$b.timeouts.push(window.setTimeout($0d(this,$0b),300));};this.eventClickSingle=function($0e,$0b){var e=$0e.event;if(!e.clickingAllowed()){return;};switch($b.eventClickHandling){case 'PostBack':$b.eventClickPostBack(e);break;case 'CallBack':$b.eventClickCallBack(e);break;case 'JavaScript':$b.onEventClick(e);break;case 'Edit':if(!e.isAllDay()){$b.divEdit($0e);};break;case 'Select':if(!e.isAllDay()){$b.eventSelect(e,$0b);};break;case 'Bubble':if($b.bubble){$b.bubble.showEvent(e);};break;case 'ContextMenu':var $0f=e.client.contextMenu();if($0f){$0f.show(e);}else{if($b.contextMenu){$b.contextMenu.show(e);}};break;}};this.eventDoubleClickPostBack=function(e,$v){this.postBack2('EventDoubleClick',$v,e);};this.eventDoubleClickCallBack=function(e,$v){this.callBack2('EventDoubleClick',$v,e);};this.eventDoubleClickDispatch=function(){if(typeof(DayPilotBubble)!=='undefined'){DayPilotBubble.hideActive();};if($b.timeouts){for(var $0c in $b.timeouts){window.clearTimeout($b.timeouts[$0c]);};$b.timeouts=null;};var e=this.event;switch($b.eventDoubleClickHandling){case 'PostBack':$b.eventDoubleClickPostBack(e);break;case 'CallBack':$b.eventDoubleClickCallBack(e);break;case 'JavaScript':$b.onEventDoubleClick(e);break;case 'Edit':if(!e.isAllDay()){$b.divEdit(this);};break;case 'Select':if(!e.isAllDay()){$b.eventSelect(e);};break;case 'Bubble':if($b.bubble){$b.bubble.showEvent(e);};break;}};this.eventRightClickPostBack=function(e,$v){this.postBack2('EventRightClick',$v,e);};this.eventRightClickCallBack=function(e,$v){this.callBack2('EventRightClick',$v,e);};this.eventRightClickDispatch=function(){var e=this.event;if(!e.rightClickingAllowed()){return false;};switch($b.eventRightClickHandling){case 'PostBack':$b.eventRightClickPostBack(e);break;case 'CallBack':$b.eventRightClickCallBack(e);break;case 'JavaScript':$b.onEventRightClick(e);break;case 'ContextMenu':var $0f=e.client.contextMenu();if($0f){$0f.show(e);}else{if($b.contextMenu){$b.contextMenu.show(e);}};break;case 'Bubble':if($b.bubble){$b.bubble.showEvent(e);};break;};return false;};this.headerClickPostBack=function(c,$v){this.postBack2('HeaderClick',$v,c);};this.headerClickCallBack=function(c,$v){this.callBack2('HeaderClick',$v,c);};this.headerClickDispatch=function($f){var $v=this.data;var c=new DayPilotCalendar.Column($v.Value,$v.Name,$v.Start);switch($b.headerClickHandling){case 'PostBack':$b.headerClickPostBack(c);break;case 'CallBack':$b.headerClickCallBack(c);break;case 'JavaScript':$b.onHeaderClick(c);break;}};this.headerMouseMove=function(){if(typeof(DayPilotBubble)!=='undefined'&&$b.columnBubble){if($b.viewType==="Resources"){var $0g={};$0g.calendar=$b;$0g.id=this.data.Value;$0g.toJSON=function(){var $0h={};$0h.id=this.id;return $0h;};$b.columnBubble.showResource($0g);}else{var $0i=new DayPilot.Date(this.data.Start);var end=$0i.addDays(1);var $0j={};$0j.calendar=$b;$0j.start=$0i;$0j.end=end;$0j.toJSON=function(){var $0h={};$0h.start=this.start;$0h.end=this.end;return $0h;};$b.columnBubble.showTime($0j);}};var $c=this;var $07=$c.firstChild;if(!$07.active){var $v=$c.data;var c=new DayPilotCalendar.Column($v.Value,$v.Name,$v.Start);c.areas=$c.data.Areas;DayPilot.Areas.showAreas($07,c);}};this.headerMouseOut=function(ev){if(typeof(DayPilotBubble)!=='undefined'&&$b.columnBubble){$b.columnBubble.hideOnMouseOut();};DayPilot.Areas.hideAreas(this.firstChild,ev);};this.eventDeletePostBack=function(e,$v){this.postBack2('EventDelete',$v,e);};this.eventDeleteCallBack=function(e,$v){this.callBack2('EventDelete',$v,e);};this.eventDeleteDispatch=function($f){var e=$f.parentNode.parentNode.event;switch($b.eventDeleteHandling){case 'PostBack':$b.eventDeletePostBack(e);break;case 'CallBack':$b.eventDeleteCallBack(e);break;case 'JavaScript':$b.onEventDelete(e);break;}};this.eventResizePostBack=function(e,$0k,$0l,$v){if(!$0k)throw 'newStart is null';if(!$0l)throw 'newEnd is null';var $0m={};$0m.e=e;$0m.newStart=$0k;$0m.newEnd=$0l;this.postBack2('EventResize',$v,$0m);};this.eventResizeCallBack=function(e,$0k,$0l,$v){if(!$0k)throw 'newStart is null';if(!$0l)throw 'newEnd is null';var $0m={};$0m.e=e;$0m.newStart=$0k;$0m.newEnd=$0l;this.callBack2('EventResize',$v,$0m);};this.visibleStart=function($Y){if(this.heightSpec==='BusinessHoursNoScroll'){return this.businessBeginsHour;}else if(this.hideFreeCells&&!$Y){var $00=(this.minStart-1)*this.cellDuration/this.cellHeight;var $01=Math.floor($00/60);return Math.min(this.dayBeginsHour+$01,this.businessBeginsHour);}else{return this.dayBeginsHour;}};this.eventResizeDispatch=function(e,$Q,$P,$k){var $W=0;var $0k=new Date();var $0l=new Date();var $0i=e.start();var end=e.end();var $0n=$b.cellDuration;var $0o=new Date();if($k==='top'){var $0p=$b.columnsBottom[e.div.data.DayIndex].Start;$0o=$0i.getDatePart();var $0q=Math.floor(($P-$W)/$b.cellHeight);var $0r=$0q*$0n;var ts=$0r*60*1000;var $0s=$b.visibleStart()*60*60*1000;$0k=$0p.addTime(ts+$0s);$0l=e.end();}else if($k==='bottom'){var $0p=$b.columnsBottom[e.div.data.DayIndex].Start;$0o=end.getDatePart();var $0q=Math.floor(($P+$Q-$W)/$b.cellHeight);var $0r=$0q*$0n;var ts=$0r*60*1000;var $0s=$b.visibleStart()*60*60*1000;$0k=$0i;$0l=$0p.addTime(ts+$0s);};switch($b.eventResizeHandling){case 'PostBack':$b.eventResizePostBack(e,$0k,$0l);break;case 'CallBack':$b.eventResizeCallBack(e,$0k,$0l);break;case 'JavaScript':$b.onEventResize(e,$0k,$0l);break;}};this.eventMovePostBack=function(e,$0k,$0l,$0t,$v){if(!$0k)throw 'newStart is null';if(!$0l)throw 'newEnd is null';var $0m={};$0m.e=e;$0m.newStart=$0k;$0m.newEnd=$0l;$0m.newResource=$0t;this.postBack2('EventMove',$v,$0m);};this.eventMoveCallBack=function(e,$0k,$0l,$0t,$v){if(!$0k)throw 'newStart is null';if(!$0l)throw 'newEnd is null';var $0m={};$0m.e=e;$0m.newStart=$0k;$0m.newEnd=$0l;$0m.newResource=$0t;this.callBack2('EventMove',$v,$0m);};this.eventMoveDispatch=function(e,$n,$P,ev,$o){var $W=0;var $0q=Math.floor(($P-$W)/$b.cellHeight);var $0n=$b.cellDuration;var $0u=$0q*$0n*60*1000;var $0i=e.start();var end=e.end();var $0o=new Date();if($0i.isDayPilotDate){$0i=$0i.d;};$0o.setTime(Date.UTC($0i.getUTCFullYear(),$0i.getUTCMonth(),$0i.getUTCDate()));var $0v=($b.useEventBoxes!=='Never')?$0i.getTime()-($0o.getTime()+$0i.getUTCHours()*3600*1000+Math.floor($0i.getUTCMinutes()/$0n)*$0n*60*1000):0;var length=end.getTime()-$0i.getTime();var $0s=$b.visibleStart()*3600*1000;var $0w=this.columnsBottom[$n];var $0x=$0w.Start.getTime();var $0y=new Date();$0y.setTime($0x+$0u+$0v+$0s);var $0k=new DayPilot.Date($0y);var $0l=$0k.addTime(length);switch($b.eventMoveHandling){case 'PostBack':$b.eventMovePostBack(e,$0k,$0l,$0w.Value);break;case 'CallBack':$b.eventMoveCallBack(e,$0k,$0l,$0w.Value);break;case 'JavaScript':$b.onEventMove(e,$0k,$0l,$0w.Value,$o?true:false,ev.ctrlKey,ev.shiftKey);break;}};this.eventBubbleCallBack=function(e,$H){var $G=DayPilot.guid();if(!this.bubbles){this.bubbles=[];};this.bubbles[$G]=$H;var $0m={};$0m.e=e;$0m.guid=$G;this.callBack2("EventBubble",null,$0m);};this.bubbleCallBack=function($0z,$H){var $G=this.recordBubbleCall($H);var $0m={};$0m.args=$0z;$0m.guid=$G;this.callBack2("Bubble",null,$0m);};this.recordBubbleCall=function($H){var $G=DayPilot.guid();if(!this.bubbles){this.bubbles=[];};this.bubbles[$G]=$H;return $G;};this.eventMenuClickPostBack=function(e,$0A,$v){var $0m={};$0m.e=e;$0m.command=$0A;this.postBack2('EventMenuClick',$v,$0m);};this.eventMenuClickCallBack=function(e,$0A,$v){var $0m={};$0m.e=e;$0m.command=$0A;this.callBack2('EventMenuClick',$v,$0m);};this.eventMenuClick=function($0A,e,$0B){switch($0B){case 'PostBack':$b.eventMenuClickPostBack(e,$0A);break;case 'CallBack':$b.eventMenuClickCallBack(e,$0A);break;}};this.timeRangeMenuClickPostBack=function(e,$0A,$v){var $0m={};$0m.selection=e;$0m.command=$0A;this.postBack2("TimeRangeMenuClick",$v,$0m);};this.timeRangeMenuClickCallBack=function(e,$0A,$v){var $0m={};$0m.selection=e;$0m.command=$0A;this.callBack2("TimeRangeMenuClick",$v,$0m);};this.timeRangeMenuClick=function($0A,e,$0B){switch($0B){case 'PostBack':$b.timeRangeMenuClickPostBack(e,$0A);break;case 'CallBack':$b.timeRangeMenuClickCallBack(e,$0A);break;}};this.timeRangeSelectedPostBack=function($0i,end,$0C,$v){var $0D={};$0D.start=$0i;$0D.end=end;$0D.resource=$0C;this.postBack2('TimeRangeSelected',$v,$0D);};this.timeRangeSelectedCallBack=function($0i,end,$0C,$v){var $0D={};$0D.start=$0i;$0D.end=end;$0D.resource=$0C;this.callBack2('TimeRangeSelected',$v,$0D);};this.timeRangeSelectedDispatch=function($0i,end,$s){if(!$0i.isDayPilotDate){$0i=new DayPilot.Date($0i);};if(!end.isDayPilotDate){end=new DayPilot.Date(end);};switch($b.timeRangeSelectedHandling){case 'PostBack':$b.timeRangeSelectedPostBack($0i,end,$s);break;case 'CallBack':$b.timeRangeSelectedCallBack($0i,end,$s);break;case 'JavaScript':$b.onTimeRangeSelected($0i,end,$s);break;}};this.timeRangeDoubleClickPostBack=function($0i,end,$s,$v){var $0D={};$0D.start=$0i;$0D.end=end;$0D.resource=$s;this.postBack2('TimeRangeDoubleClick',$v,$0D);};this.timeRangeDoubleClickCallBack=function($0i,end,$s,$v){var $0D={};$0D.start=$0i;$0D.end=end;$0D.resource=$s;this.callBack2('TimeRangeDoubleClick',$v,$0D);};this.timeRangeDoubleClickDispatch=function($0i,end,$s){switch($b.timeRangeDoubleClickHandling){case 'PostBack':$b.timeRangeDoubleClickPostBack($0i,end,$s);break;case 'CallBack':$b.timeRangeDoubleClickCallBack($0i,end,$s);break;case 'JavaScript':$b.onTimeRangeDoubleClick($0i,end,$s);break;}};this.eventEditPostBack=function(e,$0E,$v){var $0m={};$0m.e=e;$0m.newText=$0E;this.postBack2("EventEdit",$v,$0m);};this.eventEditCallBack=function(e,$0E,$v){var $0m={};$0m.e=e;$0m.newText=$0E;this.callBack2("EventEdit",$v,$0m);};this.eventEditDispatch=function(e,$0E){switch($b.eventEditHandling){case 'PostBack':$b.eventEditPostBack(e,$0E);break;case 'CallBack':$b.eventEditCallBack(e,$0E);break;case 'JavaScript':$b.onEventEdit(e,$0E);break;}};this.eventSelectPostBack=function(e,$0F,$v){var $0m={};$0m.e=e;$0m.change=$0F;this.postBack2('EventSelect',$v,$0m);};this.eventSelectCallBack=function(e,$0F,$v){var $0m={};$0m.e=e;$0m.change=$0F;this.callBack2('EventSelect',$v,$0m);};this.eventSelectDispatch=function(e,$0F){switch($b.eventSelectHandling){case 'PostBack':$b.eventSelectPostBack(e,$0F);break;case 'CallBack':__theFormPostData="";__theFormPostCollection=[];if(WebForm_InitCallback){WebForm_InitCallback();};$b.eventSelectCallBack(e,$0F);break;case 'JavaScript':$b.onEventSelect(e,$0F);break;}};this.commandCallBack=function($0A,$v){this.stopAutoRefresh();var $0m={};$0m.command=$0A;this.callBack2('Command',$v,$0m);};this.onCellMousedown=function(ev){if(DayPilotCalendar.selecting){return;};if(DayPilotCalendar.editing){DayPilotCalendar.editing.blur();return;};if(DayPilotCalendar.selectedCells&&$b.timeRangeDoubleClickHandling!=='Disabled'){for(var i=0;i<DayPilotCalendar.selectedCells.length;i++){if(this===DayPilotCalendar.selectedCells[i]){return;}}};if($b.timeRangeSelectedHandling==="Disabled"){return;};var $0G=(window.event)?window.event.button:ev.which;if($0G!==1&&$0G!==0){return;};DayPilotCalendar.firstMousePos=DayPilot.mc(ev||window.event);DayPilotCalendar.selecting=true;$b.clearSelection();DayPilotCalendar.column=DayPilotCalendar.getColumn(this);DayPilotCalendar.selectedCells.push(this);DayPilotCalendar.firstSelected=this;DayPilotCalendar.topSelectedCell=this;DayPilotCalendar.bottomSelectedCell=this;$b.activateSelection();};this.activateSelection=function(){var $0H=this.getSelection();for(var j=0;j<DayPilotCalendar.selectedCells.length;j++){var $c=DayPilotCalendar.selectedCells[j];if($c&&!$c.selected){var $07=document.createElement("div");$07.style.height=($b.cellHeight-1)+"px";$07.style.backgroundColor=$b.selectedColor;$c.firstChild.style.display="none";$c.insertBefore($07,$c.firstChild);$c.selected=$07;}}};this.cellMouseOut=function(ev){if(typeof(DayPilotBubble)!=='undefined'&&$b.cellBubble){$b.cellBubble.hideOnMouseOut();}};this.mousemove=function(ev){if(typeof(DayPilotCalendar)==='undefined'){return;};if(typeof(DayPilotBubble)!=='undefined'&&$b.cellBubble){var $s=DayPilotCalendar.getColumn(this);var $0g=$b.columnsBottom[$s].Value;var $c={};$c.calendar=$b;$c.start=this.start;$c.end=this.end;$c.resource=$0g;$c.toJSON=function(){var $0h={};$0h.start=this.start;$0h.end=this.end;$0h.resource=this.resource;return $0h;};$b.cellBubble.showCell($c);};if(!DayPilotCalendar.selecting){return;};var $h=DayPilot.mc(ev||window.event);var $0I=DayPilotCalendar.getColumn(this);if($0I!==DayPilotCalendar.column){return;};$b.clearSelection();if($h.y<DayPilotCalendar.firstMousePos.y){DayPilotCalendar.selectedCells=DayPilotCalendar.getCellsBelow(this);DayPilotCalendar.topSelectedCell=DayPilotCalendar.selectedCells[0];DayPilotCalendar.bottomSelectedCell=DayPilotCalendar.firstSelected;}else{DayPilotCalendar.selectedCells=DayPilotCalendar.getCellsAbove(this);DayPilotCalendar.topSelectedCell=DayPilotCalendar.firstSelected;DayPilotCalendar.bottomSelectedCell=DayPilotCalendar.selectedCells[0];};$b.activateSelection();};this.getSelection=function(){var $0i=DayPilotCalendar.topSelectedCell.start;var end=DayPilotCalendar.bottomSelectedCell.end;var $0J=DayPilotCalendar.topSelectedCell.resource;return new DayPilot.Selection($0i,end,$0J,$b);};this.mouseup=function(ev){if(DayPilotCalendar.selecting&&DayPilotCalendar.topSelectedCell!==null){DayPilotCalendar.selecting=false;var $0K=$b.getSelection();$b.timeRangeSelectedDispatch($0K.start,$0K.end,$0K.resource);if($b.timeRangeSelectedHandling!=="Hold"&&$b.timeRangeSelectedHandling!=="HoldForever"){$a();}}else{DayPilotCalendar.selecting=false;}};this.scroll=function(ev){if(!$b.initScrollPos)return;$b.scrollPos=$b.nav.scroll.scrollTop;$b.scrollHeight=$b.nav.scroll.clientHeight;$b.nav.scrollpos.value=$b.scrollPos;$b.updateScrollLabels();};this.updateScrollLabels=function(){if(!this.scrollLabelsVisible){return;};if(!this.scrollLabels){return;};var $0L=this.columnsBottom;var $0M=(this.showHours?this.hourWidth:0);var $V=this.nav.main.rows[0].cells[0].clientWidth;var iw=10;var $0N=1;for(var i=0;i<$0L.length;i++){var $0O=this.nav.scrollUp[i];var $0P=this.nav.scrollDown[i];$0O.style.left=($0M+i*$V+$V/ 2-(iw/ 2)+$0N)+"px";$0P.style.left=($0M+i*$V+$V/ 2-(iw/ 2)+$0N)+"px";};var $0Q=this.autoHiddenPixels();for(var i=0;i<this.nav.scrollUp.length;i++){var up=this.nav.scrollUp[i];var $0R=this.nav.scrollDown[i];var $0S=this.scrollLabels[i].minEnd-$0Q;var $0T=this.scrollLabels[i].maxStart-$0Q;if(up&&$0R){if($0S<=$b.scrollPos){up.style.top=(this.totalHeaderHeight()+2)+"px";up.style.display='';}else{up.style.display='none';};if($0T>=$b.scrollPos+$b.scrollHeight){$0R.style.top=(this.totalHeaderHeight()+this.scrollHeight-8)+"px";$0R.style.display='';}else{$0R.style.display='none';}}}};this.createEdit=function($f){var $g=$f.parentNode;while($g&&$g.tagName!=="TD"){$g=$g.parentNode;};var $0U=document.createElement('textarea');$0U.style.position='absolute';$0U.style.width=($f.parentNode.offsetWidth-2)+'px';$0U.style.height=($f.offsetHeight-2)+'px';var $0V=DayPilot.gs($f,'fontFamily');if(!$0V)$0V=DayPilot.gs($f,'font-family');$0U.style.fontFamily=$0V;var $0W=DayPilot.gs($f,'fontSize');if(!$0W)$0W=DayPilot.gs($f,'font-size');$0U.style.fontSize=$0W;$0U.style.left='0px';$0U.style.top=$f.offsetTop+'px';$0U.style.border='1px solid black';$0U.style.padding='0px';$0U.style.marginTop='0px';$0U.style.backgroundColor='white';$0U.value=DayPilot.tr($f.event.text());$0U.event=$f.event;$g.firstChild.appendChild($0U);return $0U;};this.clearEventSelection=function(){$b.multiselect.divDeselectAll();$b.multiselect.clear(true);};this.cleanEventSelection=this.clearEventSelection;this.eventSelect=function(e,$0b){var m=$b.multiselect;m.previous=m.events();m.toggleDiv(e.div,$0b);var $0F=m.isSelected(e)?"selected":"deselected";$b.eventSelectDispatch(e,$0F);};this.multiselect={};this.multiselect.initList=[];this.multiselect.list=[];this.multiselect.divs=[];this.multiselect.previous=[];this.multiselect.serialize=function(){var m=$b.multiselect;return DayPilot.JSON.stringify(m.events());};this.multiselect.events=function(){var m=$b.multiselect;var $0X=[];$0X.ignoreToJSON=true;for(var i=0;i<m.list.length;i++){$0X.push(m.list[i]);};return $0X;};this.multiselect.updateHidden=function(){var h=$b.nav.select;h.value=$b.multiselect.serialize();};this.multiselect.toggleDiv=function($07,$0Y){var m=$b.multiselect;if(m.isSelected($07.event)){if($b.allowMultiSelect){if($0Y){m.remove($07.event);}else{var $0Z=m.list.length;m.clear(true);if($0Z>1){m.add($07.event);}}}else{m.clear(true);}}else{if($b.allowMultiSelect){if($0Y){m.add($07.event);}else{m.clear(true);m.add($07.event);}}else{m.clear(true);m.add($07.event);}};m.redraw();m.updateHidden();};this.multiselect.shouldBeSelected=function(e){if(!this.initList){return false;};for(var i=0;i<this.initList.length;i++){var ei=this.initList[i];if(ei.value!==null&&e.value()!==null&&ei.value===e.value()){return true;};if(ei.value===null&&e.value()===null&&ei.recurrentMasterId===e.recurrentMasterId()&&e.start().toStringSortable()===ei.start){return true;}};return false;};this.multiselect.alert=function(){var m=$b.multiselect;var $10=[];for(var i=0;i<m.list.length;i++){var event=m.list[i];$10.push(event.value());};alert($10.join("\n"));};this.multiselect.add=function(ev){var m=$b.multiselect;if(m.indexOf(ev)==-1){m.list.push(ev);}};this.multiselect.remove=function(ev){var m=$b.multiselect;var i=m.indexOf(ev);if(i!=-1){m.list.splice(i,1);}};this.multiselect.clear=function($11){var m=$b.multiselect;m.list=[];if($11){return;};m.redraw();};this.multiselect.redraw=function(){var m=$b.multiselect;for(var i=0;i<$b.elements.events.length;i++){var $07=$b.elements.events[i];if(m.isSelected($07.event)){m.divSelect($07);}else{m.divDeselect($07);}}};this.multiselect.divSelect=function($07){var m=$b.multiselect;var cn=$b.cssOnly?$b.prefixCssClass("_selected"):$b.prefixCssClass("selected");var c=m.findContentDiv($07);DayPilot.Util.addClass(c,cn);if($b.useEventSelectionBars){m.divSelectTraditional($07);};m.divs.push($07);};this.multiselect.findContentDiv=function($07){for(var i=0;i<$07.childNodes.length;i++){var c=$07.childNodes[i];if(c.getAttribute("c")=="1"){return c;}};return null;};this.multiselect.divDeselectAll=function(){var m=$b.multiselect;for(var i=0;i<m.divs.length;i++){var $07=m.divs[i];m.divDeselect($07,true);};m.divs=[];};this.multiselect.divDeselect=function($07,$12){var m=$b.multiselect;var cn=$b.cssOnly?$b.prefixCssClass("_selected"):$b.prefixCssClass("selected");var c=m.findContentDiv($07);DayPilot.Util.removeClass(c,cn);if($b.useEventSelectionBars){m.divDeselectTraditional($07);};if($12){return;};var i=DayPilot.indexOf(m.divs,$07);if(i!=-1){m.divs.splice(i,1);}};this.multiselect.isSelected=function(ev){return $b.multiselect.indexOf(ev)!=-1;};this.multiselect.indexOf=function(ev){return DayPilot.indexOf($b.multiselect.list,ev);};this.multiselect.divSelectTraditional=function($13){var w=5;if(!$13.top){var top=document.createElement("div");top.setAttribute("unselectable","on");top.style.position='absolute';top.style.left=$13.offsetLeft+'px';top.style.width=$13.offsetWidth+'px';top.style.top=($13.offsetTop-w)+'px';top.style.height=w+'px';top.style.backgroundColor=$b.eventSelectColor;top.style.zIndex=100;$13.parentNode.appendChild(top);$13.top=top;};if(!$13.bottom){var $14=document.createElement("div");$14.setAttribute("unselectable","on");$14.style.position='absolute';$14.style.left=$13.offsetLeft+'px';$14.style.width=$13.offsetWidth+'px';$14.style.top=($13.offsetTop+$13.offsetHeight)+'px';$14.style.height=w+'px';$14.style.backgroundColor=$b.eventSelectColor;$14.style.zIndex=100;$13.parentNode.appendChild($14);$13.bottom=$14;}};this.multiselect.divDeselectTraditional=function($13){if($13.top){$13.parentNode.removeChild($13.top);$13.top=null;};if($13.bottom){$13.parentNode.removeChild($13.bottom);$13.bottom=null;}};this.selectedEvent=function(){var a=$b.multiselect.list;if(a.length<=0){return null;};if(a.length===1){return a[0];};return null;};this.divEdit=function($f){if(DayPilotCalendar.editing){DayPilotCalendar.editing.blur();return;};var $0U=this.createEdit($f);DayPilotCalendar.editing=$0U;$0U.onblur=function(){var id=$f.event.value();var $15=$f.event.tag();var $16=$f.event.text();var $0E=$0U.value;DayPilotCalendar.editing=null;$0U.parentNode.removeChild($0U);if($16===$0E){return;};$f.style.display='none';$b.eventEditDispatch($f.event,$0E);};$0U.onkeypress=function(e){var $17=(window.event)?event.keyCode:e.keyCode;if($17===13){this.onblur();return false;}else if($17===27){$0U.parentNode.removeChild($0U);DayPilotCalendar.editing=false;};return true;};$0U.select();$0U.focus();};this.prepareColumns=function(){if(!this.columns){this.createDaysViewColumns();};this.activateColumnCollection(this.columns);this.columnsBottom=this.columns.getColumns(this.headerLevels,true);};this.createDaysViewColumns=function(){this.columns=[];var $0i=this.startDate.getDatePart();if(this.heightSpec==='BusinessHoursNoScroll'){$0i=$0i.addHours(this.businessBeginsHour);};for(var i=0;i<this.days;i++){var $s={};$s.Start=$0i.addDays(i);$s.Name=$s.Start.toString();$s.InnerHTML=$s.Name;this.columns.push($s);}};this.activateColumn=function($s){$s.Start=new DayPilot.Date($s.Start);$s.getChildren=function($18,$19){var $10=[];if($18<=1){$10.push(this);return $10;};if(!this.Children||this.Children.length===0){if($19){$10.push(this);}else{$10.push("empty");};return $10;};for(var i=0;i<this.Children.length;i++){var $1a=this.Children[i];var $1b=$1a.getChildren($18-1,$19);for(var j=0;j<$1b.length;j++){$10.push($1b[j]);}};return $10;};$s.getChildrenCount=function($18){var $0Z=0;if(!this.Children||this.Children.length<=0||$18<=1){return 1;};for(var i=0;i<this.Children.length;i++){$0Z+=this.Children[i].getChildrenCount($18-1);};return $0Z;};$s.putIntoBlock=function(ep){for(var i=0;i<this.blocks.length;i++){var $1c=this.blocks[i];if($1c.overlapsWith(ep.Top,ep.Height)){$1c.events.push(ep);$1c.min=Math.min($1c.min,ep.Top);$1c.max=Math.max($1c.max,ep.Top+ep.Height);return i;}};var $1c=[];$1c.lines=[];$1c.events=[];$1c.overlapsWith=function($0i,$1d){var end=$0i+$1d-1;if(!(end<this.min||$0i>this.max-1)){return true;};return false;};$1c.putIntoLine=function(ep){var $1e=this;for(var i=0;i<this.lines.length;i++){var $1f=this.lines[i];if($1f.isFree(ep.Top,ep.Height)){$1f.push(ep);return i;}};var $1f=[];$1f.isFree=function($0i,$1d){var end=$0i+$1d-1;var $Y=this.length;for(var i=0;i<$Y;i++){var e=this[i];if(!(end<e.Top||$0i>e.Top+e.Height-1)){return false;}};return true;};$1f.push(ep);this.lines.push($1f);return this.lines.length-1;};$1c.events.push(ep);$1c.min=ep.Top;$1c.max=ep.Top+ep.Height;this.blocks.push($1c);return this.blocks.length-1;};$s.putIntoLine=function(ep){var $1e=this;for(var i=0;i<this.lines.length;i++){var $1f=this.lines[i];if($1f.isFree(ep.Top,ep.Height)){$1f.push(ep);return i;}};var $1f=[];$1f.isFree=function($0i,$1d){var end=$0i+$1d-1;var $Y=this.length;for(var i=0;i<$Y;i++){var e=this[i];if(!(end<e.Top||$0i>e.Top+e.Height-1)){return false;}};return true;};$1f.push(ep);this.lines.push($1f);return this.lines.length-1;};if($s.Children){this.activateColumnCollection($s.Children);}};this.activateColumnCollection=function(cc){for(var i=0;i<cc.length;i++){this.activateColumn(cc[i]);};cc.getColumns=function($18,$19){var $10=[];for(var i=0;i<this.length;i++){var $D=this[i].getChildren($18,$19);for(var j=0;j<$D.length;j++){$10.push($D[j]);}};return $10;};cc.getColumnCount=function($18){var $0Z=0;for(var i=0;i<this.length;i++){$0Z+=this[i].getChildrenCount($18);};return $0Z;};};this.drawEventsAllDay=function(){if(!this.showAllDayEvents){return;};var $1g=this.nav.header;$1g.style.display='none';var $0L=this.columnsBottom.length;for(var j=0;j<this.allDay.lines.length;j++){var $1f=this.allDay.lines[j];for(var i=0;i<$1f.length;i++){var $v=$1f[i];var $07=document.createElement("div");$07.data=$v;$07.setAttribute("unselectable","on");$07.style.position='absolute';$07.style.left=(100.0*$v.ColStart/$0L)+"%";$07.style.width=(100.0*$v.ColWidth/$0L)+"%";$07.style.height=this.allDayEventHeight+'px';if(!this.cssOnly){$07.style.top=(4+this.headerLevels*this.headerHeight+j*(this.allDayEventHeight+2))+"px";}else{$07.className=this.prefixCssClass("_alldayevent");$07.style.top=(this.headerLevels*this.headerHeight+j*(this.allDayEventHeight))+"px";};$07.style.textAlign='left';$07.style.lineHeight="1.2";if($v.ClickEnabled){$07.onclick=this.eventClickDispatch;};if($v.DoubleClickEnabled){$07.ondblclick=this.eventDoubleClickDispatch;};$07.oncontextmenu=this.eventRightClickDispatch;$07.onmousemove=function(ev){var $07=this;if(!$07.active){if($b.cssOnly){DayPilot.Util.addClass($07,$b.prefixCssClass("_alldayevent_hover"));};DayPilot.Areas.showAreas($07,this.event);}};$07.onmouseout=function(ev){var $07=this;if($b.cssOnly){DayPilot.Util.removeClass($07,$b.prefixCssClass("_alldayevent_hover"));};DayPilot.Areas.hideAreas(this,ev);if($b.bubble){$b.bubble.hideOnMouseOut();}};if(this.showToolTip){$07.title=$v.ToolTip;};if(!this.cssOnly){var back=$v.BackgroundColor;var $X=document.createElement("div");$X.setAttribute("unselectable","on");$X.style.marginLeft='2px';$X.style.marginRight='3px';$X.style.paddingLeft='2px';$X.style.height=(this.allDayEventHeight-2)+'px';$X.style.border='1px solid '+this.allDayEventBorderColor;$X.style.overflow='hidden';$X.style.position='relative';$X.style.backgroundColor=back;$X.className=this.prefixCssClass("alldayevent");if(this.roundedCorners){$X.style.MozBorderRadius="5px";$X.style.webkitBorderRadius="5px";$X.style.borderRadius="5px";};var $1h=[];var $1i=true;var $1j=this.showAllDayEventStartEnd;var $1k=this.showAllDayEventStartEnd;var $1l="Center";var $1m=0;var $1n=$v.Start.getTime()===$v.PartStart.getTime();var $1o=$v.End.getTime()===$v.PartEnd.getTime();if($1j){if($1l==='Left'){$1h.push("<div unselectable='on' style='position:absolute;text-align:left;height:1px;font-size:1px;width:100%'><div unselectable='on' style='font-size:8pt;color:gray;text-align:right;");$1h.push("width:");$1h.push($1m-4);$1h.push("px;");$1h.push("><span style='background-color:");}else{$1h.push("<div unselectable='on' style='position:absolute;text-align:left;height:1px;font-size:1px;width:100%'><div unselectable='on' style='font-size:8pt;color:gray'><span style='background-color:");};$1h.push('transparent');$1h.push("' unselectable='on'>");if($1n){if($v.Start.getDatePart().getTime()!==$v.Start.getTime()){$1h.push(DayPilot.Date.hours($v.Start.d,this.timeFormat==='Clock12Hours'));}}else{$1h.push("~");};$1h.push("</span></div></div>");};if($1k){$1h.push("<div unselectable='on' style='position:absolute;text-align:right;height:1px;font-size:1px;width:100%'><div unselectable='on' style='margin-right:4px;font-size:8pt;color:gray'><span style='background-color:");$1h.push('transparent');$1h.push("' unselectable='on'>");if($1o){if($v.End.getDatePart().getTime()!==$v.End.getTime()){$1h.push(DayPilot.Date.hours($v.End.d,this.timeFormat==='Clock12Hours'));}}else{$1h.push("~");};$1h.push("</span></div></div>");};if($1l==='Left'){var $08=$1j?$1m:0;$1h.push("<div style='margin-top:0px;height:");$1h.push(this.allDayEventHeight-2);$1h.push("px;");$1h.push(";overflow:hidden;text-align:left;padding-left:");$1h.push($08);$1h.push("px;font-size:");$1h.push(this.allDayEventFontSize);$1h.push(";color:");$1h.push(this.allDayEventFontColor);$1h.push(";font-family:");$1h.push(this.eventFontFamily);$1h.push("' unselectable='on'>");if($v.InnerHTML){$1h.push($v.InnerHTML);}else{$1h.push($v.Text);};$1h.push("</div>");}else if($1l==='Center'){if($1i){$1h.push("<div style='position:absolute; text-align:center; width: 98%; height:1px;'>");$1h.push("<span style='background-color:");$1h.push('transparent');$1h.push(";font-size:");$1h.push(this.allDayEventFontSize);$1h.push(";color:");$1h.push(this.allDayEventFontColor);$1h.push(";font-family:");$1h.push(this.allDayEventFontFamily);$1h.push("' unselectable='on'>");if($v.InnerHTML){$1h.push($v.InnerHTML);}else{$1h.push($v.Text);};$1h.push("</span>");$1h.push("</div>");}else{$1h.push("<div style='margin-top:0px;height:");$1h.push(this.allDayEventHeight-2);$1h.push("px;");$1h.push(";overflow:hidden;text-align:center;font-size:");$1h.push(this.allDayEventFontSize);$1h.push(";color:");$1h.push(this.allDayEventFontColor);$1h.push(";font-family:");$1h.push(this.allDayEventFontFamily);$1h.push("' unselectable='on'>");if($v.InnerHTML){$1h.push($v.InnerHTML);}else{$1h.push($v.Text);};$1h.push("</div>");}};$X.innerHTML=$1h.join('');$07.appendChild($X);}else{var $X=document.createElement("div");$X.setAttribute("unselectable","on");$X.className=this.prefixCssClass("_alldayevent_inner");if($v.InnerHTML){$X.innerHTML=$v.InnerHTML;}else{$X.innerHTML=$v.Text;};$07.appendChild($X);};this.nav.allday.appendChild($07);new DayPilotCalendar.Event($07,$b);this.elements.events.push($07);}};$1g.style.display='';};this.deleteEvents=function($1p){$b.multiselect.divDeselectAll();if(this.elements.events){for(var i=0;i<this.elements.events.length;i++){var $07=this.elements.events[i];var $f=$07.event;if($f&&$1p&&!$f.isAllDay()){continue;};if($f){$f.div=null;$f.root=null;};$07.onclick=null;$07.onclickSave=null;$07.ondblclick=null;$07.oncontextmenu=null;$07.onmouseover=null;$07.onmouseout=null;$07.onmousemove=null;$07.onmousedown=null;if($07.firstChild&&$07.firstChild.firstChild&&$07.firstChild.firstChild.tagName&&$07.firstChild.firstChild.tagName.toUpperCase()==='IMG'){var $1q=$07.firstChild.firstChild;$1q.onmousedown=null;$1q.onmousemove=null;$1q.onclick=null;};$07.helper=null;$07.data=null;$07.event=null;DayPilot.de($07);}};this.elements.events=[];};this.drawEvent=function($v){var $U=this.nav.events;var $1r=this.roundedCorners;var $1s=this.roundedCorners&&(this.ff||this.opera105||this.webkit522||this.ie9);var $1t=this.roundedCorners&&!$1s;var $1u=$v.BorderColor;var $07=document.createElement("div");$07.data=$v;$07.setAttribute("unselectable","on");$07.style.MozUserSelect='none';$07.style.KhtmlUserSelect='none';$07.style.WebkitUserSelect='none';$07.style.position='absolute';if(!this.cssOnly){$07.style.fontFamily=this.eventFontFamily;$07.style.fontSize=this.eventFontSize;$07.style.color=$v.FontColor;if(!$1r){$07.style.backgroundColor=$1u;};if(this.transparent){$07.style.opacity=0.6;$07.style.filter="alpha(opacity=60)";}}else{$07.className=this.prefixCssClass("_event");};$07.style.left=$v.Left+'%';$07.style.top=($v.Top-this.autoHiddenPixels())+'px';$07.style.width=$v.Width+'%';$07.style.height=Math.max($v.Height,2)+'px';$07.style.overflow='hidden';$07.isFirst=$v.PartStart.getTime()===$v.Start.getTime();$07.isLast=$v.PartEnd.getTime()===$v.End.getTime();if($v.ClickEnabled){$07.onclick=this.eventClickDispatch;};if($v.DoubleClickEnabled){$07.ondblclick=this.eventDoubleClickDispatch;};$07.oncontextmenu=this.eventRightClickDispatch;$07.onmousemove=this.onEventMouseMove;$07.onmouseout=this.onEventMouseOut;$07.onmousedown=this.onEventMouseDown;var $1h=[];if(!this.cssOnly){if(this.eventDeleteHandling!=='Disabled'&&$v.DeleteEnabled){$1h.push("<div unselectable='on' style='position:absolute; width:100%;text-align:right;'><div style='position:absolute; width:10px; height:10px; right:2px; top: 2px; cursor:pointer;");if(this.deleteImageUrl){$1h.push("background-image:url(\"" + this.deleteImageUrl + "\");");};$1h.push("' class='");$1h.push(this.prefixCssClass("event_delete"));$1h.push("' onmousemove=\"if(typeof(DayPilotBubble)!=='undefined'&&");$1h.push(this.clientName);$1h.push(".bubble && ");$1h.push(this.clientName);$1h.push(".bubble.hideAfter > 0");$1h.push(") { DayPilotBubble.hideActive(); event.cancelBubble = true; };\" onmousedown=\"this.parentNode.parentNode.style.cursor='default';\" onclick='");$1h.push(this.clientName);$1h.push(".eventDeleteDispatch(this); event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation();' ></div></div>");};if($1t){$1h.push("<div style='margin-right:2px;'>");$1h.push("<div style='height:1px;line-height:1px;font-size:0px; margin-left:2px; background-color:");$1h.push($1u);$1h.push(";'> </div>");$1h.push("</div>");$1h.push("<div unselectable='on' style='position:absolute;width:100%;margin-top:-1px;'>");$1h.push("<div style='height:1px;line-height:1px;font-size:0px;margin-left:1px;margin-top:1px; margin-right:1px;border-right:1px solid ");$1h.push($1u);$1h.push(";border-left:1px solid ");$1h.push($1u);$1h.push(";background-color:");$1h.push($v.Header?$1u:$v.BackgroundColor);$1h.push("'>");$1h.push(" </div>");$1h.push("</div>");}else if(!$1s){$1h.push("<div style='height:1px;line-height:1px;font-size:0px; width:1px;'> </div>");};$1h.push("<div");if(this.showToolTip){$1h.push(" title='");$1h.push($v.ToolTip.replace(/'/g,"'"));$1h.push("'");};var $l=Math.max($v.Height-2,0);$1h.push(" c='1'");$1h.push(" class='");$1h.push($v.CssClass?$v.CssClass:this.prefixCssClass('event'));$1h.push("'");if($1t){$1h.push(" style='margin-top:1px;height:");$1h.push($l-2);}else{$1h.push(" style='margin-top:0px;height:");$1h.push($l);};$1h.push("px;background-color:");$1h.push($v.BackgroundColor);if($1s){$1h.push(";border:1px solid ");$1h.push($1u);$1h.push(";-moz-border-radius:5px;");$1h.push(";-webkit-border-radius:5px;");$1h.push(";border-radius:5px;");}else{$1h.push(";border-left:1px solid ");$1h.push($1u);$1h.push(";border-right:1px solid ");$1h.push($1u);};$1h.push(";");if($v.BackgroundImage){$1h.push("background-image:url(");$1h.push($v.BackgroundImage);$1h.push(");");if($v.BackgroundRepeat){$1h.push("background-repeat:");$1h.push($v.BackgroundRepeat);$1h.push(";");}};if($b.rtl){$1h.push("direction:rtl;");};$1h.push("' unselectable='on'>");if(this.durationBarVisible){$1h.push("<div style='position:absolute;left:1px;top:1px;width:");$1h.push($b.durationBarWidth-1);$1h.push("px;height:");$1h.push($v.BarTop);$1h.push("px;background-color:white;font-size:1px' unselectable='on'></div>");$1h.push("<div style='position:absolute;left:1px;top:");$1h.push($v.BarTop+$v.BarHeight);$1h.push("px;width:");$1h.push($b.durationBarWidth-1);$1h.push("px;height:");$1h.push($l-($v.BarTop+$v.BarHeight));$1h.push("px;background-color:white;font-size:1px' unselectable='on'></div>");$1h.push("<div style='position:absolute;left:1px;width:");$1h.push($b.durationBarWidth);$1h.push("px;height:");$1h.push($v.BarHeight);$1h.push("px;");if($v.DurationBarImageUrl){$1h.push("background-image:url(");$1h.push($v.DurationBarImageUrl);$1h.push(");");}else if($b.durationBarImageUrl){$1h.push("background-image:url(");$1h.push($b.durationBarImageUrl);$1h.push(");");};$1h.push("top:");$1h.push($v.BarTop+1);$1h.push("px;background-color:");$1h.push($v.BarColor);$1h.push(";font-size:1px' unselectable='on'></div><div style='position:absolute;left:");$1h.push($b.durationBarWidth);$1h.push("px;top:1px;width:1px;background-color:");$1h.push($1u);$1h.push(";height:100%' unselectable='on'></div>");};var $1v=$v.Header?this.eventHeaderHeight:0;if($v.Header){$1h.push("<div unselectable='on' style='overflow:hidden;height:");$1h.push(this.eventHeaderHeight);$1h.push("px; background-color:");$1h.push($1u);$1h.push(";font-size:");$1h.push(this.eventHeaderFontSize);$1h.push(";color:");$1h.push(this.eventHeaderFontColor);$1h.push("'>");$1h.push($v.Header);$1h.push("</div>");};if(this.durationBarVisible){$1h.push("<div unselectable='on' style='padding-left:");$1h.push($b.durationBarWidth+3);$1h.push("px;");$1h.push("'>");}else{$1h.push("<div unselectable='on' style='overflow:hidden;padding-left:2px;height:");$1h.push($l-$1v-1);$1h.push("px;'>");};$1h.push($v.InnerHTML);$1h.push("</div></div>");if($1t){$1h.push("<div unselectable='on' style='margin-right:2px;'>");$1h.push("<div unselectable='on' style='height:1px;line-height:1px;font-size:0px;margin-left:2px;margin-top:1px;background-color:");$1h.push($1u);$1h.push(";'><!-- --></div>");$1h.push("</div>");$1h.push("<div unselectable='on' style='margin-right:0px;margin-top:-3px;position:relative;'>");$1h.push("<div unselectable='on' style='margin-right:0px;position:relative;'>");$1h.push("<div unselectable='on' style='height:1px;line-height:1px;font-size:0px;margin-top:1px;margin-left:1px;margin-right:1px;border-right:1px solid ");$1h.push($1u);$1h.push(";border-left:1px solid ");$1h.push($1u);$1h.push(";background-color:");$1h.push($v.BackgroundColor);$1h.push("'>");$1h.push("<!-- --></div>");$1h.push("</div>");$1h.push("</div>");};$07.innerHTML=$1h.join('');}else{if($v.CssClass){DayPilot.Util.addClass($07,$v.CssClass);};var $X=document.createElement("div");$X.setAttribute("unselectable","on");$X.className=$b.prefixCssClass("_event_inner");$X.innerHTML=$v.InnerHTML;if($v.BackgroundColor){$X.style.backgroundColor=$v.BackgroundColor;};if($v.BorderColor){$X.style.borderColor=$v.BorderColor;};if($v.BackgroundImage){$X.style.backgroundImage="url("+$v.BackgroundImage+")";if($v.BackgroundRepeat){$X.style.backgroundRepeat=$v.BackgroundRepeat;}};$07.appendChild($X);};if($U.rows[0].cells[$v.DayIndex]){var $1w=$U.rows[0].cells[$v.DayIndex].firstChild;$1w.appendChild($07);$b.makeChildrenUnselectable($07);var e=new DayPilotCalendar.Event($07,$b);if($b.multiselect.shouldBeSelected(e)){$b.multiselect.add($07.event);};if($b.afterEventRender){$b.afterEventRender(e,$07);}};$b.elements.events.push($07);};this.relativizeChildren=function(el){var c=(el&&el.childNodes)?el.childNodes.length:0;for(var i=0;i<c;i++){var $1a=el.childNodes[i];if($1a.style.position===''){$1a.style.position='relative';};this.relativizeChildren($1a);}};this.makeChildrenUnselectable=function(el){var c=(el&&el.childNodes)?el.childNodes.length:0;for(var i=0;i<c;i++){try{var $1a=el.childNodes[i];if($1a.nodeType===1){$1a.setAttribute("unselectable","on");this.makeChildrenUnselectable($1a);}}catch(e){}}};this.drawEvents=function(){this.multiselect.list=[];var $0i=new Date();for(var i=0;i<this.columnsBottom.length;i++){var $1x=this.columnsBottom[i];for(var m=0;m<$1x.blocks.length;m++){var $1c=$1x.blocks[m];for(var j=0;j<$1c.lines.length;j++){var $1f=$1c.lines[j];for(var k=0;k<$1f.length;k++){var e=$1f[k];e.Width=100/$1c.lines.length;e.Left=e.Width*j;if(this.eventArrangement==='Cascade'){var $1y=(j===$1c.lines.length-1);if(!$1y){e.Width=e.Width*1.5;}};if(this.eventArrangement==='Full'){e.Left=e.Left/2;e.Width=100-e.Left;};if(!e.AllDay){this.bg?this.drawEvent2(e):this.drawEvent(e);}}}}};this.multiselect.redraw();var end=new Date();var $1z=end.getTime()-$0i.getTime();};this.drawEventsFromLines=function(){this.multiselect.list=[];for(var i=0;i<this.columnsBottom.length;i++){var $1x=this.columnsBottom[i];for(var j=0;j<$1x.lines.length;j++){var $1f=$1x.lines[j];for(var k=0;k<$1f.length;k++){var e=$1f[k];e.Width=100/$1x.lines.length;e.Left=e.Width*j;if(!e.AllDay){this.drawEvent(e);}}}}};this.prefixCssClass=function($1A){if(this.cssClassPrefix){return this.cssClassPrefix+$1A;}else{return "";}};this.show=function(){if(this.nav.top.style.visibility=='hidden'){this.nav.top.style.visibility='visible';}};this.drawTop=function(){this.nav.top=document.getElementById(this.id);this.nav.top.innerHTML='';this.nav.top.style.MozUserSelect='none';this.nav.top.style.KhtmlUserSelect='none';this.nav.top.style.WebkitUserSelect='none';this.nav.top.style.position='relative';if(this.width){this.nav.top.style.width=this.width;};if(!this.cssOnly){this.nav.top.style.lineHeight="1.2";this.nav.top.style.textAlign="left";};if(this.heightSpec==="Parent100Pct"){this.nav.top.style.height="100%";};if(this.hideUntilInit){this.nav.top.style.visibility='hidden';};this.nav.scroll=document.createElement("div");this.nav.scroll.style.height=this.getScrollableHeight()+"px";if(this.cssOnly){DayPilot.Util.addClass(this.nav.top,this.prefixCssClass("_main"));};if(this.heightSpec==="Fixed"){this.nav.scroll.style.overflowY="scroll";}else if(this.heightSpec==='BusinessHours'&&this.durationHours()<=this.businessEndsHour-this.businessBeginsHour){this.nav.scroll.style.overflow="hidden";}else if(this.heightSpec!=="Full"&&this.heightSpec!=="BusinessHoursNoScroll"){this.nav.scroll.style.overflow="auto";}else{this.nav.scroll.style.overflow="hidden";};this.nav.scroll.style.position="relative";if(!this.cssOnly){this.nav.scroll.style.border="1px solid "+this.borderColor;this.nav.scroll.style.backgroundColor=this.hourNameBackColor;};if(this.showHeader){var $1g=this.drawTopHeaderDiv();this.nav.top.appendChild($1g);};this.nav.scroll.style.zoom=1;var $1B=this.drawScrollable();this.nav.scrollable=$1B.firstChild;this.nav.scroll.appendChild($1B);this.nav.top.appendChild(this.nav.scroll);this.nav.vsph=document.createElement("div");this.nav.vsph.style.display="none";this.nav.top.appendChild(this.nav.vsph);this.nav.scrollpos=document.createElement("input");this.nav.scrollpos.type="hidden";this.nav.scrollpos.id=$b.id+"_scrollpos";this.nav.scrollpos.name=this.nav.scrollpos.id;this.nav.top.appendChild(this.nav.scrollpos);this.nav.select=document.createElement("input");this.nav.select.type="hidden";this.nav.select.id=$b.id+"_select";this.nav.select.name=this.nav.select.id;this.nav.select.value=null;this.nav.top.appendChild(this.nav.select);this.nav.scrollLayer=document.createElement("div");this.nav.scrollLayer.style.position='absolute';this.nav.scrollLayer.style.top='0px';this.nav.scrollLayer.style.left='0px';this.nav.top.appendChild(this.nav.scrollLayer);this.nav.scrollUp=[];this.nav.scrollDown=[];this.nav.loading=document.createElement("div");this.nav.loading.style.position='absolute';this.nav.loading.style.top='0px';this.nav.loading.style.left=(this.hourWidth+5)+"px";this.nav.loading.style.backgroundColor=this.loadingLabelBackColor;this.nav.loading.style.fontSize=this.loadingLabelFontSize;this.nav.loading.style.fontFamily=this.loadingLabelFontFamily;this.nav.loading.style.color=this.loadingLabelFontColor;this.nav.loading.style.padding='2px';this.nav.loading.innerHTML=this.loadingLabelText;this.nav.loading.style.display='none';this.nav.top.appendChild(this.nav.loading);};this.drawHourTable=function(){if(!this.fasterDispose){DayPilot.pu(this.nav.hourTable);}else{this.disposeHourTable();};this.nav.scrollable.rows[0].cells[0].innerHTML='';this.nav.hourTable=this.createHourTable();this.nav.scrollable.rows[0].cells[0].appendChild(this.nav.hourTable);};this.disposeHourTable=function(){for(var i=0;i<this.nav.hourTable.rows.length;i++){var $1C=this.nav.hourTable.rows[i];var $07=$1C.cells[0].firstChild;$07.data=null;$07.onTimeHeaderMouseMove=null;$07.onTimeHeaderMouseOut=null;}};this.drawScrollable=function(){var $1D=document.createElement("div");$1D.style.zoom=1;$1D.style.position='relative';$1D.onmousemove=this.onMainMouseMove;var $1E=document.createElement("table");$1E.cellSpacing="0";$1E.cellPadding="0";$1E.border="0";$1E.style.border="0px none";$1E.style.width="100%";$1E.style.position='absolute';var r=$1E.insertRow(-1);var c;if(this.showHours){c=r.insertCell(-1);c.valign="top";c.style.padding='0px';c.style.border='0px none';this.nav.hourTable=this.createHourTable();c.appendChild(this.nav.hourTable);};c=r.insertCell(-1);c.width="100%";c.style.padding='0px';c.style.border='0px none';c.style.verticalAlign="top";if(!this.cssOnly&&!this.separateEventsTable){c.appendChild(this.createEventsAndCells());}else{var parent=document.createElement("div");parent.style.height="0px";parent.style.position="relative";parent.appendChild(this.createEventsAndCells());var $1F=document.createElement("div");$1F.style.position="absolute";$1F.style.top="0px";$1F.style.left="0px";$1F.style.right="0px";parent.appendChild($1F);this.nav.crosshair=$1F;parent.appendChild(this.createEventsTable());c.appendChild(parent);};$1D.appendChild($1E);var $l=(this.duration()*this.cellHeight)/(60000*this.cellDuration);this.nav.zoom=$1D;return $1D;};this.createEventsAndCells=function(){var $1E=document.createElement("table");$1E.cellPadding="0";$1E.cellSpacing="0";$1E.border="0";$1E.style.width="100%";$1E.style.border="0px none";if(!this.cssOnly){$1E.style.borderLeft="1px solid "+this.borderColor;};$1E.style.tableLayout='fixed';this.nav.main=$1E;this.nav.events=$1E;return $1E;};this.createEventsTable=function(){var $1E=document.createElement("table");$1E.style.position="absolute";$1E.style.top="0px";$1E.style.width="100%";$1E.cellPadding="0";$1E.cellSpacing="0";$1E.border="0";$1E.style.width="100%";$1E.style.border="0px none";$1E.style.tableLayout='fixed';this.nav.events=$1E;var $1G=true;var $0L=this.columnsBottom;var cl=$0L.length;var r=($1G)?$1E.insertRow(-1):$1E.rows[0];for(var j=0;j<cl;j++){var c=($1G)?r.insertCell(-1):r.cells[j];if($1G){c.style.padding='0px';c.style.border='0px none';c.style.height='0px';c.style.overflow='visible';if(!$b.rtl){c.style.textAlign='left';};var $07=document.createElement("div");$07.style.marginRight=$b.columnMarginRight+"px";$07.style.position='relative';$07.style.height='1px';if(!this.cssOnly){$07.style.fontSize='1px';$07.style.lineHeight='1.2';};$07.style.marginTop='-1px';c.appendChild($07);}};return $1E;};this.createHourTable=function(){var $1E=document.createElement("table");$1E.cellSpacing="0";$1E.cellPadding="0";$1E.border="0";$1E.style.border='0px none';$1E.style.width=this.hourWidth+"px";$1E.oncontextmenu=function(){return false;};$1E.onmousemove=function(){$b.crosshairHide();};var $1H=this.duration()/(this.timeHeaderCellDuration*60*1000);var $0i=this.visibleStart();for(var i=0;i<$1H;i++){this.createHourRow($1E,i);};return $1E;};this.autoHiddenRows=function(){return(this.visibleStart()-this.visibleStart(true))*(60/this.cellDuration);};this.autoHiddenHours=function(){return(this.visibleStart()-this.visibleStart(true));};this.autoHiddenPixels=function(){return this.autoHiddenRows()*this.cellHeight;};this.createHourRow=function($1E,i){var $l=(this.cellHeight*60/ this.cellDuration)/(60/this.timeHeaderCellDuration);var r=$1E.insertRow(-1);r.style.height=$l+"px";var c=r.insertCell(-1);c.valign="bottom";c.setAttribute("unselectable","on");if(!this.cssOnly){c.className=this.prefixCssClass("rowheader");c.style.backgroundColor=this.hourNameBackColor;c.style.cursor="default";};c.style.padding='0px';c.style.border='0px none';var $1I=document.createElement("div");if(this.cssOnly){$1I.className=this.prefixCssClass("_rowheader");};$1I.style.position="relative";$1I.style.width=this.hourWidth+"px";$1I.style.height=($l)+"px";$1I.style.overflow='hidden';$1I.setAttribute("unselectable","on");if(this.hours){var $v=this.hours[i+this.autoHiddenHours()];$1I.data=$v;$1I.onmousemove=$b.onTimeHeaderMouseMove;$1I.onmouseout=$b.onTimeHeaderMouseOut;};var $1c=document.createElement("div");if(this.cssOnly){$1c.className=this.prefixCssClass("_rowheader_inner");};$1c.setAttribute("unselectable","on");if(!this.cssOnly){$1c.style.borderBottom="1px solid "+this.hourNameBorderColor;$1c.style.textAlign="right";$1c.style.height=($l-1)+"px";};if(this.hours){$1c.innerHTML=this.hours[i+this.autoHiddenHours()].html;}else{var $q=document.createElement("div");$q.setAttribute("unselectable","on");if(!this.cssOnly){$q.style.padding="2px";$q.style.fontFamily=this.hourFontFamily;$q.style.fontSize=this.hourFontSize;$q.style.color=this.hourFontColor;};var $0i=this.startDate.addHours(i+this.visibleStart());var $1J=$0i.getHours();var am=$1J<12;if(this.timeFormat==="Clock12Hours"){$1J=$1J%12;if($1J===0){$1J=12;}};$q.innerHTML=$1J;var $1K=document.createElement("span");$1K.setAttribute("unselectable","on");if(!this.cssOnly){$1K.style.fontSize="10px";$1K.style.verticalAlign="super";}else{$1K.className=this.prefixCssClass("_rowheader_minutes");};var $1L;if(this.timeFormat==="Clock12Hours"){if(am){$1L="AM";}else{$1L="PM";}}else{$1L="00";};if(!this.cssOnly){$1K.innerHTML=" "+$1L;}else{$1K.innerHTML=$1L;};$q.appendChild($1K);$1c.appendChild($q);};$1I.appendChild($1c);c.appendChild($1I);};this.onTimeHeaderMouseMove=function(ev){$b.crosshairHide();var $07=this;if(!$07.active){DayPilot.Areas.showAreas($07,$07.data);}};this.onTimeHeaderMouseOut=function(ev){DayPilot.debug("out");DayPilot.Areas.hideAreas(this,ev);};this.getScrollableHeight=function(){switch(this.heightSpec){case "Fixed":return this.height;case "Parent100Pct":return this.height;case "Full":return(this.duration()*this.cellHeight)/(60000*this.cellDuration);case "BusinessHours":case "BusinessHoursNoScroll":var $Z=this.businessHoursSpan();return $Z*this.cellHeight*60/this.cellDuration;default:throw "DayPilot.Calendar: Unexpected 'heightSpec' value.";}};this.totalHeaderHeight=function(){var $1M=this.headerLevels*this.headerHeight+this.headerLevels-1;if(this.showAllDayEvents&&this.allDayHeaderHeight){if(!this.cssOnly){return $1M+this.allDayHeaderHeight;}else{return $1M+this.allDayHeaderHeight;}}else{return $1M;}};this.autoHeaderHeight=function(){if(!this.headerHeightAutoFit){return;};if(this.headerLevels>1){alert("Header height can't be adjusted for HeaderLevels > 1 (not implemented yet).");return;};var $Y=0;for(var i=0;i<this.columnsBottom.length;i++){var $c=this.nav.header.rows[this.headerLevels-1].cells[i];var $07=$c.firstChild;var $X=$07.firstChild;var $1N=$07.style.height;$07.style.height="auto";$X.style.position="static";var h=$07.offsetHeight;$07.style.height=$1N;$X.style.position='';$Y=Math.max($Y,h);};if($Y>this.headerHeight){this.headerHeight=$Y;this.updateHeaderHeight();this.drawHeader();}};this.scrollbarVisible=function(){if(this.heightSpec==='Parent100Pct'){var $X=(this.duration()*this.cellHeight)/(60000*this.cellDuration);return $X>this.height;};return this.nav.scroll.style.overflow!=='hidden';};this.drawTopHeaderDiv=function(){var $1g=document.createElement("div");if(!this.cssOnly){$1g.style.borderLeft="1px solid "+this.borderColor;$1g.style.borderRight="1px solid "+this.borderColor;};$1g.style.overflow="auto";var $1E=document.createElement("table");$1E.cellPadding="0";$1E.cellSpacing="0";$1E.border="0";$1E.style.width="100%";$1E.style.borderCollapse='separate';$1E.style.border="0px none";var r=$1E.insertRow(-1);this.nav.fullHeader=$1E;var c=r.insertCell(-1);c.style.padding='0px';c.style.border='0px none';if(this.showHours){var $1O=this.drawCorner();c.appendChild($1O);this.nav.corner=$1O;}else{var $1P=document.createElement("div");$1P.style.backgroundColor=this.hourNameBackColor;$1P.style.width="0px";$1P.style.height=this.totalHeaderHeight()+"px";$1P.style.borderTop="1px solid "+this.borderColor;$1P.setAttribute("unselectable","on");c.appendChild($1P);};c=r.insertCell(-1);c.style.width="100%";if(!this.cssOnly){c.style.backgroundColor=this.hourNameBackColor;};c.valign="top";c.style.position='relative';c.style.padding='0px';c.style.border='0px none';var $1Q=document.createElement("div");$1Q.style.position="relative";$1Q.style.height=this.totalHeaderHeight()+"px";$1Q.style.overflow="hidden";c.appendChild($1Q);this.nav.mid=$1Q;this.nav.header=document.createElement("table");this.nav.header.cellPadding="0";this.nav.header.cellSpacing="0";this.nav.header.border="0";this.nav.header.width="100%";this.nav.header.style.tableLayout="fixed";if(!this.cssOnly){this.nav.header.style.borderBottom="0px none #000000";this.nav.header.style.borderRight="0px none #000000";this.nav.header.style.borderLeft="1px solid "+this.borderColor;this.nav.header.style.borderTop="1px solid "+this.borderColor;};this.nav.header.oncontextmenu=function(){return false;};var $1R=this.scrollbarVisible();if(!this.cssOnly){if($1R){this.nav.header.style.borderRight="1px solid "+this.borderColor;}};$1Q.appendChild(this.nav.header);if(this.showAllDayEvents){var $1S=document.createElement("div");$1S.style.position='absolute';$1S.style.top="0px";$1S.style.height="0px";$1S.style.width="100%";this.nav.allday=$1S;$1Q.appendChild($1S);};if($1R){this.createCornerRightTd();};$1g.appendChild($1E);return $1g;};this.createCornerRightTd=function(){var r=this.nav.fullHeader.rows[0];c=r.insertCell(-1);if(!this.cssOnly){c.className=this.prefixCssClass('cornerright');c.style.backgroundColor=this.hourNameBackColor;c.style.borderBottom="0px none";c.style.borderLeft="0px none";c.style.borderRight="0px none";};c.style.padding='0px';c.style.verticalAlign='top';c.setAttribute("unselectable","on");var $1h=document.createElement("div");$1h.setAttribute("unselectable","on");if(this.cssOnly){$1h.className=this.prefixCssClass('_cornerright');};$1h.style.overflow="hidden";$1h.style.position="relative";$1h.style.width="16px";$1h.style.height=this.totalHeaderHeight()+"px";var $X=document.createElement("div");if(this.cssOnly){$X.className=this.prefixCssClass('_cornerright_inner');}else{$X.style.borderTop="1px solid "+this.borderColor;};$1h.appendChild($X);c.appendChild($1h);this.nav.cornerRight=$1h;};this.drawCorner=function(){var $1B=document.createElement("div");$1B.style.position='relative';if(!this.cssOnly){$1B.style.backgroundColor=this.cornerBackColor;$1B.style.fontFamily=this.headerFontFamily;$1B.style.fontSize=this.headerFontSize;$1B.style.color=this.headerFontColor;$1B.className=this.prefixCssClass("corner");}else{$1B.className=this.prefixCssClass("_corner");};$1B.style.width=this.hourWidth+"px";$1B.style.height=this.totalHeaderHeight()+"px";$1B.style.overflow="hidden";$1B.oncontextmenu=function(){return false;};var $1O=document.createElement("div");if(this.cssOnly){$1O.className=this.prefixCssClass("_corner_inner");}else{$1O.style.borderTop="1px solid "+this.borderColor;};$1O.setAttribute("unselectable","on");$1O.innerHTML=this.cornerHTML?this.cornerHTML:'';$1B.appendChild($1O);if(!this.numberFormat)return $1B;var $1T=document.createElement("div");$1T.style.position='absolute';$1T.style.padding='2px';$1T.style.top='0px';$1T.style.left='1px';$1T.style.backgroundColor="#FF6600";$1T.style.color="white";$1T.innerHTML="\u0044\u0045\u004D\u004F";$1T.setAttribute("unselectable","on");$1B.appendChild($1T);return $1B;};this.disposeMain=function(){var $1E=this.nav.main;$1E.root=null;$1E.onmouseup=null;for(var y=0;y<$1E.rows.length;y++){var r=$1E.rows[y];for(var x=0;x<r.cells.length;x++){var c=r.cells[x];c.root=null;c.onmousedown=null;c.onmousemove=null;c.onmouseout=null;c.onmouseup=null;c.onclick=null;c.ondblclick=null;c.oncontextmenu=null;}};if(!this.fasterDispose)DayPilot.pu($1E);};this.deleteScrollLabels=function(){for(var i=0;this.nav.scrollUp&&i<this.nav.scrollUp.length;i++){this.nav.scrollLayer.removeChild(this.nav.scrollUp[i]);};for(var i=0;this.nav.scrollDown&&i<this.nav.scrollDown.length;i++){this.nav.scrollLayer.removeChild(this.nav.scrollDown[i]);};this.nav.scrollUp=[];this.nav.scrollDown=[];};this.drawMain=function(){var $1U=[];var $1V=[];var $1E=this.nav.main;var $0q=this.cellDuration*60*1000;var $1W=this.rowCount();var $0L=$b.columnsBottom;var $1G=!this.tableCreated||$0L.length!==$1E.rows[0].cells.length||$1W!==$1E.rows.length;if($1E){this.disposeMain();}while($1E&&$1E.rows&&$1E.rows.length>0&&$1G){if(!this.fasterDispose)DayPilot.pu($1E.rows[0]);$1E.deleteRow(0);};this.tableCreated=true;if(this.scrollLabelsVisible){var $0L=this.columnsBottom;var $0M=(this.showHours?this.hourWidth:0);var $V=(this.nav.scroll.clientWidth-$0M)/$0L.length;for(var i=0;i<$0L.length;i++){var $0O=document.createElement("div");$0O.style.position='absolute';$0O.style.top='0px';$0O.style.left=($0M+2+i*$V+$V/2)+"px";$0O.style.display='none';var $1q=document.createElement("div");$1q.style.height='10px';$1q.style.width='10px';if(this.cssOnly){$1q.className=this.prefixCssClass("_scroll_up");}else{$1q.style.backgroundRepeat="no-repeat";if(this.scrollUpUrl){$1q.style.backgroundImage="url('"+this.scrollUpUrl+"')";};$1q.className=this.prefixCssClass("scroll_up");};$0O.appendChild($1q);this.nav.scrollLayer.appendChild($0O);this.nav.scrollUp.push($0O);var $0P=document.createElement("div");$0P.style.position='absolute';$0P.style.top='0px';$0P.style.left=($0M+2+i*$V+$V/2)+"px";$0P.style.display='none';var $1q=document.createElement("div");$1q.style.height='10px';$1q.style.width='10px';if(this.cssOnly){$1q.className=this.prefixCssClass("_scroll_down");}else{$1q.style.backgroundRepeat="no-repeat";if(this.scrollDownUrl){$1q.style.backgroundImage="url('"+this.scrollDownUrl+"')";};$1q.className=this.prefixCssClass("scroll_down");};$0P.appendChild($1q);this.nav.scrollLayer.appendChild($0P);this.nav.scrollDown.push($0P);}};var cl=$0L.length;if(this.cssOnly||this.separateEventsTable){var $0X=this.nav.events;while($0X&&$0X.rows&&$0X.rows.length>0&&$1G){if(!this.fasterDispose)DayPilot.pu($0X.rows[0]);$0X.deleteRow(0);};var r=($1G)?$0X.insertRow(-1):$0X.rows[0];for(var j=0;j<cl;j++){var c=($1G)?r.insertCell(-1):r.cells[j];if($1G){c.style.padding='0px';c.style.border='0px none';c.style.height='1px';c.style.overflow='visible';if(!$b.rtl){c.style.textAlign='left';};var $07=document.createElement("div");$07.style.marginRight=$b.columnMarginRight+"px";$07.style.position='relative';$07.style.height='1px';if(!this.cssOnly){$07.style.fontSize='1px';$07.style.lineHeight='1.2';};$07.style.marginTop='-1px';c.appendChild($07);}}};for(var i=0;i<$1W;i++){var r=($1G)?$1E.insertRow(-1):$1E.rows[i];if($1G){r.style.MozUserSelect='none';r.style.KhtmlUserSelect='none';r.style.WebkitUserSelect='none';};for(var j=0;j<cl;j++){var $1x=this.columnsBottom[j];var c=($1G)?r.insertCell(-1):r.cells[j];c.start=$1x.Start.addTime(i*$0q).addHours(this.visibleStart());c.end=c.start.addTime($0q);c.resource=$1x.Value;var $1X=$b.getProperties(j,i);if($1G){c.root=this;c.style.padding='0px';c.style.border='0px none';c.style.verticalAlign='top';c.style.height=$b.cellHeight+'px';c.style.overflow='hidden';c.setAttribute("unselectable","on");if(!this.cssOnly){var $1Y=document.createElement("div");$1Y.style.height=($b.cellHeight-1)+"px";$1Y.style.width='100%';$1Y.style.overflow='hidden';$1Y.setAttribute("unselectable","on");c.appendChild($1Y);var $07=document.createElement("div");$07.setAttribute("unselectable","on");$07.style.fontSize='1px';$07.style.height='0px';c.appendChild($07);if((!$b.rtl&&j!==cl-1)||$b.rtl){c.style.borderRight='1px solid '+$b.cellBorderColor;};var $1Z=(c.end.getMinutes()+c.end.getSeconds()+c.end.getMilliseconds())>0;if($1Z){if($b.hourHalfBorderColor!==''){$07.style.borderBottom='1px solid '+$b.hourHalfBorderColor;};$07.className=$b.prefixCssClass("hourhalfcellborder");}else{if($b.hourBorderColor!==''){$07.style.borderBottom='1px solid '+$b.hourBorderColor;};$07.className=$b.prefixCssClass("hourcellborder");}}else{var $1Y=document.createElement("div");$1Y.className=$b.prefixCssClass("_cell");$1Y.style.position="relative";$1Y.style.height=($b.cellHeight)+"px";$1Y.style.overflow='hidden';$1Y.setAttribute("unselectable","on");var $X=document.createElement("div");$X.className=$b.prefixCssClass("_cell_inner");$1Y.appendChild($X);c.appendChild($1Y);}};c.onmousedown=this.onCellMousedown;c.onmousemove=this.mousemove;c.onmouseout=this.cellMouseOut;c.onmouseup=function(){return false;};c.onclick=function(){return false;};c.ondblclick=function(){if($b.timeRangeDoubleClickHandling==='Disabled'){return;};var $0K=$b.getSelection();$b.timeRangeDoubleClickDispatch($0K.start,$0K.end,$0K.resource);};c.oncontextmenu=function(){if(!this.selected){$b.clearSelection();DayPilotCalendar.column=DayPilotCalendar.getColumn(this);DayPilotCalendar.selectedCells.push(this);DayPilotCalendar.firstSelected=this;DayPilotCalendar.topSelectedCell=this;DayPilotCalendar.bottomSelectedCell=this;$b.activateSelection();};if($b.contextMenuSelection){$b.contextMenuSelection.show($b.getSelection());};return false;};c.originalColor=$b.getColor(j,i);$1Y=c.firstChild;if(!this.cssOnly){c.className=$b.prefixCssClass("cellbackground");c.style.backgroundColor=c.originalColor;if($1X){if($1X.html){$1Y.innerHTML=$1X.html;};if($1X.css){c.className+=' '+$b.prefixCssClass($1X.css);};if($1X.image){c.style.backgroundImage="url('"+$1X.image+"')";};if($1X.repeat){c.style.backgroundRepeat=$1X.repeat;}}}else{if($1X){if($1X.html){$1Y.innerHTML=$1X.html;};if($1X.css){DayPilot.Util.addClass($1X.css);}}}}};$1E.onmouseup=this.mouseup;$1E.root=this;var scroll=$b.nav.scroll;$b.nav.scrollable.style.display='';};this.onMainMouseMove=function(ev){ev=ev||window.event;ev.insideMainD=true;if(window.event){window.event.srcElement.inside=true;};DayPilotCalendar.activeCalendar=this;var $20=$b.nav.scrollable;$b.coords=DayPilot.mo3($20,ev);var $h=DayPilot.mc(ev);var $1F=$b.crosshairType&&$b.crosshairType!="Disabled";var $21=$b.coords.x<$b.hourWidth;if(DayPilot.Global.moving||DayPilot.Global.resizing||DayPilotCalendar.selecting||$21){$b.crosshairHide();}else if($1F){$b.crosshair();};if(DayPilot.Global.resizing){if(!DayPilotCalendar.resizingShadow){DayPilotCalendar.resizingShadow=$b.createShadow(DayPilot.Global.resizing,false,$b.shadow);};var $22=DayPilot.Global.resizing.event.root.cellHeight;var $W=0;var $23=($h.y-DayPilotCalendar.originalMouse.y);if(DayPilot.Global.resizing.dpBorder==='bottom'){var $24=Math.floor(((DayPilotCalendar.originalHeight+DayPilotCalendar.originalTop+$23)+$22/2) / $22)*$22-DayPilotCalendar.originalTop+$W;if($24<$22)$24=$22;var $Y=DayPilot.Global.resizing.event.root.nav.main.clientHeight;if(DayPilotCalendar.originalTop+$24>$Y)$24=$Y-DayPilotCalendar.originalTop;DayPilotCalendar.resizingShadow.style.height=($24)+'px';}else if(DayPilot.Global.resizing.dpBorder==='top'){var $25=Math.floor(((DayPilotCalendar.originalTop+$23-$W)+$22/2) / $22)*$22+$W;if($25<$W){$25=$W;};if($25>DayPilotCalendar.originalTop+DayPilotCalendar.originalHeight-$22){$25=DayPilotCalendar.originalTop+DayPilotCalendar.originalHeight-$22;};var $24=DayPilotCalendar.originalHeight-($25-DayPilotCalendar.originalTop);if($24<$22){$24=$22;}else{DayPilotCalendar.resizingShadow.style.top=$25+'px';};DayPilotCalendar.resizingShadow.style.height=($24)+'px';}}else if(DayPilot.Global.moving){if(!DayPilotCalendar.movingShadow){var $26=3;if(DayPilot.distance($h,DayPilotCalendar.originalMouse)>$26){DayPilotCalendar.movingShadow=$b.createShadow(DayPilot.Global.moving,!$b.ie,$b.shadow);DayPilotCalendar.movingShadow.style.width=(DayPilotCalendar.movingShadow.parentNode.offsetWidth+1)+'px';}else{return;}};if(!$b.coords){return;};var $22=$b.cellHeight;var $W=0;var $0N=DayPilotCalendar.moveOffsetY;if(!$0N){$0N=$22/2;};if(this.moveBy=="Top"){$0N=0;};var $25=Math.floor((($b.coords.y-$0N-$W)+$22/2) / $22)*$22+$W;if($25<$W){$25=$W;};var $U=$b.nav.main;var $Y=$U.clientHeight;var $l=parseInt(DayPilotCalendar.movingShadow.style.height);if($25+$l>$Y){$25=$Y-$l;};DayPilotCalendar.movingShadow.style.top=$25+'px';var $V=$U.clientWidth/$U.rows[0].cells.length;var $s=Math.floor(($b.coords.x-$b.hourWidth)/$V);if($s<0){$s=0;};var $0X=$b.nav.events;if($s<$0X.rows[0].cells.length&&$s>=0&&DayPilotCalendar.movingShadow.column!==$s){DayPilotCalendar.movingShadow.column=$s;DayPilotCalendar.moveShadow($0X.rows[0].cells[$s]);}};if(DayPilotCalendar.drag){if(DayPilotCalendar.gShadow){document.body.removeChild(DayPilotCalendar.gShadow);};DayPilotCalendar.gShadow=null;if(!DayPilotCalendar.movingShadow&&$b.coords){var $i=$b.createShadow(DayPilotCalendar.drag,false,DayPilotCalendar.drag.shadowType);if($i){DayPilotCalendar.movingShadow=$i;var $27=new DayPilot.Date().getDatePart();var ev={'value':DayPilotCalendar.drag.id,'start':$27,'end':$27.addSeconds(DayPilotCalendar.drag.duration),'text':DayPilotCalendar.drag.text};var event=new DayPilot.Event(ev);event.calendar=$b;event.root=$b;event.external=true;DayPilot.Global.moving={};DayPilot.Global.moving.event=event;DayPilot.Global.moving.helper={};}};ev.cancelBubble=true;}};this.table={};this.table.getCellCoords=function(){var $E={};$E.x=0;$E.y=0;var $U=$b.nav.main;var $28=$b.coords.x-$b.hourWidth;var i=0;var $1x=this.col($U,i);while($1x&&$28>$1x.left){i+=1;$1x=this.col($U,i);};$E.x=i-1;var $W=0;var $1C=Math.floor(($b.coords.y-$W)/$b.cellHeight);$E.y=$1C;return $E;};this.table.col=function($1E,x){var $E={};$E.left=0;$E.width=0;var $c=$1E.rows[0].cells[x];if(!$c){return null;};var t=DayPilot.abs($1E);var c=DayPilot.abs($c);$E.left=c.x-t.x;$E.width=$c.offsetWidth;return $E;};this.crosshair=function(){this.crosshairHide();if(!this.elements.crosshair){this.elements.crosshair=[];};var $29=this.table.getCellCoords();if(!$29){return;};var $s=$29.x;var y=Math.floor($29.y/(60/ $b.cellDuration)*(60/$b.timeHeaderCellDuration));var $2a=document.createElement("div");$2a.style.position="absolute";$2a.style.left="0px";$2a.style.right="0px";$2a.style.top="0px";$2a.style.bottom="0px";$2a.style.opacity=.5;$2a.style.backgroundColor=this.crosshairColor;$2a.style.opacity=this.crosshairOpacity/100;$2a.style.filter="alpha(opacity="+this.crosshairOpacity+")";this.nav.hourTable.rows[y].cells[0].firstChild.appendChild($2a);this.elements.crosshair.push($2a);var $2b=document.createElement("div");$2b.style.position="absolute";$2b.style.left="0px";$2b.style.right="0px";$2b.style.top="0px";$2b.style.bottom="0px";$2b.style.opacity=.5;$2b.style.backgroundColor=this.crosshairColor;$2b.style.opacity=this.crosshairOpacity/100;$2b.style.filter="alpha(opacity="+this.crosshairOpacity+")";var $1C=this.nav.header.rows[this.headerLevels-1];if($1C.cells[$s]){$1C.cells[$s].firstChild.appendChild($2b);this.elements.crosshair.push($2b);};if(this.crosshairType=="Header"){return;};var $2c=this.nav.crosshair;var $W=0;var top=Math.floor((($b.coords.y-$W))/$b.cellHeight)*$b.cellHeight+$W;var $l=$b.cellHeight;var $2d=document.createElement("div");$2d.style.position="absolute";$2d.style.left="0px";$2d.style.right="0px";$2d.style.top=top+"px";$2d.style.height=$l+"px";$2d.style.backgroundColor=this.crosshairColor;$2d.style.opacity=this.crosshairOpacity/100;$2d.style.filter="alpha(opacity="+this.crosshairOpacity+")";$2d.onmousedown=this.onCrosshairMouseDown;$2c.appendChild($2d);this.elements.crosshair.push($2d);var $1x=this.table.col(this.nav.main,$s);$l=this.nav.main.clientHeight;if($1x){var $2e=document.createElement("div");$2e.style.position="absolute";$2e.style.left=$1x.left+"px";$2e.style.width=$1x.width+"px";$2e.style.top="0px";$2e.style.height=$l+"px";$2e.style.backgroundColor=this.crosshairColor;$2e.style.opacity=this.crosshairOpacity/100;$2e.style.filter="alpha(opacity="+this.crosshairOpacity+")";$2e.onmousedown=this.onCrosshairMouseDown;$2c.appendChild($2e);this.elements.crosshair.push($2e);}};this.onCrosshairMouseDown=function(ev){$b.crosshairHide();var $29=$b.table.getCellCoords();var $2f=0;var $c=$b.nav.main.rows[$29.y+$2f].cells[$29.x];$b.onCellMousedown.apply($c,[ev]);};this.crosshairHide=function(){if(!this.elements.crosshair||this.elements.crosshair.length==0){return;};for(var i=0;i<this.elements.crosshair.length;i++){var e=this.elements.crosshair[i];if(e&&e.parentNode){e.parentNode.removeChild(e);}};this.elements.crosshair=[];};this.findEventDiv=function(e){for(var i=0;i<this.elements.events.length;i++){var $07=this.elements.events[i];if($07.event==e){return $07;}};return null;};this.getProperties=function(x,y){if(!this.cellProperties){return null;};return this.cellProperties[x+"_"+y];};this.getColor=function(x,y){if(this.colors){if(this.dirtyColors){return this.colors[y+this.autoHiddenRows()][x];}else{return this.colors[this.autoHiddenRows()][x];}}else{var $c={};$c.resource=this.columnsBottom[x].Value;$c.start=new DayPilot.Date(this.columnsBottom[x].Start).addTime(y*this.cellDuration).addHours(this.autoHiddenHours());$c.backColor=this.isBusiness($c)?this.cellBackColor:this.cellBackColorNonBusiness;var $2g=this.beforeCellRender($c);if($2g){return $2g.backColor;}else{return this.cellBackColor;}}};this.isBusiness=function($c){if($c.start.dayOfWeek()===0||$c.start.dayOfWeek()===6){return false;};if(this.cellDuration<720){if($c.start.getHours()<this.businessBeginsHour||$c.start.getHours()>=this.businessEndsHour){return false;}else{return true;}};return true;};this.beforeCellRender=function($c){return $c;};this.disposeHeader=function(){var $1E=this.nav.header;if($1E&&$1E.rows){for(var y=0;y<$1E.rows.length;y++){var r=$1E.rows[y];for(var x=0;x<r.cells.length;x++){var c=r.cells[x];c.onclick=null;c.onmousemove=null;c.onmouseout=null;}}};if(!this.fasterDispose)DayPilot.pu($1E);};this.drawHeaderRow=function($18,$1G){var r=($1G)?this.nav.header.insertRow(-1):this.nav.header.rows[$18-1];var $0L=this.columns.getColumns($18);var $2h=$0L.length;for(var i=0;i<$2h;i++){var $v=$0L[i];var $2i=$v.getChildren?true:false;var $c=($1G)?r.insertCell(-1):r.cells[i];$c.data=$v;if($18===$b.headerLevels){}else{var $2j=1;if($2i){$2j=$v.getChildrenCount($b.headerLevels-$18+1);};$c.colSpan=$2j;};if($2i){$c.onclick=this.headerClickDispatch;$c.onmousemove=this.headerMouseMove;$c.onmouseout=this.headerMouseOut;if($v.ToolTip){$c.title=$v.ToolTip;}};$c.style.overflow='hidden';$c.style.padding='0px';$c.style.border='0px none';$c.style.height=(this.headerHeight)+"px";var $07=($1G)?document.createElement("div"):$c.firstChild;if($1G){$07.setAttribute("unselectable","on");$07.style.MozUserSelect='none';$07.style.KhtmlUserSelect='none';$07.style.WebkitUserSelect='none';$07.style.position='relative';$07.style.height=this.headerHeight+"px";if(!this.cssOnly){$07.className=$b.prefixCssClass('colheader');$07.style.cursor='default';$07.style.fontFamily=this.headerFontFamily;$07.style.fontSize=this.headerFontSize;$07.style.color=this.headerFontColor;$07.style.backgroundColor=$v.BackColor;$07.style.textAlign='center';var $q=document.createElement("div");$q.style.position='absolute';$q.style.left='0px';$q.style.right='0px';$q.style.top="0px";$q.style.bottom="0px";$q.style.padding="2px";$q.setAttribute("unselectable","on");if($18!==1){$q.style.borderTop='1px solid '+this.borderColor;};if($b.rtl){if(i===$2h-1){$q.style.borderLeft="1px solid "+$v.BackColor;}else{$q.style.borderLeft="1px solid "+this.borderColor;}}else{if(i===$2h-1){$a();}else{$q.style.borderRight="1px solid "+this.borderColor;}};if(this.headerClickHandling!=="Disabled"){$q.style.cursor='pointer';};$07.appendChild($q);}else{$07.className=$b.prefixCssClass('_colheader');var $X=document.createElement("div");$X.className=$b.prefixCssClass('_colheader_inner');$07.appendChild($X);};$c.appendChild($07);}else{$07.style.height=this.headerHeight+"px";};if($2i){$07.firstChild.innerHTML=$v.InnerHTML;}}};this.widthUnit=function(){if(this.width&&this.width.indexOf("px")!=-1){return "Pixel";};return "Percentage";};this.drawHeader=function(){if(!this.showHeader){return;};var $1g=this.nav.header;var $1G=true;var $0L=this.columns.getColumns($b.headerLevels,true);var $2h=$0L.length;if(this.headerCreated&&$1g&&$1g.rows&&$1g.rows.length>0){$1G=$1g.rows[$1g.rows.length-1].cells.length!==$2h;}while(this.headerCreated&&$1g&&$1g.rows&&$1g.rows.length>0&&$1G){if(!this.fasterDispose)DayPilot.pu($1g.rows[0]);$1g.deleteRow(0);};this.headerCreated=true;if(!$1G){var $1O=$b.nav.corner;if(!this.cssOnly){$1O.style.backgroundColor=$b.cornerBackColor;};if(!this.fasterDispose)DayPilot.pu($1O.firstChild);$1O.firstChild.innerHTML=$b.cornerHTML?$b.cornerHTML:'';};for(var i=0;i<$b.headerLevels;i++){this.drawHeaderRow(i+1,$1G);};if(!this.showAllDayEvents){return;};var r=($1G)?$1g.insertRow(-1):$1g.rows[$b.headerLevels];var w=100/$2h;for(var i=0;i<$2h;i++){var $v=$0L[i];var $c=($1G)?r.insertCell(-1):r.cells[i];$c.data=$v;$c.style.padding='0px';$c.style.border='0px none';$c.style.overflow='hidden';if(!this.cssOnly){$c.style.lineHeight='1.2';};var $07=($1G)?document.createElement("div"):$c.firstChild;if($1G){$07.setAttribute("unselectable","on");$07.style.MozUserSelect='none';$07.style.KhtmlUserSelect='none';$07.style.WebkitUserSelect='none';$07.style.overflow='hidden';$07.style.position="relative";$07.style.height=this.allDayHeaderHeight+"px";if(!this.cssOnly){$07.className=this.prefixCssClass("alldayheader");$07.style.textAlign='center';$07.style.backgroundColor=$v.BackColor;$07.style.cursor='default';var $q=document.createElement("div");$q.style.position="absolute";$q.style.left='0px';$q.style.right='0px';$q.style.top="0px";$q.style.bottom="0px";$q.setAttribute("unselectable","on");$q.style.borderTop='1px solid '+this.borderColor;$07.appendChild($q);if($b.rtl){if(i===$2h-1){$q.style.borderLeft="1px solid "+$v.BackColor;}else{$q.style.borderLeft="1px solid "+this.borderColor;}}else{if(i===$2h-1){$a();}else{$q.style.borderRight="1px solid "+this.borderColor;}}}else{$07.className=this.prefixCssClass("_alldayheader");var $X=document.createElement("div");$X.className=this.prefixCssClass("_alldayheader_inner");$07.appendChild($X);};$c.appendChild($07);};$07.style.height=this.allDayHeaderHeight+"px";}};this.loadingStart=function(){if(this.loadingLabelVisible){this.nav.loading.innerHTML=this.loadingLabelText;this.nav.loading.style.top=(this.totalHeaderHeight()+5)+"px";this.nav.loading.style.display='';}};this.loadingStop=function($2k){if(this.callbackTimeout){window.clearTimeout(this.callbackTimeout);};this.nav.loading.style.display='none';};this.enableScrolling=function(){var $2l=this.nav.scroll;if(!this.initScrollPos)return;$2l.root=this;$2l.onscroll=this.scroll;if($2l.scrollTop===0){$2l.scrollTop=this.initScrollPos-this.autoHiddenPixels();}else{this.scroll();}};this.callbackError=function($E,$F){alert("Error!\r\nResult: "+$E+"\r\nContext:"+$F);};this.fixScrollHeader=function(){var $2m=this.scrollbarVisible();var $2n=!!this.nav.cornerRight;if($2m!=$2n){if($2m){this.createCornerRightTd();}else{if(this.nav.fullHeader&&this.nav.fullHeader.rows[0].cells.length==3){var c=this.nav.fullHeader.rows[0].cells[2];if(c.parentNode){c.parentNode.removeChild(c);}};this.nav.cornerRight=null;}};var d=this.nav.cornerRight;if(!d){return;};var w=DayPilot.sw(this.nav.scroll);if(!this.cssOnly){if(w>=3){d.style.width=(w-3)+'px';}}else{if(d){d.style.width=(w)+'px';}};return w;};this.startAutoRefresh=function($2o){if($2o){this.autoRefreshEnabled=true;};if(!this.autoRefreshEnabled){return;};if(this.autoRefreshCount>=this.autoRefreshMaxCount){return;};this.stopAutoRefresh();var $2p=this.autoRefreshInterval;if(!$2p||$2p<10){throw "The minimum autoRefreshInterval is 10 seconds";};this.autoRefreshTimeout=window.setTimeout(function(){$b.doRefresh();},this.autoRefreshInterval*1000);};this.stopAutoRefresh=function(){if(this.autoRefreshTimeout){window.clearTimeout(this.autoRefreshTimeout);}};this.doRefresh=function(){if(!DayPilot.Global.resizing&&!DayPilot.Global.moving&&!DayPilotCalendar.drag&&!DayPilotCalendar.selecting){this.autoRefreshCount++;this.commandCallBack(this.autoRefreshCommand);};if(this.autoRefreshCount<this.autoRefreshMaxCount){this.autoRefreshTimeout=window.setTimeout(function(){$b.doRefresh();},this.autoRefreshInterval*1000);}};this.resize=function(){if($b.heightSpec==="Parent100Pct"){$b.setHeight(parseInt($b.nav.top.clientHeight,10));};$b.updateHeight();$b.updateScrollLabels();};this.registerGlobalHandlers=function(){if(!DayPilotCalendar.globalHandlers){DayPilotCalendar.globalHandlers=true;DayPilot.re(document,'mousemove',DayPilotCalendar.gMouseMove);DayPilot.re(document,'mouseup',DayPilotCalendar.gMouseUp);DayPilot.re(window,'unload',DayPilotCalendar.gUnload);};DayPilot.re(window,'resize',this.resize);};this.onEventMouseDown=function(ev){ev=ev||window.event;var $0G=ev.which||ev.button;if(typeof(DayPilotBubble)!=='undefined'){DayPilotBubble.hideActive();};if((this.style.cursor==='n-resize'||this.style.cursor==='s-resize')&&$0G===1){DayPilot.Global.resizing=this;DayPilotCalendar.originalMouse=DayPilot.mc(ev);DayPilotCalendar.originalHeight=this.offsetHeight;DayPilotCalendar.originalTop=this.offsetTop;$b.nav.top.style.cursor=this.style.cursor;}else if(this.style.cursor==='move'&&$0G===1){DayPilot.Global.moving=this;DayPilot.Global.moving.event=this.event;var $2q=DayPilot.Global.moving.helper={};$2q.oldColumn=$b.columnsBottom[this.data.DayIndex].Value;DayPilotCalendar.originalMouse=DayPilot.mc(ev);DayPilotCalendar.originalTop=this.offsetTop;var $0N=DayPilot.mo3(this,ev);if($0N){DayPilotCalendar.moveOffsetY=$0N.y;}else{DayPilotCalendar.moveOffsetY=0;};$b.nav.top.style.cursor=this.style.cursor;}else{};return false;};this.onEventMouseMove=function(ev){var $2r=5;var $2s=Math.max($b.durationBarWidth,10);var w=5;var $1g=($b.moveBy==='Top');if(typeof(DayPilotCalendar)==='undefined'){return;};var $0N=DayPilot.mo3(this,ev);if(!$0N){return;};var $07=this;if(!$07.active){if($b.cssOnly){DayPilot.Util.addClass($07,$b.prefixCssClass("_event_hover"));};DayPilot.Areas.showAreas($07,this.event);};if(DayPilot.Global.resizing||DayPilot.Global.moving){return;};var $2t=this.isFirst;var $2u=this.isLast;if($b.moveBy=="Disabled"||$b.moveBy=="None"){return;};if(!$1g&&$0N.x<=$2s&&this.event.movingAllowed()){if($2t){this.style.cursor='move';}else{this.style.cursor='not-allowed';}}else if(!$1g&&$0N.y<=$2r&&this.event.resizingAllowed()){if($2t){this.style.cursor="n-resize";this.dpBorder='top';}else{this.style.cursor='not-allowed';}}else if($1g&&$0N.y<=$2s&&this.event.movingAllowed()){this.style.cursor="move";}else if(this.offsetHeight-$0N.y<=$2r&&this.event.resizingAllowed()){if($2u){this.style.cursor="s-resize";this.dpBorder='bottom';}else{this.style.cursor='not-allowed';}}else if(!DayPilot.Global.resizing&&!DayPilot.Global.moving){if(this.event.clickingAllowed())this.style.cursor='pointer';else this.style.cursor='default';};if(typeof(DayPilotBubble)!=='undefined'&&$b.bubble&&$b.eventHoverHandling!=='Disabled'){if(this.style.cursor==='default'||this.style.cursor==='pointer'){$b.bubble.showEvent(this.event);}else{DayPilotBubble.hideActive();}}};this.onEventMouseOut=function(ev){if($b.cssOnly){DayPilot.Util.removeClass(this,$b.prefixCssClass("_event_hover"));};if($b.bubble){$b.bubble.hideOnMouseOut();};DayPilot.Areas.hideAreas(this,ev);};this.loadEvents=function($0X){if(!$0X){$0X=this.events;};this.allDay={};this.allDay.events=[];this.allDay.lines=[];var length=$0X.length;var $p=this.duration(true);this.cache.pixels={};var $2v=[];this.scrollLabels=[];this.minStart=10000;this.maxEnd=0;if(!$0X){return;};for(var i=0;i<length;i++){var e=$0X[i];e.Start=new DayPilot.Date(e.Start);e.End=new DayPilot.Date(e.End);};var $2w=this.viewType==='Resources';var $2x=this.startDate;var $2y=this.startDate.addDays(this.days);for(var i=0;i<this.columnsBottom.length;i++){var scroll={};scroll.minEnd=1000000;scroll.maxStart=-1;this.scrollLabels.push(scroll);var $1x=this.columnsBottom[i];$1x.events=[];$1x.lines=[];$1x.blocks=[];var $0p=new DayPilot.Date($1x.Start).addHours(this.visibleStart(true));var $2z=$0p.getTime();var $2A=$0p.addTime($p);var $2B=$2A.getTime();if($2w){$2x=$0p.getDatePart();$2y=$2A.getDatePart();};for(var j=0;j<length;j++){if($2v[j]){continue;};var e=$0X[j];var $0i=e.Start;var end=e.End;var $2C=$0i.getTime();var $2D=end.getTime();if($2D<$2C){continue;};if(e.AllDay){var $2E=false;if($b.allDayEnd==='Date'){$2E=!($2D<$2x.getTime()||$2C>=$2y.getTime());}else{$2E=!($2D<=$2x.getTime()||$2C>=$2y.getTime());};if($2w){$2E=$2E&&(e.Resource===$1x.Value||$1x.Value==="*");};if($2E){var ep={};ep.Text=e.Text;ep.Value=e.Value;ep.ToolTip=e.ToolTip?e.ToolTip:e.Text;ep.Start=$0i;ep.End=end;ep.DayIndex=i;ep.AllDay=e.AllDay;ep.PartStart=$2x.getTime()<$2C?ep.Start:$2x;ep.PartEnd=$2y.getTime()>$2D?ep.End:$2y;ep.BackgroundColor=e.BackColor?e.BackColor:this.eventBackColor;ep.InnerHTML=e.InnerHTML?e.InnerHTML:e.Text;ep.Tag=e.Tag;ep.BackgroundImage=e.BackgroundImage;ep.BackgroundRepeat=e.BackgroundRepeat;ep.StaticBubbleHTML=e.StaticBubbleHTML;ep.Recurrent=e.Recurrent;ep.RecurrentMasterId=e.RecurrentMasterId;ep.RightClickEnabled=this.rightClickHandling!=='Disabled'&&!e.RightClickDisabled;ep.ClickEnabled=this.eventClickHandling!=='Disabled'&&!e.ClickDisabled;ep.DoubleClickEnabled=this.eventDoubleClickHandling!=='Disabled'&&!e.DoubleClickDisabled;ep.ContextMenu=e.ContextMenu;ep.CssClass=e.CssClass;ep.Areas=e.Areas;ep.ColStart=DayPilot.Date.daysDiff(this.startDate.d,ep.PartStart.d);ep.ColWidth=DayPilot.Date.daysSpan(ep.PartStart.d,ep.PartEnd.d)+1;if($2w){ep.ColStart=i;ep.ColWidth=1;};this.allDay.events.push(ep);$2v[j]=true;if($2w&&(ep.PartStart.getTime()!==$2C||ep.PartEnd.getTime()!==$2D)){$2v[j]=false;}};continue;};var $2E=false;if($2w){$2E=($1x.Value===e.Resource)&&!($2D<=$2z||$2C>=$2B);}else{$2E=!($2D<=$2z||$2C>=$2B)||($2D==$2C&&$2C==$2z);};if($2E){var ep={};ep.Text=e.Text;ep.Value=e.Value;ep.ToolTip=e.ToolTip?e.ToolTip:e.Text;ep.Start=$0i;ep.End=end;ep.DayIndex=i;ep.AllDay=e.AllDay;ep.PartStart=$2z<$2C?ep.Start:$0p;ep.PartEnd=$2B>$2D?ep.End:$2A;ep.InnerHTML=e.InnerHTML?e.InnerHTML:e.Text;ep.Tag=e.Tag;ep.BackgroundImage=e.BackgroundImage;ep.BackgroundRepeat=e.BackgroundRepeat;ep.StaticBubbleHTML=e.StaticBubbleHTML;ep.Sort=e.Sort;ep.DurationBarImageUrl=e.DurationBarImageUrl;ep.Header=e.Header;if(this.cssOnly){ep.BackgroundColor=e.BackColor;ep.BarColor=e.BarColor;ep.BorderColor=e.BorderColor;ep.FontColor=e.FontColor;}else{ep.BackgroundColor=e.BackColor?e.BackColor:this.eventBackColor;ep.BarColor=e.BarColor?e.BarColor:this.durationBarColor;ep.BorderColor=e.BorderColor?e.BorderColor:this.eventBorderColor;ep.FontColor=e.FontColor?e.FontColor:this.eventFontColor;};ep.Recurrent=e.Recurrent;ep.RecurrentMasterId=e.RecurrentMasterId;ep.MoveEnabled=this.eventMoveHandling!=='Disabled'&&!e.MoveDisabled;ep.ResizeEnabled=this.eventResizeHandling!=='Disabled'&&!e.ResizeDisabled;ep.RightClickEnabled=this.rightClickHandling!=='Disabled'&&!e.RightClickDisabled;ep.ClickEnabled=this.eventClickHandling!=='Disabled'&&!e.ClickDisabled;ep.DoubleClickEnabled=this.eventDoubleClickHandling!=='Disabled'&&!e.DoubleClickDisabled;ep.DeleteEnabled=this.eventDeleteHandling!=='Disabled'&&!e.DeleteDisabled;ep.ContextMenu=e.ContextMenu;ep.CssClass=e.CssClass;ep.Areas=e.Areas;var $2F=this.getPixels(ep.PartStart,$1x.Start);var $2G=this.getPixels(ep.PartEnd,$1x.Start);var top=$2F.top;var $14=$2G.top;if(top===$14&&($2F.cut||$2G.cut)){continue;};ep.Box=this.useBox($2D-$2C);var $W=0;if(ep.Box){var $2H=$2G.boxBottom;ep.Top=Math.floor(top/this.cellHeight)*this.cellHeight+$W;ep.Height=Math.max(Math.ceil($2H/this.cellHeight)*this.cellHeight-ep.Top,this.cellHeight-1);ep.BarTop=Math.max(top-ep.Top-1,0);ep.BarHeight=Math.max($14-top-2,1);}else{ep.Top=top+$W;ep.Height=Math.max($14-top,0);ep.BarTop=0;ep.BarHeight=Math.max($14-top-2,1);};var $0i=ep.Top;var end=ep.Top+ep.Height;if($0i>scroll.maxStart){scroll.maxStart=$0i;};if(end<scroll.minEnd){scroll.minEnd=end;};if($0i<this.minStart){this.minStart=$0i;};if(end>this.maxEnd){this.maxEnd=end;};$1x.events.push(ep);if(ep.PartStart.getTime()===$2C&&ep.PartEnd.getTime()===$2D){$2v[j]=true;}}}};for(var i=0;i<this.columnsBottom.length;i++){var $1x=this.columnsBottom[i];$1x.events.sort(this.eventComparer);for(var j=0;j<$1x.events.length;j++){var e=$1x.events[j];$1x.putIntoBlock(e);};for(var j=0;j<$1x.blocks.length;j++){var $1c=$1x.blocks[j];$1c.events.sort(this.eventComparerCustom);for(var k=0;k<$1c.events.length;k++){var e=$1c.events[k];$1c.putIntoLine(e);}}};this.allDay.events.sort(this.eventComparerCustom);this.allDay.putIntoLine=function(ep){var $1e=this;for(var i=0;i<this.lines.length;i++){var $1f=this.lines[i];if($1f.isFree(ep.ColStart,ep.ColWidth)){$1f.push(ep);return i;}};var $1f=[];$1f.isFree=function($0i,$1d){var end=$0i+$1d-1;var $Y=this.length;for(var i=0;i<$Y;i++){var e=this[i];if(!(end<e.ColStart||$0i>e.ColStart+e.ColWidth-1)){return false;}};return true;};$1f.push(ep);this.lines.push($1f);return this.lines.length-1;};for(var i=0;i<this.allDay.events.length;i++){var e=this.allDay.events[i];this.allDay.putIntoLine(e);};var $2I=Math.max(this.allDay.lines.length,1);this.allDayHeaderHeight=$2I*(this.allDayEventHeight+2)+2;};this.eventComparer=function(a,b){if(!a||!b||!a.Start||!b.Start){return 0;};var $2J=a.Start.getTime()-b.Start.getTime();if($2J!==0){return $2J;};var $2K=b.End.getTime()-a.End.getTime();return $2K;};this.eventComparerCustom=function(a,b){if(!a||!b){return 0;};if(!a.Sort||!b.Sort||a.Sort.length===0||b.Sort.length===0){return $b.eventComparer(a,b);};var $E=0;var i=0;while($E===0&&a.Sort[i]&&b.Sort[i]){if(a.Sort[i]===b.Sort[i]){$E=0;}else{$E=$b.stringComparer(a.Sort[i],b.Sort[i],$b.sortDirections[i]);};i++;};return $E;};this.stringComparer=function(a,b,$2L){var $2M=($2L!=="desc");var $2N=$2M?-1:1;var $2O=-$2N;if(!a&&!b){return 0;};if(!b){return $2O;};if(!a){return $2N;};var ar=[];ar[0]=a;ar[1]=b;ar.sort();return a===ar[0]?$2N:$2O;};this.debug=function($2k,$2P){if(!this.debuggingEnabled){return;};if(!$b.debugMessages){$b.debugMessages=[];};$b.debugMessages.push($2k);if(typeof console!=='undefined'){console.log($2k);}};this.useBox=function($2Q){if(this.useEventBoxes==='Always'){return true;};if(this.useEventBoxes==='Never'){return false;};return $2Q<this.cellDuration*60*1000;};this.getPixels=function($0x,$0i){if(!$0i)$0i=this.startDate;var $2C=$0i.getTime();var $2R=$0x.getTime();var $2S=this.cache.pixels[$2R+"_"+$2C];if($2S){return $2S;};$2C=$0i.addHours(this.visibleStart(true)).getTime();var $2T=this.cellDuration*60*1000;var $2U=$2R-$2C;var $2V=$2U%$2T;var $2W=$2U-$2V;var $2X=$2W+$2T;if($2V===0){$2X=$2W;};var $E={};$E.cut=false;$E.top=this.ticksToPixels($2U);$E.boxTop=this.ticksToPixels($2W);$E.boxBottom=this.ticksToPixels($2X);this.cache.pixels[$2R+"_"+$2C]=$E;return $E;};this.ticksToPixels=function($2R){return Math.floor((this.cellHeight*$2R)/(1000*60*this.cellDuration));};this.prepareVariables=function(){this.startDate=new DayPilot.Date(this.startDate);this.allDayHeaderHeight=this.allDayEventHeight+4;};this.updateHeaderHeight=function(){if(this.nav.corner){this.nav.corner.style.height=this.totalHeaderHeight()+"px";};if(this.nav.cornerRight){this.nav.cornerRight.style.height=this.totalHeaderHeight()+"px";};if(this.nav.mid){this.nav.mid.style.height=this.totalHeaderHeight()+"px";};if(this.showAllDayEvents){var $1C=this.nav.header.rows[this.nav.header.rows.length-1];for(var i=0;i<$1C.cells.length;i++){var $s=$1C.cells[i];$s.firstChild.style.height=this.allDayHeaderHeight+"px";}}};this.updateHeight=function(){var sh=this.getScrollableHeight();if(this.nav.scroll&&sh>0){this.nav.scroll.style.height=sh+"px";this.scrollHeight=$b.nav.scroll.clientHeight;}};this.setHeight=function($1t){if(this.heightSpec!=="Parent100Pct"){this.heightSpec="Fixed";};if(this.cssOnly){this.height=$1t-(this.totalHeaderHeight());}else{this.height=$1t-(this.totalHeaderHeight()+3);};this.updateHeight();};this.loadFromServer=function(){return(typeof this.events==='undefined')||!this.events;};this.initShort=function(){this.prepareVariables();this.prepareColumns();this.drawTop();this.drawHeader();this.autoHeaderHeight();this.drawMain();this.fixScrollHeader();this.enableScrolling();this.registerGlobalHandlers();DayPilotCalendar.register(this);this.resize();this.startAutoRefresh();this.callBack2('Init');};this.Init=function(){var $2Y=this.loadFromServer();if($2Y){this.initShort();return;};this.prepareVariables();this.prepareColumns();if(this.events){this.loadEvents();};this.drawTop();this.drawHeader();this.autoHeaderHeight();this.drawMain();this.show();this.fixScrollHeader();this.enableScrolling();this.registerGlobalHandlers();DayPilotCalendar.register(this);if(this.events){this.updateHeaderHeight();this.drawEvents();this.drawEventsAllDay();};this.resize();if(this.messageHTML){this.message(this.messageHTML,5000);};this.fireAfterRenderDetached(null,false);this.startAutoRefresh();};};DayPilotCalendar.Cell=function($0i,end,$s){this.start=$0i;this.end=end;this.column=function(){};};DayPilotCalendar.Column=function($2Z,name,$0x){this.value=$2Z;this.name=name;this.date=new DayPilot.Date($0x);};DayPilotCalendar.Event=function($f,$b){$f.event=this;var ev=this;this.div=$f;this.root=$b;this.calendar=$b;this.value=function(){return $f.data.Value;};this.id=function(){return $f.data.Value;};this.text=function(){return $f.data.Text;};this.start=function(){return $f.data.Start;};this.end=function(){return $f.data.End;};this.partStart=function(){return $f.data.PartStart;};this.partEnd=function(){return $f.data.PartEnd;};this.recurrent=function(){return $f.data.Recurrent;};this.recurrentMasterId=function(){return $f.data.RecurrentMasterId;};this.duration=function(){return DayPilot.Date.diff(this.end().d,this.start().d);};this.data={};this.data.areas=$f.data.Areas;this.column=function(){return this.resource();};this.resource=function(){return this.root.columnsBottom[$f.data.DayIndex].Value;};this.innerHTML=function(){var c=$f.getElementsByTagName("DIV");return c[c.length-1].innerHTML;};this.staticBubbleHTML=function(){return $f.data.StaticBubbleHTML;};this.tag=function($30){var $31=$f.data.Tag;if(!$31){return null;};if(!$30){return $f.data.Tag;};var $32=$b.tagFields;var $33=-1;for(var i=0;i<$32.length;i++){if($30===$32[i])$33=i;};if($33===-1){throw "Field name not found.";};return $31[$33];};this.movingAllowed=function(){return $f.data.MoveEnabled&&$b.eventMoveHandling!=="Disabled";};this.resizingAllowed=function(){return $f.data.ResizeEnabled&&$b.eventResizeHandling!=="Disabled";};this.clickingAllowed=function(){return $f.data.ClickEnabled&&$b.eventClickHandling!=="Disabled";};this.rightClickingAllowed=function(){return $f.data.RightClickEnabled&&$b.rightClickHandling!=="Disabled";};this.isSelected=function(){return $b.selectedEvent()===this;};this.isAllDay=function(){return $f.data.AllDay;};this.client={};this.client.contextMenu=function($34){if(typeof $34==='undefined'){if(ev.oContextMenu){return ev.oContextMenu;};return($f.data.ContextMenu)?eval($f.data.ContextMenu):null;}else{ev.oContextMenu=$34;}};this.client.innerHTML=function($34){if(typeof $34==='undefined'){return typeof e.data.InnerHTML!=="undefined"?e.data.InnerHTML:e.data.Text;}else{e.data.InnerHTML=$34;}};this.toJSON=function($J){var $0h={};$0h.value=this.value();$0h.text=this.text();$0h.start=this.start();$0h.end=this.end();$0h.resource=this.resource();$0h.isAllDay=this.isAllDay()?true:false;$0h.isSelected=this.isSelected();$0h.recurrentMasterId=this.recurrentMasterId();$0h.tag={};if($b.tagFields){var $32=$b.tagFields;for(var i=0;i<$32.length;i++){$0h.tag[$32[i]]=this.tag($32[i]);}};return $0h;};};DayPilot.CalendarVisible.dragStart=DayPilotCalendar.dragStart;DayPilot.CalendarVisible.Calendar=DayPilotCalendar.Calendar;DayPilot.Calendar=DayPilotCalendar.Calendar;if(typeof jQuery!=='undefined'){(function($){$.fn.daypilotCalendar=function($35){var $36=null;var j=this.each(function(){if(this.daypilot){return;};var $37=new DayPilot.Calendar(this.id);this.daypilot=$37;for(name in $35){$37[name]=$35[name];};$37.Init();if(!$36){$36=$37;}});if(this.length===1){return $36;}else{return j;}};})(jQuery);};if(typeof Sys!=='undefined'&&Sys.Application&&Sys.Application.notifyScriptLoaded){Sys.Application.notifyScriptLoaded();}})();
Can you please help?
I have this version from DayPilot running: 7.1.2739.1
Thanks
kind regards
Markus