﻿Type.registerNamespace("Telerik.Web.UI");
(function(d,b){var f;
var e=60000;
var a=e*60;
var g=a*24;
b.RecurrenceState=function(){};
b.RecurrenceState.prototype={NotRecurring:0,Master:1,Occurrence:2,Exception:3};
b.RecurrenceState.registerEnum("Telerik.Web.UI.RecurrenceState");
b.SchedulerAppointment=function(j,h){this._attributes=new b.SchedulerAttributeCollection(this);
this._visible=true;
this._domElement=null;
this._domElements=[];
this._recurrenceState=b.RecurrenceState.NotRecurring;
this._recurrenceRule="";
this._backColor=null;
this._borderStyle="solid";
this._borderColor=null;
this._borderWidth=null;
if(!j){return;
}this._id=j.id;
this._subject=j.subject;
this._description=j.description;
this._start=new Date(Date.parse(j.start));
this._end=new Date(Date.parse(j.end));
this._toolTip=j.toolTip;
this._internalID=j.internalID;
this._visible=j.visible;
this._recurrenceState=j.recurrenceState;
this._recurrenceParentID=j.recurrenceParentID;
this._contextMenuID=j.contextMenuID;
this._serializedResources=j.resources;
this._resources=null;
if(j.domElements){for(var l=0,k=j.domElements.length;
l<k;
l++){this._domElements[l]=$get(j.domElements[l]);
}}this._column=null;
this._allowEdit=null;
if(typeof(j.allowEdit)!="undefined"){this._allowEdit=j.allowEdit;
}this._allowDelete=null;
if(typeof(j.allowDelete)!="undefined"){this._allowDelete=j.allowDelete;
}this._owner=h;
this._oldZIndex=null;
this._originalParent=null;
if(typeof(j.attributes)!="undefined"){this._attributes._load(j.attributes);
}};
b.SchedulerAppointment.prototype={get_id:function(){return this._id;
},get_internalID:function(){return this._internalID;
},get_subject:function(){return this._subject;
},set_subject:function(h){this._subject=h;
},get_description:function(){return this._description;
},set_description:function(h){this._description=h;
},get_start:function(){return this._start;
},set_start:function(h){this._start=h;
},get_end:function(){return this._end;
},set_end:function(h){this._end=h;
},get_duration:function(){return this._end-this._start;
},get_durationInMinutes:function(){return Math.round(this.get_duration()/e);
},get_toolTip:function(){return this._toolTip;
},set_toolTip:function(h){this._toolTip=h;
if(this._domElements&&this._domElements.length){d.each(this._domElements,function(){this.title=h;
});
}},get_cssClass:function(){return this._cssClass||"";
},set_cssClass:function(h){this._cssClass=h;
if(this._domElements&&this._domElements.length){d.each(this._domElements,function(){this.className="rsApt";
d(this).addClass(h);
});
}},set_backColor:function(h){this._backColor=h;
var i=d(this.get_element());
var j=i;
if(this._getStyleMode()==b.AppointmentStyleMode.Default){j=d(".rsAptMid, .rsAptContent, .rsAptIn",i);
i.addClass("rsAptColor");
}else{i.addClass("rsAptSimple");
}j.css("background-color",h);
},get_backColor:function(){return this._backColor;
},set_borderStyle:function(h){this._borderStyle=h;
this._renderBorder();
},get_borderStyle:function(){return this._borderStyle;
},set_borderColor:function(h){this._borderColor=h;
this._renderBorder();
},get_borderColor:function(){return this._borderColor;
},set_borderWidth:function(h){if(typeof(h)=="number"){h+="px";
}this._borderWidth=h;
this._renderBorder();
},get_borderWidth:function(){return this._borderWidth;
},get_visible:function(){return this._visible;
},get_radScheduler:function(){return this._owner;
},get_owner:function(){return this._owner;
},_setOwner:function(h){this._owner=h;
},get_allowEdit:function(){return this._allowEdit;
},set_allowEdit:function(h){this._allowEdit=h;
},get_allowDelete:function(){return this._allowDelete;
},set_allowDelete:function(h){this._allowDelete=h;
},get_element:function(){if(!this._domElement&&this._domElements&&this._domElements.length>0){this._domElement=this._domElements[0];
}return this._domElement;
},get_elements:function(){return this._domElements;
},get_timeSlot:function(){var h=this.get_owner();
if(!h){return null;
}return h.get_activeModel().getTimeSlotForAppointment(this);
},get_attributes:function(){return this._attributes;
},get_recurrenceState:function(){return this._recurrenceState;
},set_recurrenceState:function(h){this._recurrenceState=h;
},get_recurrenceRule:function(){return this._recurrenceRule;
},set_recurrenceRule:function(h){this._recurrenceRule=h;
},get_recurrenceParentID:function(){return this._recurrenceParentID;
},get_resources:function(){if(!this._resources){this._resources=new b.SchedulerResourceCollection();
for(var k in this._serializedResources){var h=this._serializedResources[k];
if(h.text){this._resources.add(new b.SchedulerResource(h));
}else{var j=this.get_owner().get_resources().getResourcesByType(h.type);
var i=this._resources;
j.forEach(function(l){if(l.get_key()==h.key){i.add(l);
}});
}}}return this._resources;
},edit:function(){var h=this.get_owner();
if(h){h.editAppointment(this);
}},remove:function(){var h=this.get_owner();
if(h){h.deleteAppointment(this);
}},compare:function(h){if(this.get_start().getTime()<h.get_start().getTime()){return -1;
}if(this.get_start().getTime()>h.get_start().getTime()){return 1;
}if(this.get_end().getTime()>h.get_end().getTime()){return -1;
}return 0;
},_isAllDay:function(){return this.get_duration()%g==0;
},_isInRange:function(l,i){var k=this.get_start();
var j=this.get_end();
var h=k<i&&j>l;
if(this.get_duration()==0){return h||k.getTime()==l.getTime();
}return h;
},_rangeIsInsideAppointment:function(i,h){return this.get_start()<=i&&this.get_end()>=h;
},_getTimeSlot:function(){if(!this._timeSlot){if(!this.get_owner()){return null;
}this._timeSlot=this.get_owner().get_activeModel().getTimeSlotForAppointment(this);
}return this._timeSlot;
},_getColumn:function(){return this._column;
},_setColumn:function(h){this._column=h;
},_setRowIndex:function(h){this._rowIndex=h;
},_getRowIndex:function(){return this._rowIndex;
},_startDrag:function(){var i=this.get_element();
var j=this.get_owner().get_element();
d(i).css("opacity",0.6);
if($telerik.isIE){d(i).css("padding-bottom","4px");
if($telerik.isIE6){var h=d("div.rsAptResize",i);
if(h.length>0){h.data("opacity",h.css("opacity")).css("opacity","");
}}}j.style.cursor="move";
this._oldZIndex=i.style.zIndex;
i.style.zIndex=999;
this._originalParent=i.parentNode;
Sys.UI.DomElement.removeCssClass(i,"rsWAppointmentDelete");
},_resetDragStyles:function(){var i=this.get_element();
d(i).css("opacity","");
if($telerik.isIE){d(i).css("padding-bottom","0px");
if($telerik.isIE6){var h=d("div.rsAptResize",i);
if(h.length>0){h.css("opacity",h.data("opacity"));
}}}i.style.zindex=this._oldZIndex;
var j=this.get_owner().get_element();
if(j&&j.style){j.style.cursor="";
}},_abortDrag:function(){this._resetDragStyles();
var h=this.get_element();
if(h.parentNode!=this._originalParent){this._originalParent.appendChild(h);
}},_raiseMoveEnd:function(k){var h=this.get_owner();
var j=h._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var i={appointment:this,newStartTime:j.get_startTime(),editingRecurringSeries:false,targetSlot:j,isAbortedByUser:k||false};
d.raiseCancellableControlEvent(h,"appointmentMoveEnd",i);
},_finishDrag:function(){var h=this.get_owner();
this._resetDragStyles();
var k=this.get_element();
var j=h._activeModel.getTimeSlotFromDomElement(this._originalParent.parentNode);
var l=h._activeModel.getTimeSlotFromDomElement(k);
if((j.get_index()==l.get_index())){this._abortDrag();
this._raiseMoveEnd();
return;
}var i={OnConfirm:this._onAppointmentMoveCallback,OnCancel:this._onAppointmentMoveAbortCallback,Scheduler:this.get_owner(),Appointment:this,SourceSlot:j,TargetSlot:l,CallbackIsCalledFromDialog:true};
if(h.get_displayRecurrenceActionDialogOnMove()&&(this._recurrenceState==1||this._recurrenceState==2)){this._showRecurrenceActionDialog(i);
}else{i.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(false,i);
}},_showRecurrenceActionDialog:function(i){var h=this.get_owner();
var j=new b.SchedulerRecurrenceActionDialogShowingEventArgs(i.Appointment,b.RecurrenceAction.Move);
h.raise_recurrenceActionDialogShowing(j);
if(j.get_cancel()){var k=j.get_editSeries();
if(k!==null){i.CallbackIsCalledFromDialog=false;
this._onAppointmentMoveCallback(k,i);
}else{this._onAppointmentMoveAbortCallback(i);
}}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Move,i);
}},_onAppointmentMoveCallback:function(i,k){if(k.CallbackIsCalledFromDialog){var l=new b.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,b.RecurrenceAction.Move,i);
k.Scheduler.raise_recurrenceActionDialogClosed(l);
}var h={appointment:k.Appointment,newStartTime:k.TargetSlot.get_startTime(),editingRecurringSeries:i,targetSlot:k.TargetSlot,isAbortedByUser:false};
var j=d.raiseCancellableControlEvent(k.Scheduler,"appointmentMoveEnd",h);
if(!j){k.Scheduler.moveAppointment(k.Appointment,i,k.SourceSlot,k.TargetSlot);
}else{k.Appointment._abortDrag();
}},_onAppointmentMoveAbortCallback:function(h){h.Appointment._abortDrag();
h.Appointment._raiseMoveEnd(true);
},get_contextMenuID:function(){return this._contextMenuID;
},set_contextMenuID:function(h){this._contextMenuID=h;
this._contextMenu=null;
},clone:function(){var j={id:this.get_id(),subject:this.get_subject(),description:this.get_description(),start:this.get_start().format("yyyy/MM/dd HH:mm"),end:this.get_end().format("yyyy/MM/dd HH:mm"),toolTip:this.get_toolTip(),internalID:this.get_internalID(),visible:this.get_visible(),recurrenceState:this.get_recurrenceState(),recurrenceParentID:this.get_recurrenceParentID()};
var i=new b.SchedulerAppointment(j,null);
i._resources=this.get_resources().clone();
i._attributes=this.get_attributes().clone();
for(var h in this){if(i[h]===f&&!h.startsWith("_")){i[h]=c(this[h]);
}}return i;
},_getStyleMode:function(){var h=this.get_owner();
if(!h){return b.AppointmentStyleMode.Auto;
}return h.get_appointmentStyleMode();
},_renderBorder:function(){var i=this.get_borderColor();
var k=this.get_borderWidth();
var j=this.get_borderStyle();
var h=this.get_element();
if(!h){return;
}if(this._getStyleMode()==b.AppointmentStyleMode.Default){d(".rsAptMid, .rsAptContent, .rsAptIn",h).css({"border-color":i,"border-style":j,"border-width":k});
}else{d(h).addClass("rsAptSimple").css({"border-top-color":i,"border-top-style":j,"border-top-width":k,"border-bottom-color":i,"border-bottom-style":j,"border-bottom-width":k}).find(".rsAptOut").css({"border-left-color":i,"border-left-style":j,"border-left-width":k,"border-right-color":i,"border-right-style":j,"border-right-width":k});
}}};
function c(h){var i=h,j;
if(h&&typeof h==="object"){i=Object.prototype.toString.call(h)==="[object Array]"?[]:{};
for(j in h){i[j]=c(h[j]);
}}return i;
}b.SchedulerAppointment.registerClass("Telerik.Web.UI.SchedulerAppointment");
})($telerik.$,Telerik.Web.UI);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerAppointmentCollection=function(a){this._array=new Array();
this._scheduler=a;
};
Telerik.Web.UI.SchedulerAppointmentCollection.prototype={add:function(b){var a=this._array.length;
this.insert(a,b);
},insert:function(a,b){Array.insert(this._array,a,b);
this._notify(function(c){c._onAppointmentInserting(b);
});
},remove:function(b,c){if(typeof(c)=="undefined"){c=true;
}var a=Array.remove(this._array,b);
this._notify(function(d){d._onAppointmentRemove(b,c);
});
return a;
},removeAt:function(a,c){var b=this.getAppointment(a);
if(b){this.remove(b,c);
}},_clear:function(){this._notify(function(a){a._onAppointmentsClear();
});
this._array=new Array();
},get_count:function(){return this._array.length;
},getAppointment:function(a){return this._array[a];
},indexOf:function(a){return Array.indexOf(this._array,a);
},forEach:function(c){for(var b=0,a=this.get_count();
b<a;
b++){c(this.getAppointment(b));
}},getAppointmentsInRange:function(b,a){return this.findAll(function(c){var e=c.get_start();
var d=c.get_end();
return e<a&&d>b;
});
},getAppointmentsStartingInRange:function(b,a){return this.findAll(function(c){var d=c.get_start();
return d>=b&&d<a;
});
},findAll:function(b){var a=new Telerik.Web.UI.SchedulerAppointmentCollection();
this.forEach(function(c){if(b(c)){a.add(c);
}});
return a;
},find:function(b){var a=null;
this.forEach(function(c){if(!a&&b(c)){a=c;
}});
return a;
},findByID:function(a){var b=null;
this.forEach(function(c){if(c.get_id()==a){b=c;
}});
return b;
},findByResource:function(b){var a=new Telerik.Web.UI.SchedulerResource();
if(b){a._type=b.type||b.get_type();
a._key=b.key;
if(b.get_key){a._key=b.get_key();
}}return this.findAll(function(c){var e=c.get_resources().getResourcesByType(a.get_type());
if(typeof a.get_key()==="undefined"){return e.get_count()>0;
}var d=false;
e.forEach(function(f){if(f.get_key()===a.get_key()){d=true;
}});
return d;
});
},_notify:function(a){if(this._scheduler){a(this._scheduler);
}}};
Telerik.Web.UI.SchedulerAppointmentCollection.registerClass("Telerik.Web.UI.SchedulerAppointmentCollection");
Type.registerNamespace("Telerik.Web.UI.Scheduler.Rendering");
(function(){var a=Telerik.Web.UI.Scheduler.Rendering;
a.Block=function(){this._columns=new Array();
this._parts=new Array();
this._start=null;
this._end=null;
};
a.Block.prototype={add:function(b){if(this._columns.length<1){this._createColumn();
}var e=false;
for(var c=0;
c<this._columns.length;
c++){if(this._columns[c].tryAdd(b)){e=true;
break;
}}if(!e){var d=this._createColumn();
d.tryAdd(b);
}Array.add(this._parts,b);
if(!this._start||this._start>b.start){this._start=b.start;
}if(!this._end||this._end<b.end){this._end=b.end;
}},remove:function(b){var c=Array.remove(this._parts,b);
if(!c){return;
}var d=b.column;
d.remove(b);
if(d.get_parts().length==0){Array.remove(this._columns,d);
}},overlapsWith:function(b){if(this._parts.length==0){return false;
}return this._start<=b.end&&this._end>b.start;
},_createColumn:function(){var c=new a.Column(this);
var b=this._columns.length;
Array.insert(this._columns,b,c);
return c;
},get_columns:function(){return this._columns;
},forEach:function(d){for(var c=0,b=this._parts.length;
c<b;
c++){d(this._parts[c]);
}}};
a.Block.registerClass("Telerik.Web.UI.Scheduler.Rendering.Block");
})();
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler");
(function(){var a=Telerik.Web.UI;
var b=a.Scheduler;
a.AppointmentEventArgs=function(c){a.AppointmentEventArgs.initializeBase(this);
this._appointment=c;
};
a.AppointmentEventArgs.prototype={get_appointment:function(){return this._appointment;
}};
a.AppointmentEventArgs.registerClass("Telerik.Web.UI.AppointmentEventArgs",Sys.EventArgs);
a.SchedulerAppointmentCancelEventArgs=function(c){a.SchedulerAppointmentCancelEventArgs.initializeBase(this);
this._appointment=c;
};
a.SchedulerAppointmentCancelEventArgs.prototype={get_appointment:function(){return this._appointment;
}};
a.SchedulerAppointmentCancelEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentCancelEventArgs",Sys.CancelEventArgs);
a.SchedulerAppointmentClickEventArgs=function(c,d){a.SchedulerAppointmentClickEventArgs.initializeBase(this,[c]);
this._domEvent=d;
};
a.SchedulerAppointmentClickEventArgs.prototype={get_domEvent:function(){return this._domEvent;
}};
a.SchedulerAppointmentClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentClickEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentInsertingEventArgs=function(c,d,e){a.SchedulerAppointmentInsertingEventArgs.initializeBase(this);
this._startTime=c;
this._isAllDay=d;
this._targetSlot=e;
};
a.SchedulerAppointmentInsertingEventArgs.prototype={get_startTime:function(){return this._startTime;
},get_isAllDay:function(){return this._isAllDay;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentInsertingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentInsertingEventArgs",Sys.CancelEventArgs);
a.SchedulerAppointmentResizeStartEventArgs=function(c){a.SchedulerAppointmentResizeStartEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentResizeStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeStartEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentResizeEndEventArgs=function(c,f,d,e){a.SchedulerAppointmentResizeEndEventArgs.initializeBase(this,[c]);
this._targetSlot=f;
this._newEndTime=d;
this._editingRecurringSeries=e;
};
a.SchedulerAppointmentResizeEndEventArgs.prototype={get_newTime:function(){return this._newEndTime;
},get_newEndTime:function(){return this._newEndTime;
},get_editingRecurringSeries:function(){return this._editingRecurringSeries;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentResizeEndEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizeEndEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentResizingEventArgs=function(c,d){a.SchedulerAppointmentResizingEventArgs.initializeBase(this,[c]);
this._targetSlot=d;
};
a.SchedulerAppointmentResizingEventArgs.prototype={get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentResizingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentResizingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentDeletingEventArgs=function(d,c){a.SchedulerAppointmentDeletingEventArgs.initializeBase(this,[d]);
this._editingRecurringSeries=c;
};
a.SchedulerAppointmentDeletingEventArgs.prototype={get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerAppointmentDeletingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentDeletedEventArgs=function(c){a.SchedulerAppointmentDeletedEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentDeletedEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDeletedEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentEditingEventArgs=function(d,c){a.SchedulerAppointmentEditingEventArgs.initializeBase(this,[d]);
this._editingRecurringSeries=c;
};
a.SchedulerAppointmentEditingEventArgs.prototype={get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerAppointmentEditingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentEditingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentMoveStartEventArgs=function(c){a.SchedulerAppointmentMoveStartEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentMoveStartEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMoveStartEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerAppointmentMovingEventArgs=function(c,d){a.SchedulerAppointmentMovingEventArgs.initializeBase(this,[c]);
this._targetSlot=d;
};
a.SchedulerAppointmentMovingEventArgs.prototype={get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerAppointmentMovingEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentMovingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerTimeSlotClickEventArgs=function(c,e,d){a.SchedulerTimeSlotClickEventArgs.initializeBase(this);
this._time=c;
this._targetSlot=e;
this._domEvent=d;
};
a.SchedulerTimeSlotClickEventArgs.prototype={get_time:function(){return this._time;
},get_domEvent:function(){return this._domEvent;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerTimeSlotClickEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotClickEventArgs",Sys.EventArgs);
a.SchedulerAppointmentDoubleClickEventArgs=function(c){a.SchedulerAppointmentDoubleClickEventArgs.initializeBase(this,[c]);
};
a.SchedulerAppointmentDoubleClickEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentDoubleClickEventArgs",a.AppointmentEventArgs);
a.SchedulerRecurrenceActionDialogShowingEventArgs=function(c,d){a.SchedulerRecurrenceActionDialogShowingEventArgs.initializeBase(this,[c]);
this._recurrenceAction=d;
this._editSeries=null;
};
a.SchedulerRecurrenceActionDialogShowingEventArgs.prototype={get_recurrenceAction:function(){return this._recurrenceAction;
},get_editSeries:function(){return this._editSeries;
},set_editSeries:function(c){this._editSeries=c;
}};
a.SchedulerRecurrenceActionDialogShowingEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogShowingEventArgs",a.SchedulerAppointmentCancelEventArgs);
a.SchedulerRecurrenceActionDialogClosedEventArgs=function(c,e,d){a.SchedulerRecurrenceActionDialogClosedEventArgs.initializeBase(this,[c]);
this._recurrenceAction=e;
this._editSeries=d;
};
a.SchedulerRecurrenceActionDialogClosedEventArgs.prototype={get_recurrenceAction:function(){return this._recurrenceAction;
},get_editSeries:function(){return this._editSeries;
}};
a.SchedulerRecurrenceActionDialogClosedEventArgs.registerClass("Telerik.Web.UI.SchedulerRecurrenceActionDialogClosedEventArgs",a.AppointmentEventArgs);
a.SchedulerFormCreatedEventArgs=function(c,d,e,f){a.SchedulerFormCreatedEventArgs.initializeBase(this,[c]);
this._formElement=d;
this._mode=e;
this._editingRecurringSeries=f||false;
};
a.SchedulerFormCreatedEventArgs.prototype={get_formElement:function(){return this._formElement;
},get_mode:function(){return this._mode;
},get_editingRecurringSeries:function(){return this._editingRecurringSeries;
}};
a.SchedulerFormCreatedEventArgs.registerClass("Telerik.Web.UI.SchedulerFormCreatedEventArgs",a.AppointmentEventArgs);
a.SchedulerAppointmentContextMenuEventArgs=function(c,d){a.SchedulerAppointmentContextMenuEventArgs.initializeBase(this,[c]);
this._domEvent=d;
};
a.SchedulerAppointmentContextMenuEventArgs.prototype={get_domEvent:function(){return this._domEvent;
}};
a.SchedulerAppointmentContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerAppointmentContextMenuEventArgs",a.AppointmentEventArgs);
a.SchedulerTimeSlotContextMenuEventArgs=function(c,e,d,f){a.SchedulerTimeSlotContextMenuEventArgs.initializeBase(this);
this._time=c;
this._isAllDay=e;
this._domEvent=d;
this._targetSlot=f;
};
a.SchedulerTimeSlotContextMenuEventArgs.prototype={get_time:function(){return this._time;
},get_isAllDay:function(){return this._isAllDay;
},get_domEvent:function(){return this._domEvent;
},get_targetSlot:function(){return this._targetSlot;
}};
a.SchedulerTimeSlotContextMenuEventArgs.registerClass("Telerik.Web.UI.SchedulerTimeSlotContextMenuEventArgs",Sys.EventArgs);
a.SchedulerWebServiceEventArgs=function(c){a.SchedulerWebServiceEventArgs.initializeBase(this);
this._schedulerInfo=c;
};
a.SchedulerWebServiceEventArgs.prototype={get_schedulerInfo:function(){return this._schedulerInfo;
}};
a.SchedulerWebServiceEventArgs.registerClass("Telerik.Web.UI.SchedulerWebServiceEventArgs",Sys.CancelEventArgs);
a.SchedulerRequestFailedEventArgs=function(c){a.SchedulerRequestFailedEventArgs.initializeBase(this);
this._errorMessage=c;
};
a.SchedulerRequestFailedEventArgs.prototype={get_errorMessage:function(){return this._errorMessage;
}};
a.SchedulerRequestFailedEventArgs.registerClass("Telerik.Web.UI.SchedulerRequestFailedEventArgs",Sys.CancelEventArgs);
b.RequestSuccessEventArgs=function(c){b.RequestSuccessEventArgs.initializeBase(this);
this._result=c;
};
b.RequestSuccessEventArgs.prototype={get_result:function(){return this._result;
}};
b.RequestSuccessEventArgs.registerClass("Telerik.Web.UI.Scheduler.RequestSuccessEventArgs",Sys.EventArgs);
b.NavigationCommandEventArgs=function(d,c){b.NavigationCommandEventArgs.initializeBase(this);
this._command=d;
this._selectedDate=c;
};
b.NavigationCommandEventArgs.prototype={get_command:function(){return this._command;
},get_selectedDate:function(){return this._selectedDate;
}};
b.NavigationCommandEventArgs.registerClass("Telerik.Web.UI.Scheduler.NavigationCommandEventArgs",Sys.CancelEventArgs);
b.NavigationCompleteEventArgs=function(c){b.NavigationCompleteEventArgs.initializeBase(this);
this._command=c;
};
b.NavigationCompleteEventArgs.prototype={get_command:function(){return this._command;
}};
b.NavigationCompleteEventArgs.registerClass("Telerik.Web.UI.Scheduler.NavigationCompleteEventArgs",Sys.EventArgs);
b.AppointmentDataBoundEventArgs=function(d,c){b.AppointmentDataBoundEventArgs.initializeBase(this,[d]);
this._data=c;
};
b.AppointmentDataBoundEventArgs.prototype={get_data:function(){return this._data;
}};
b.AppointmentDataBoundEventArgs.registerClass("Telerik.Web.UI.Scheduler.AppointmentDataBoundEventArgs",a.AppointmentEventArgs);
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler.Rendering");
(function(){var b=$telerik.$;
var a=Telerik.Web.UI.Scheduler.Rendering;
a.Column=function(c){this._parts=[];
this._block=c;
};
a.Column.prototype={tryAdd:function(d){var c=this._getPartsInRange(d.start,d.end);
if(c.length==0){Array.add(this._parts,d);
d.column=this;
return true;
}return false;
},remove:function(d){var c=Array.remove(this._parts,d);
if(c){d.column=null;
}},get_parts:function(){return this._parts;
},get_block:function(){return this._block;
},isLastColumn:function(){var c=this.get_block().get_columns()[this.get_block().get_columns().length-1];
return c==this;
},get_width:function(){if(this.isLastColumn()){return Math.floor(90/this.get_block().get_columns().length)+90%this.get_block().get_columns().length;
}return Math.floor(90/this.get_block().get_columns().length);
},get_left:function(){var c=Array.indexOf(this.get_block().get_columns(),this);
return Math.floor(90/this.get_block().get_columns().length*c);
},_getPartsInRange:function(d,c){return b.grep(this._parts,function(e){return(e.start<c&&e.end>d);
});
}};
a.Column.registerClass("Telerik.Web.UI.Scheduler.Rendering.Column");
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler");
(function(){var c=Telerik.Web.UI.Scheduler;
var a=60000;
var b=a*60;
var d=b*24;
c.DateHelper={getStartOfWeek:function(f,e){var h=f.getDay();
var g=0;
while(h!=e){if(h==0){h=6;
}else{h--;
}g++;
}return new c.DateTime(f).add(-g*d).toDate();
},getEndOfWeek:function(f,e,h){var g=c.DateHelper.getStartOfWeek(f,e);
return new c.DateTime(g).add(h*d).toDate();
},getWeekLength:function(i,g,e){var f=c.DateHelper.getStartOfWeek(i,g);
var h=new Date(f.getTime());
while(h.getDay()!=e){h=new c.DateTime(h).add(d).toDate();
}return((new c.DateTime(h).subtract(f)/d)+1);
},getDaysInMonth:function(f,e){return 32-new Date(f,e,32).getDate();
},getFirstDayOfMonth:function(e){var f=new Date(0);
f.setHours(0);
f.setMinutes(0);
f.setFullYear(e.getFullYear(),e.getMonth(),1);
return f;
},getLastDayOfMonth:function(h){var e=new Date(0);
e.setHours(0);
e.setMinutes(0);
var f=h.getFullYear();
var g=h.getMonth();
e.setFullYear(f,g,this.getDaysInMonth(f,g));
return e;
}};
})();
Type.registerNamespace("Telerik.Web.UI.Scheduler");
Telerik.Web.UI.Scheduler.EventMap=function(){this._owner=null;
this._element=null;
this._eventMap={};
this._onDomEventDelegate=null;
this._browserHandlers={};
};
Telerik.Web.UI.Scheduler.EventMap.prototype={initialize:function(b,a){this._owner=b;
if(!a){a=this._owner.get_element();
}this._element=a;
},skipElement:function(f,c){var a=f.target;
var b=a.tagName.toLowerCase();
var d=a.className;
if(b=="select"){return true;
}if(b=="option"){return true;
}if(b=="a"&&(!c||d.indexOf(c)<0)){return true;
}if(b=="input"){return true;
}if(b=="textarea"){return true;
}if(b=="button"){return true;
}return false;
},dispose:function(){if(this._onDomEventDelegate){for(var b in this._eventMap){if(this._shouldUseEventCapture(b)){var c=this._browserHandlers[b];
this._element.removeEventListener(b,c,true);
}else{$removeHandler(this._element,b,this._onDomEventDelegate);
}}this._onDomEventDelegate=null;
var a=true;
if(this._element._events){for(var d in this._element._events){if(this._element._events[d].length>0){a=false;
break;
}}if(a){this._element._events=null;
}}}},addHandlerForClassName:function(f,g,d){if(typeof(this._eventMap[f])=="undefined"){this._eventMap[f]={};
if(this._shouldUseEventCapture(f)){var e=this._getDomEventDelegate();
var a=this._element;
var b=function(h){return e.call(a,new Sys.UI.DomEvent(h));
};
this._browserHandlers[f]=b;
a.addEventListener(f,b,true);
}else{$addHandler(this._element,f,this._getDomEventDelegate());
}}var c=this._eventMap[f];
c[g]=d;
},_onDomEvent:function(g){var f=this._eventMap[g.type];
if(!f){return;
}var d=g.target;
while(d&&d.nodeType!==9){var h=d.className;
var b=h.split(" ");
var c=null;
for(var a=0;
a<b.length;
a++){c=f[b[a]];
if(c){break;
}}if(c){this._fillEventFields(g,d);
if(c.call(this._owner,g)!=true){if(!d.parentNode){g.stopPropagation();
}return;
}}if(d==this._element){return;
}d=d.parentNode;
}},_fillEventFields:function(d,b){d.eventMapTarget=b;
if(d.rawEvent.relatedTarget){d.eventMapRelatedTarget=d.rawEvent.relatedTarget;
}else{if(d.type=="mouseover"){d.eventMapRelatedTarget=d.rawEvent.fromElement;
}else{d.eventMapRelatedTarget=d.rawEvent.toElement;
}}if(!d.eventMapRelatedTarget){return;
}try{var c=d.eventMapRelatedTarget.className;
}catch(a){d.eventMapRelatedTarget=this._element;
}},_shouldUseEventCapture:function(a){return(a=="blur"||a=="focus")&&$telerik.isFirefox&&Sys.Browser.version>=3;
},_getDomEventDelegate:function(){if(!this._onDomEventDelegate){this._onDomEventDelegate=Function.createDelegate(this,this._onDomEvent);
}return this._onDomEventDelegate;
}};
Telerik.Web.UI.Scheduler.EventMap.registerClass("Telerik.Web.UI.Scheduler.EventMap");
Type.registerNamespace("Telerik.Web.UI");
(function(a){Telerik.Web.UI.InlineTemplate=function(d,f,h,e,g){this._schedulerElement=d;
this._schedulerContentElement=$telerik.getElementByClassName(this._schedulerElement,"rsContent","div");
this._localization=f;
this._minWidth=e;
this._minHeight=g;
this._wrapZIndexStep=1000;
var c=f.Save;
var i=f.Cancel;
var b=f.ShowAdvancedForm;
this._formHTMLTemplate='<div class="rsAptEditFormWrapper"> 	<div class="rsAptEditFormOuter"> 		<div class="rsAptEditFormMiddle"> 			<div class="rsAptEditFormMiddle2"> 				<div class="rsAptEditFormInner"> 					<div style="{0}" class="rsAptEditTextareaWrapper"> 						<textarea id="{1}" style="{2}"></textarea> 					</div> 					<div class="rsEditOptions"> 						<a href="#" class="rsAptEditConfirm">'+c+'</a> 						<a href="#" class="rsAptEditCancel">'+i+"</a>";
if(h){this._formHTMLTemplate+='<a href="#" class="rsAptEditMore">'+b+"</a>";
}this._formHTMLTemplate+='</div> 					<div class="rsAptEditResizeHandle"></div> 				</div> 			</div> 		</div> 	</div> </div>';
this._textareaId=this._schedulerElement.id+"_SubjectTextBox";
this._onResizeHandleMouseMoveDelegate=Function.createDelegate(this,this._onResizeHandleMouseMove);
this._onResizeHandleMouseUpDelegate=Function.createDelegate(this,this._onResizeHandleMouseUp);
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
};
Telerik.Web.UI.InlineTemplate.EmptyFunction=function(){};
Telerik.Web.UI.InlineTemplate._positionForm=function(v){var k=a("#"+v);
var o=k.find("div.rsTopWrap div.rsAptEditSizingWrapper");
if(o.length==0){return;
}if(o[0].detached){return;
}var e=k.find("div.rsTopWrap div.rsContent");
var b=o.parents("table.rsContentTable, table.rsAllDayTable, table.rsTimelineTable");
var w=o.offset();
var m=b.offset();
var t=o.parents().is("table.rsAllDayTable")&&!e.is(".rsTimelineView");
var s=k.find("div.rsTopWrap div.rsContentScrollArea");
var x=s.scrollLeft();
var f=false;
if(!t){var i=w.top+o.height();
var g=m.top+b.height();
if(i>g){o.css("top",(g-i)+"px");
f=true;
}}var h=false;
var q=w.left+o.width();
var d=m.left+b.width();
if(j){d+=x-Telerik.Web.UI.RadScheduler._getScrollBarWidth();
}if(q>d){o.css("left",(d-q)+"px");
h=true;
var j=s[0].scrollHeight!=s[0].offsetHeight;
if(j){o.css("left",(parseInt(o.css("left"))-Telerik.Web.UI.RadScheduler._getScrollBarWidth())+"px");
}}if(t){var l=e.offset();
w=o.offset();
var c=e.prev();
if(c.is(".rsHeader")){l.top-=c.height();
}var r=(w.top-l.top);
var p=o.offset().left-e.offset().left;
o.css({top:r+"px",left:p+"px",width:o.width()+"px"});
o[0].originalLeft=p+x;
o[0].originalParent=o[0].parentNode;
o.appendTo(e);
o[0].detached=true;
}var n=o.find("div.rsAptEditTextareaWrapper");
if(n){var u=n.find("textarea:first");
if(u.length>0){if($telerik.isIE&&n.css("height")!="auto"){u.css("height",n.css("height"));
n.css("height","auto");
}if($telerik.isIE6){u.width(u.width());
}if($telerik.isFirefox){u[0].scrollIntoView=Telerik.Web.UI.InlineTemplate.EmptyFunction;
}}}if(f){e[0].scrollTop=e[0].scrollHeight;
}if(h){e[0].scrollLeft=e[0].scrollWidth;
}o.css("visibility","visible");
};
Telerik.Web.UI.InlineTemplate.prototype={instantiateIn:function(f){this._cleanup();
var c=document.createElement("div");
c.className="rsAptEditSizingWrapper";
c.style.zIndex=20000;
c.style.visibility="visible";
var d=this._getTargetElement(f);
if(d.offsetWidth<this._minWidth){c.style.width=this._minWidth+"px";
}var e="";
var g="";
if(d.offsetHeight<this._minHeight){var b="height: "+this._minHeight+"px";
if($telerik.isIE){g=b;
}else{e=b;
}}c.innerHTML=String.format(this._formHTMLTemplate,e,this._textareaId,g);
d.appendChild(c);
this._element=c;
this._textArea=document.getElementById(this._textareaId);
Telerik.Web.UI.InlineTemplate._positionForm(this._schedulerElement.id);
this._textArea.focus();
this._attachHandlers(true);
},attachTo:function(b){this._element=b;
this._textArea=a(b).find("textarea:first")[0];
var c=a("div.rsTemplateWrapper",this._element);
if(c.length>0){this._template=c[0];
}this._attachHandlers(false);
},get_events:function(){if(!this._events){this._events=new Sys.EventHandlerList();
}return this._events;
},get_text:function(){if(this._textArea){return this._textArea.value;
}},set_text:function(b){if(this._textArea){this._textArea.value=b;
}},get_start:function(){return this._start;
},set_start:function(b){this._start=b;
},get_end:function(){return this._end;
},set_end:function(b){this._end=b;
},get_editSeries:function(){return this._editSeries;
},set_editSeries:function(b){this._editSeries=b;
},get_isInsert:function(){return this._isInsert;
},set_isInsert:function(b){this._isInsert=b;
},get_appointmentInternalID:function(){return this._appointmentInternalID;
},set_appointmentInternalID:function(b){this._appointmentInternalID=b;
},get_element:function(){return this._element;
},dispose:function(){this._events=null;
this._cleanup(true);
},add_saveClicked:function(b){this.get_events().addHandler("saveClicked",b);
},add_moreClicked:function(b){this.get_events().addHandler("moreClicked",b);
},_getTargetElement:function(c){var e=a(c);
var f=e;
if(!f.is("td")){f=f.parents("td:first");
}var b=f.find(".rsWrap:first");
if(e.is(".rsApt")){b=e.parent();
}if(b.length>0){b.data("originalCssText",b[0].style.cssText);
}else{f.html("");
b=a('<div class="rsWrap"></div>').appendTo(e).css({position:"absolute",top:f[0].offsetTop,left:f[0].offsetLeft,width:f.width(),height:"auto"});
b.data("originalCssText","");
}var d=b.css("zIndex");
if(d=="auto"){d=0;
}b.css({zIndex:parseInt(d)+this._wrapZIndexStep});
return b[0];
},_cleanup:function(b){if(!this._element){return;
}if(this._eventMap){this._eventMap.dispose();
}$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
var c=this._element.originalParent||this._element.parentNode;
c.style.cssText=a(c).data("originalCssText");
if(!b){a(this._element).remove();
this._element=null;
}if(c.childNodes.length==0){var d=c.parentNode;
if(d){d.removeChild(c);
if(d.innerHTML==""){d.innerHTML="&nbsp;";
}}}},_attachHandlers:function(b){if(!this._element){return;
}this._eventMap=new Telerik.Web.UI.Scheduler.EventMap();
this._eventMap.initialize(this);
this._eventMap.addHandlerForClassName("mousedown","rsAptEditResizeHandle",this._onResizeHandleMouseDown);
if(b){this._eventMap.addHandlerForClassName("click","rsAptEditConfirm",this._saveClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditCancel",this._cancelClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditMore",this._moreClicked);
this._eventMap.addHandlerForClassName("click","rsAptEditSizingWrapper",this._clicked);
this._eventMap.addHandlerForClassName("dblclick","rsAptEditSizingWrapper",this._clicked);
}$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
},_saveClicked:function(b){this._raiseEvent("saveClicked",null);
this.hide();
$telerik.cancelRawEvent(b);
return false;
},_cancelClicked:function(b){this._cleanup();
$telerik.cancelRawEvent(b);
return false;
},_moreClicked:function(b){this._raiseEvent("moreClicked",null);
$telerik.cancelRawEvent(b);
return false;
},_clicked:function(b){$telerik.cancelRawEvent(b);
return false;
},_onResizeHandleMouseDown:function(b){this._resizeOrigin={x:b.clientX,y:b.clientY,scrollTop:this._schedulerContentElement.scrollTop};
this._resizing=true;
var c=this._textArea?this._textArea.parentNode.offsetHeight:this._template.offsetHeight;
this._initialSize={width:this._element.offsetWidth,height:c};
$addHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStart);
},_onResizeHandleMouseMove:function(d){if(!$telerik.isMouseOverElement(this._schedulerElement,d)){return;
}var c=d.clientX-this._resizeOrigin.x;
var b=d.clientY-this._resizeOrigin.y;
c+=this._initialSize.width+this._schedulerContentElement.scrollLeft;
b+=this._initialSize.height+(this._schedulerContentElement.scrollTop-this._resizeOrigin.scrollTop);
c=Math.max(c,this._minWidth);
b=Math.max(b,this._minHeight);
this._setSize(c,b);
Telerik.Web.UI.RadScheduler._clearSelection();
},_onResizeHandleMouseUp:function(){this._cleanupResize();
},_onSelectStart:function(){return false;
},_cleanupResize:function(){if(!this._resizing){return;
}$removeHandler(this._schedulerContentElement,"mousemove",this._onResizeHandleMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeHandleMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStart);
Telerik.Web.UI.RadScheduler._clearSelection();
this._resizing=false;
},_onKeyboardEvent:function(b){if(b.keyCode==27){this._cleanupResize();
}},_setSize:function(b,c){if(!this._element){return;
}this._element.style.width=b+"px";
if(this._textArea){if($telerik.isIE6){this._textArea.style.width="100%";
this._textArea.style.cssText=this._textArea.style.cssText;
this._textArea.style.width=this._textArea.offsetWidth+"px";
}if($telerik.isIE){this._textArea.style.height=(c-6)+"px";
}else{this._textArea.parentNode.style.height=c+"px";
}}else{this._template.style.height=c+"px";
}},hide:function(){this._cleanup();
},_raiseEvent:function(c,d){var b=this.get_events().getHandler(c);
if(b){if(!d){d=Sys.EventArgs.Empty;
}b(this,d);
}}};
})($telerik.$);
Telerik.Web.UI.InlineTemplate.registerClass("Telerik.Web.UI.InlineTemplate",null,Sys.IDisposable);
(function(b){var a='<div class="rsModalWrapper">	<div class="rsOverlay"></div>	<div class="rsModalDialog">		<div class="rsModalOuter">    		<div class="rsModalOuterTitle">   		        <a class="rsModalWindowClose" href="#" title=""></a>		        <div class="rsModalInner">			        <h1 class="rsModalTitle"></h1>			        <div class="rsModalContent"></div>			        <div class="rsModalButtons">				        <a href="#" class="rsModalConfirm">OK</a>				        <a href="#" class="rsModalClose">Cancel</a>			        </div>			        <div class="rsModalIcon"></div>		        </div>    		</div>		</div>	</div></div>';
b.bind=function(d,c){return function(f){if(f){f.preventDefault();
}return d[c].apply(d,arguments);
};
};
b.modal=function(c){if(!(this instanceof b.modal)){return new b.modal(c);
}var f=b(c);
var d=f.find(".rsModalWrapper");
var e=380;
if(d.length==0){this._dialog=b(a).appendTo(f).hide().css({height:f.height(),width:f.width(),left:"1px",top:"1px",background:"none"}).find(".rsOverlay").css({height:f.height(),width:f.width(),opacity:0}).end().find(".rsModalDialog").css({width:e,left:(f.width()-e)/2,opacity:0}).end();
}else{this._dialog=d;
}return this;
};
b.modal.prototype={initialize:function(){this._dialog.find(".rsModalClose").unbind("click").bind("click",b.bind(this,"hide")).end().find(".rsModalWindowClose").unbind("click").bind("click",b.bind(this,"hide")).end().find(".rsModalConfirm").unbind("click").bind("click",b.bind(this,"hide"));
return this;
},set_content:function(d){for(var c in d){switch(c){case"title":this._dialog.find(".rsModalTitle").text(d.title);
break;
case"content":this._dialog.find(".rsModalContent").html(d.content);
break;
case"ok":this._dialog.find(".rsModalConfirm").text(d.ok);
break;
case"cancel":this._dialog.find(".rsModalClose").text(d.cancel);
this._dialog.find(".rsModalWindowClose").attr("title",d.cancel);
break;
}}return this;
},set_onActionConfirm:function(c){if(b.isFunction(c)){var d=this._dialog.find(".rsModalConfirm");
d.bind("click",c);
}return this;
},set_onActionCancel:function(c){if(b.isFunction(c)){var d=this._dialog.find(".rsModalClose");
d.bind("click",c);
}return this;
},get_element:function(){return this._dialog;
},show:function(){this._dialog.show().find(".rsOverlay").stop().animate({opacity:0.4},"slow").end().find(".rsModalDialog").stop().animate({opacity:1},{duration:"slow",complete:function(){if($telerik.isIE){this.style.cssText=this.style.cssText.replace(/filter.*?\;/ig,"");
}}}).end();
var c=this._dialog.find(".rsModalDialog");
c.css({top:(this._dialog.parent().height()-c.height())/2});
return this;
},hide:function(){this._dialog.find(".rsOverlay").stop().animate({opacity:0},"fast").end().find(".rsModalDialog").stop().animate({opacity:0},"fast",b.bind(this._dialog,"hide")).end();
return this;
},dispose:function(){this._dialog.find(".rsModalConfirm").unbind().end().find(".rsModalClose").unbind();
}};
})($telerik.$);
(function(){var b=$telerik.$;
var a=Telerik.Web.UI;
b.popupDialog=function(c,d,e){if(!(this instanceof b.popupDialog)){return new b.popupDialog(c,d,e);
}this._targetElement=c;
this._handleElement=d;
this._legacyPositioning=this.legacyPositioning();
this.options=b.extend({},b.popupDialog.defaults,e);
this._eventsNamespace="."+c.id;
this._originalCalendarZIndex=Telerik.Web.UI.Calendar.Popup.zIndex;
return this;
};
b.popupDialog.defaults={zIndex:4000,draggable:true,minTop:10,minBottom:10,minLeft:10,minRight:10,maxHeight:550,width:700};
b.popupDialog.prototype={show:function(){var d=this._targetElement;
this._modalExtender=new Telerik.Web.UI.ModalExtender(d);
var e=this._legacyPositioning?"absolute":"fixed";
d.style.position=e;
b(this._modalExtender._getModalOverlay()).css({position:e,zIndex:this.options.zIndex});
this._modalExtender.show();
b(d).css({display:"block",zIndex:this.options.zIndex+1});
Telerik.Web.UI.Calendar.Popup.zIndex=this.options.zIndex+2;
var c=this;
b(window).bind("resize"+this._eventsNamespace,function(){c._resizeForm.apply(c);
c._positionForm.apply(c);
});
b(window).trigger("resize"+this._eventsNamespace);
if(this.options.draggable&&this._handleElement){this._dragCue=this._createDragCue();
this._makeDraggable();
}},close:function(){if(this._modalExtender){this._modalExtender.dispose();
}b([window,document,this._handleElement||window]).unbind(this._eventsNamespace);
Telerik.Web.UI.Calendar.Popup.zIndex=this._originalCalendarZIndex;
},legacyPositioning:function(){return $telerik.isIE6||($telerik.isIE&&$telerik.quirksMode);
},_positionForm:function(){var d=b(window),g=b(document),e=this._legacyPositioning?g.scrollTop():0,f=this._legacyPositioning?g.scrollLeft():0,i=e,h=f,c=b(this._targetElement);
f+=(d.width()-c.outerWidth())/2;
e+=(d.height()-parseInt(this.options.maxHeight,10))/2;
f=Math.max(f,h);
e=Math.max(e,i);
c.css({top:e,left:f});
},_resizeForm:function(){var f=this._targetElement,e=this.options,c=b(".rsAdvancedEdit > *:not(.rsAdvOptionsScroll)",f).outerHeight(),d=b(window).height()-e.minTop-e.minBottom-c,g=b(window).width()-e.minLeft-e.minRight;
b(f).css({width:e.width});
b(".rsAdvOptionsScroll",f).css({"max-height":e.maxHeight});
},_createDragCue:function(){var c=b(this._targetElement);
var d=b('<div class="rsAdvDragCue" style="display:none; top:0; left:0;"></div>').css({position:c.css("position"),opacity:"0.5"});
if($telerik.isIE6){d.css({background:"none",opacity:"1"});
}c.parent().append(d);
return d;
},_finishDrag:function(){var c=b(this._targetElement);
var d=this._dragCue;
c.data("mouseMove",false).css({top:d.css("top"),left:d.css("left"),"-webkit-user-select":"","-moz-user-select":""});
d.hide();
c.trigger("formMoved");
},_onMouseMove:function(m){var h=b(this._targetElement);
var k=this._dragCue;
if(!h.data("mouseMove")){return;
}a.RadScheduler._clearSelection();
var l=k.offset();
if(m.clientX>0){var j=k.data("scrollLeft")-b(window).scrollLeft();
var i=l.left+k.data("relOriginX");
var f=m.clientX-i-j;
var n=parseInt(k.css("left"))+f;
var c=b(window).width()-k.width()-this.options.minRight;
n=Math.max(Math.min(c,n),this.options.minLeft);
k.css("left",n);
}if(m.clientY>0){var e=k.data("scrollTop")-b(window).scrollTop();
var g=l.top+k.data("relOriginY");
var p=m.clientY-g-e;
var d=parseInt(k.css("top"))+p;
var o=b(window).height()-k.height()-this.options.minBottom;
d=Math.max(Math.min(o,d),this.options.minTop);
k.css("top",d);
}},_makeDraggable:function(){var f=b(this._targetElement);
var e=b(this._handleElement);
var d=this._dragCue;
e.bind("mousedown"+this._eventsNamespace,function(i){if(i.which!=1){return;
}f.trigger("formMoving");
f.data("mouseMove",true).css({"-webkit-user-select":"none","-moz-user-select":"none"});
var j=parseInt(f.css("left"))-parseInt(d.css("borderLeftWidth"));
var h=parseInt(f.css("top"))-parseInt(d.css("borderTopWidth"));
d.css({width:f.width(),height:f.height(),zIndex:parseInt(f.css("zIndex"))+1,top:h,left:j}).show();
var k=d.offset();
d.data("relOriginY",i.clientY-k.top).data("relOriginX",i.clientX-k.left).data("scrollTop",b(window).scrollTop()).data("scrollLeft",b(window).scrollLeft());
});
var g=this;
b(document).bind("mouseup"+this._eventsNamespace,function(){if(!f.data("mouseMove")){return;
}g._finishDrag.apply(g);
});
var c=function(){g._onMouseMove.apply(g,arguments);
};
b(document).bind("mouseout"+this._eventsNamespace,c);
b(document).bind("mousemove"+this._eventsNamespace,c);
}};
})();
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler");
$telerik.findScheduler=$find;
$telerik.toScheduler=function(a){return a;
};
(function(){var d=$telerik.$;
var b=Telerik.Web.UI;
var h=b.Scheduler;
var f=h.DateTime;
var a;
var c=60000;
var e=c*60;
var i=e*24;
var g=4;
d.registerEnum(b,"SchedulerViewType",{DayView:0,WeekView:1,MonthView:2,ResourceView:3,TimelineView:4,MultiDayView:5});
d.registerEnum(b,"SchedulerNavigationCommand",{SwitchToDayView:0,SwitchToWeekView:1,SwitchToMonthView:2,SwitchToTimelineView:3,SwitchToMultiDayView:4,NavigateToNextPeriod:5,NavigateToPreviousPeriod:6,SwitchToSelectedDay:7,SwitchFullTime:8,DisplayNextAppointmentSegment:9,DisplayPreviousAppointmentSegment:10,NavigateToSelectedDate:11});
d.registerEnum(b,"SchedulerFormMode",{Hidden:0,Insert:1,Edit:2,AdvancedInsert:3,AdvancedEdit:4});
d.registerEnum(b,"AppointmentStyleMode",{Auto:0,Simple:1,Default:2});
b.RadScheduler=function(j){b.RadScheduler.initializeBase(this,[j]);
this._styles={dragTarget:"rsDragTarget",inlineForm:{sizingWrapper:"rsAptEditSizingWrapper"}};
this._postBackReference=null;
this._minutesPerRow=30;
this._numberOfHoveredRows=2;
this._selectedView=0;
this._readOnly=false;
this._overflowBehavior=1;
this._shouldPostbackOnClick=true;
this._displayDeleteConfirmation=true;
this._displayRecurrenceActionDialogOnMove=false;
this._firstDayStart=null;
this._appointments=null;
this._currentAppointment=null;
this._resources=new b.SchedulerResourceCollection();
this._resourceTypes=new b.ResourceTypeCollection();
this._scrollTop=0;
this._scrollLeft=0;
this._useHorizontalScrolling=false;
this._localization=null;
this._advancedTemplate=null;
this._advancedInsertTemplate=null;
this._advancedEditTemplate=null;
this._attributes=new b.SchedulerAttributeCollection();
this._datePickerCalendarExpanded=false;
this._customAttributeNames=[];
this._timeLabelRowSpan=2;
this._appointmentStyleMode=b.AppointmentStyleMode.Auto;
this._enableDescriptionField=false;
this._allowEdit=true;
this._allowDelete=true;
this._allowInsert=true;
this._defaultAdvancedFormRendered=false;
this._useDefaultAdvancedInsert=true;
this._useDefaultAdvancedEdit=true;
this._startEditingInAdvancedForm=true;
this._startInsertingInAdvancedForm=false;
this._dragging=false;
this._draggingAppointment=null;
this._onKeyboardEventDelegate=null;
this._activeModel=null;
this._modelTables=null;
this._resizingState={};
this._eventMap=new b.Scheduler.EventMap();
this._rowHeight="25px";
this._minimumInlineFormHeight=50;
this._minimumInlineFormWidth=250;
this._shouldUseClientInlineInsertForm=true;
this._shouldUseClientInlineEditForm=true;
this._validationGroup=null;
this._webServiceSettings=new b.SchedulerWebServiceSettings({});
this._timeZoneOffset=0;
this._formContainerMode=b.SchedulerFormMode.Hidden;
this._editingRecurringSeries=false;
this._showFullTime=false;
this._showAllDayRow=true;
this._firstDayOfWeek=b.DayOfWeek.Sunday;
this._lastDayOfWeek=b.DayOfWeek.Saturday;
this._advancedFormSettings={enabled:true,modal:false,zIndex:2500};
this._weekViewSettings=[];
this._dayViewSettings=[];
this._multiDayViewSettings=[];
this._monthViewSettings=[];
this._timelineViewSettings=[];
this._modelData=null;
this._schedulerRendered=null;
this._repainting=false;
};
b.RadScheduler._plugins=[];
b.RadScheduler._incrementTime=function(n,m,k){if(isNaN(k)){k=0;
}var l=n.getTimezoneOffset();
n.setTime(n.getTime()+(m*3600000)+(k*60000));
var j=n.getTimezoneOffset();
n.setTime(n.getTime()+((j-l)*60000));
};
b.RadScheduler._getScrollBarWidth=function(){if(b.RadScheduler._scrollbarWidth){return b.RadScheduler._scrollbarWidth;
}var m,o=0;
var n=document.createElement("div");
n.style.position="absolute";
n.style.top="-1000px";
n.style.left="-1000px";
n.style.width="100px";
n.style.height="50px";
n.style.overflow="hidden";
var j=document.createElement("div");
j.style.width="100%";
j.style.height="200px";
n.appendChild(j);
document.body.appendChild(n);
var l=j.offsetWidth;
n.style.overflow="auto";
var k=j.offsetWidth;
b.RadScheduler._scrollbarWidth=l-k;
if(b.RadScheduler._scrollbarWidth<=0){j.style.width="300px";
m=n.offsetWidth;
o=n.clientWidth;
b.RadScheduler._scrollbarWidth=m-o;
}if(b.RadScheduler._scrollbarWidth<=0){b.RadScheduler._scrollbarWidth=16;
}document.body.removeChild(document.body.lastChild);
return b.RadScheduler._scrollbarWidth;
};
b.RadScheduler._preInitialize=function(o,n,l,j,k){var m=d("#"+o);
if(m[0]._preInitialized&&!$telerik.isIE){return;
}Telerik.Web.UI.RadScheduler._adjustContentDimensions(m,n,l,j,k);
m[0].style.cssText=m[0].style.cssText;
b.RadScheduler._recalcAppointmentWidth();
m[0]._preInitialized=true;
};
b.RadScheduler._recalcAppointmentWidth=function(j){d("table.rsAllDayTable div.rsApt",j).eachCallback(function(){var s=this;
var n=d(s).parents("table.rsAllDayTable:first");
if(n.length==0){return;
}var r=n[0].style.width;
var A=r.endsWith("px");
var o=s.style.width;
var y=o.endsWith("px");
if(A&&y){return;
}if(!A){if(y){s.width=s.originalWidth;
o=s.originalWidth;
}else{s.originalWidth=o;
}}var z=s.parentNode.parentNode;
if(!z||!z.tagName||z.tagName.toUpperCase()!="TD"){return;
}var v=z.parentNode;
var l=parseInt(o,10)/100;
var t=Math.floor(l);
var p=s.offsetLeft;
var q=z.cellIndex+t-1;
if(q<0||q>v.cells.length-1){return;
}var k=v.cells[q];
var u=k.offsetLeft+k.offsetWidth;
var x=u-z.offsetLeft-p;
if(x<=0){return;
}var w=l%1;
if(w>0||p>0){var m=w*z.offsetWidth+p;
x+=m;
}s.style.width=x+"px";
});
};
b.RadScheduler._scrollVerticalArea=function(j,k){if(j.length){j.parent().scrollTop(k);
}};
b.RadScheduler._adjustContentDimensions=function(l,p,o,r,n){var m=l.find("div.rsTopWrap");
var s={scheduler:l,schedulerTopWrap:m,contentWrapper:m.find("td.rsContentWrapper"),verticalHeaderWrapper:m.find("td.rsVerticalHeaderWrapper")};
var k=b.RadScheduler._getScrollBarWidth();
if(n){m.find("table.rsVerticalHeaderTable").css("margin-bottom",k+"px");
}b.RadScheduler._adjustContentWidth(s);
if(r==1){b.RadScheduler._adjustContentHeight(s,n);
m.find("td.rsHorizontalHeaderWrapper").children().children().css("margin-right",k+"px");
}var j=m.find("div.rsContentScrollArea");
if(j.length){var t=m.find(".rsVerticalHeaderTable");
b.RadScheduler._scrollVerticalArea(t,p);
j.scrollTop(p).scrollLeft(o);
var q=m.find("td.rsHorizontalHeaderWrapper").children().children();
if($telerik.isIE6){q.css("margin-left",o+"px");
}else{q.scrollLeft(o);
}}b.InlineTemplate._positionForm(l[0].id);
b.RadScheduler._adjustTimelineViewHeight(l);
};
b.RadScheduler._adjustContentHeight=function(q,n){var p=d("div.rsHeader, div.rsFooter, td.rsHorizontalHeaderWrapper",q.schedulerTopWrap);
p=p.filter(":visible");
var m=q.scheduler.height();
d.each(p,function(){m-=d(this).outerHeight();
});
var j=0;
d("table.rsContentTable, table.rsAllDayTable",q.contentWrapper).each(function(){if(d(this).parents().is(".rsHorizontal")){j=d(this).outerHeight();
}else{j+=d(this).outerHeight();
}});
var o=n?b.RadScheduler._getScrollBarWidth():0;
j+=o;
var k=1;
if(j>=m){m-=k;
}else{m=j;
}d(q.contentWrapper).add(q.contentWrapper.children(":first")).height(m);
var l=n?m-o:m;
d(q.verticalHeaderWrapper).add(q.verticalHeaderWrapper.children(":first")).height(l);
};
b.RadScheduler._adjustContentWidth=function(j){var m=j.contentWrapper.add(j.schedulerTopWrap.find("td.rsHorizontalHeaderWrapper").children().get()).add(j.contentWrapper.children()[0]);
var k=j.schedulerTopWrap.outerWidth()-j.schedulerTopWrap.width();
if($telerik.isIE){if(j.scheduler.width()-k!=0){j.scheduler.css("overflow-x","hidden");
j.schedulerTopWrap.width(j.scheduler.width()-k);
j.scheduler.css("overflow-x","");
}}else{j.schedulerTopWrap.width(j.scheduler.width()-k);
}m.width("100%");
var l=j.scheduler.width()-j.verticalHeaderWrapper.width();
m.width(l-2);
var n=j.contentWrapper.find(".rsArrowContainer");
if(n.length>0){n.width(j.contentWrapper.find(".rsContentTable").width());
}};
b.RadScheduler._adjustTimelineViewHeight=function(k){var o=d(".rsTimelineView .rsAllDayRow",k);
var l=160;
if(o.length>0){var n=0;
o.each(function(){n+=d(this).height();
});
if(n>0&&n<l){var j=Math.ceil((l-n)/o.length);
var m=d(".rsTimelineView .rsVerticalHeaderWrapper .rsMainHeader th",k);
o.each(function(p){var r=d(this);
r.height(r.height()+j);
var s=d(m[p]);
var q=s.outerHeight()-s.height();
s.height(r.height()-q);
});
}}};
b.RadScheduler._clearSelection=function(){if(document.selection&&document.selection.empty){document.selection.empty();
}else{if(window.getSelection&&window.getSelection().removeAllRanges){window.getSelection().removeAllRanges();
}}};
b.RadScheduler.prototype={initialize:function(){var m=this.get_element();
var k=d(m);
b.RadScheduler.callBaseMethod(this,"initialize");
this._activeModel=this._getModelFactory(this._selectedView).createModel();
this._activeModel.initialize();
this._eventMap.initialize(this);
this.updateClientState();
this._updateScrollAreas();
var n=!this._webServiceSettings.get_isEmpty();
if(!n&&d(".rsAdvancedEdit",m).length>0){var l=d(".rsAdvancedEdit",m)[0];
if(b.Scheduling!=a&&b.Scheduling.AdvancedTemplate!=a&&this._defaultAdvancedFormRendered){var j=this._isSchedulerContentRendered();
this._advancedTemplate=new b.Scheduling.AdvancedTemplate(m,l,j);
}this._makeModal(l);
this._initializeAdvancedTemplateCallback=Function.createDelegate(this,this._initializeAdvancedTemplate);
Sys.Application.add_load(this._initializeAdvancedTemplateCallback);
}if(this._isSchedulerContentRendered()){if(!$telerik.isIE){this._eventMap.addHandlerForClassName("mousemove","rsContent",this._onContentScroll);
}this._eventMap.addHandlerForClassName("dblclick","rsAptEdit",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("dblclick","rsApt",this._onAppointmentDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsContentTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsAllDayTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("dblclick","rsTimelineTable",this._onCellDoubleClick);
this._eventMap.addHandlerForClassName("click","rsAptResize",this._onResizeGripMouseClick);
this._eventMap.addHandlerForClassName("click","rsApt",this._onAppointmentClick);
this._eventMap.addHandlerForClassName("click","rsAptDelete",this._onAppointmentDeleteClick);
this._eventMap.addHandlerForClassName("click","rsArrowTop",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowBottom",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowLeft",this._onPreviousDayClick);
this._eventMap.addHandlerForClassName("click","rsArrowRight",this._onNextDayClick);
this._eventMap.addHandlerForClassName("click","rsNextDay",this._onNextSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsPrevDay",this._onPreviousSchedulerDayClick);
this._eventMap.addHandlerForClassName("click","rsToday",this._onTodayClick);
this._eventMap.addHandlerForClassName("click","rsFullTime",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsOvertimeArrow",this._onFullTimeLinkClick);
this._eventMap.addHandlerForClassName("click","rsAptEdit",this._onEditFormClick);
this._eventMap.addHandlerForClassName("click","rsShowMore",this._onShowMoreClick);
this._eventMap.addHandlerForClassName("click","rsDateHeader",this._onDateHeaderClick);
this._eventMap.addHandlerForClassName("click","rsHeaderDay",this._onDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderWeek",this._onWeekViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMonth",this._onMonthViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderTimeline",this._onTimelineViewTabClick);
this._eventMap.addHandlerForClassName("click","rsHeaderMultiDay",this._onMultiDayViewTabClick);
this._eventMap.addHandlerForClassName("click","rsContentTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsAllDayTable",this._onCellClick);
this._eventMap.addHandlerForClassName("click","rsDatePickerActivator",this._onDatePickerToggle);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayTable",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsContentTable",this._onRowMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAllDayCell",this._onAllDayCellMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsApt",this._onAppointmentMouseOver);
this._eventMap.addHandlerForClassName("mouseover","rsAptResize",this._onResizeGripMouseOver);
this._eventMap.addHandlerForClassName("mouseout","rsContent",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsAllDayCell",this._onRowMouseOut);
this._eventMap.addHandlerForClassName("mouseout","rsApt",this._onAppointmentMouseOut);
this._eventMap.addHandlerForClassName("mousedown","rsAptDelete",this._stopEventPropagation);
this._eventMap.addHandlerForClassName("mousedown","rsApt",this._onAppointmentMouseDown);
this._eventMap.addHandlerForClassName("mousedown","rsAptResize",this._onResizeGripMouseDown);
this._eventMap.addHandlerForClassName("mouseup","rsContent",this._endDrag);
this._eventMap.addHandlerForClassName("contextmenu","rsApt",this._onAppointmentContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsContent",this._onCellContextMenu);
this._eventMap.addHandlerForClassName("contextmenu","rsAllDayCell",this._onCellContextMenu);
this._updateContentScrollArea(k);
this._onKeyboardEventDelegate=Function.createDelegate(this,this._onKeyboardEvent);
$addHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
this._onDocumentMouseOutDelegate=Function.createDelegate(this,this._onDocumentMouseOut);
$addHandler(document.documentElement,"mouseout",this._onDocumentMouseOutDelegate);
this._onContentScroll();
this._initializeIndicators();
this._applicationLoadedCallback=Function.createDelegate(this,this._applicationLoaded);
Sys.Application.add_load(this._applicationLoadedCallback);
}this._onResizeGripMouseMoveDelegate=Function.createDelegate(this,this._onResizeGripMouseMove);
this._onResizeGripMouseUpDelegate=Function.createDelegate(this,this._onResizeGripMouseUp);
this._onSelectStartDelegate=Function.createDelegate(this,this._onSelectStart);
this._onDocMouseUpDelegate=Function.createDelegate(this,this._onDocMouseUp);
this._onDocumentMouseMoveDelegate=Function.createDelegate(this,this._onDocumentMouseMove);
this._getInlineTemplate();
this._initializeRenderingManager();
this._initializePlugins();
this._onWindowResizeDelegate=Function.createDelegate(this,this.repaint);
$addHandler(window,"resize",this._onWindowResizeDelegate);
},_initializeIndicators:function(){if(!this._modelData){return;
}if(this.get_activeModel()._settings&&this.get_activeModel()._settings.hiddenAptsIndicator===false){return;
}this._modelData=eval("("+this._modelData+")");
this._setIndicatorState(this._modelData.aptIndicators);
},_initializePlugins:function(){var j=this;
d.each(b.RadScheduler._plugins,function(){this.onInitialize.call(j);
});
},_isSchedulerContentRendered:function(){if(this._schedulerRendered===null){this._schedulerRendered=d(".rsTopWrap",this.get_element()).length>0;
}return this._schedulerRendered;
},_updateContentScrollArea:function(j){this._clearScrollAreaHandlers();
this._contentScrollArea=j.find("div.rsContentScrollArea")[0];
if(this._contentScrollArea){this._onContentScrollDelegate=Function.createDelegate(this,this._onContentScroll);
$addHandler(this._contentScrollArea,"scroll",this._onContentScrollDelegate);
}},_updateScrollAreas:function(){var j=d(this.get_element());
this._updateContentScrollArea(j);
this._horizontalScrollAreas=j.find(".rsTopWrap td.rsHorizontalHeaderWrapper").children().children();
this._verticalScrollAreas=j.find(".rsTopWrap .rsVerticalHeaderTable");
},_applicationLoaded:function(){Sys.Application.remove_load(this._applicationLoadedCallback);
if(!this.get_element()){return;
}this.repaint();
this.initializeDatePicker();
},initializeDatePicker:function(){var j=$find(this.get_element().id+"_SelectedDateCalendar");
if(!j){return;
}j.add_dateSelecting(Function.createDelegate(this,this._calendarDateChanging));
j.add_calendarViewChanged(Function.createDelegate(this,this._calendarViewChanged));
if(this._renderingManager){j.set_autoPostBack(false);
j.add_dateSelected(Function.createDelegate(this,this._calendarDateChanged));
}else{j.add_calendarViewChanging(function(k){k.set_autoPostBack(false);
});
j.add_calendarViewChanged(function(k){k.set_autoPostBack(true);
});
}},_calendarDateChanging:function(j,m){var k=m.get_renderDay().get_date();
var n=new Date(k[0],k[1]-1,k[2]);
var l=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.NavigateToSelectedDate,n);
this.raiseEvent("NavigationCommand",l);
if(l.get_cancel()){m.set_cancel(true);
this._onDatePickerToggle();
}},_calendarDateChanged:function(l){var m=l.get_selectedDates();
if(m.length>0){var k=m[0];
var j=new Date(k[0],k[1]-1,k[2]);
this.set_selectedDate(j);
this._onDatePickerToggle();
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.NavigateToSelectedDate));
}},_calendarViewChanged:function(l){var j=d("div.rsDatePickerWrapper div:first",this.get_element());
var k=d("table:first",j);
j.css({height:k.height()+"px"});
},_initializeAdvancedTemplate:function(){if(this._advancedTemplate){this._advancedTemplate.initialize();
}this._fireFormCreated(this.get_currentAppointment(),this._formContainerMode,this._editingRecurringSeries);
try{if(this._defaultAdvancedFormRendered){d(".rsAdvFormWrap .riTextBox:first",this.get_element())[0].focus();
}}catch(j){}Sys.Application.remove_load(this._initializeAdvancedTemplateCallback);
},_initializeRenderingManager:function(){if(!this._webServiceSettings.get_isEmpty()){this._renderingManager=new b.Scheduler.Rendering.RenderingManager(this,this._webServiceSettings);
this._renderingManager.add_appointmentsReceived(Function.createDelegate(this,this._onWebServiceAppointmentsReceived));
this._renderingManager.add_appointmentsPopulated(Function.createDelegate(this,this._onWebServiceAppointmentsPopulated));
this._renderingManager.initialize();
}},_onWebServiceAppointmentsPopulated:function(){this._raiseAppointmentsPopulated();
if(!this._activeModel._getRenderer){return;
}var j=this._activeModel._getRenderer();
if(j&&j.refreshIndicatorState){j.refreshIndicatorState();
}},_onWebServiceAppointmentsReceived:function(){this.get_appointments()._clear();
if(this._newActiveModel){this._activeModel=this._newActiveModel;
this._newActiveModel=null;
}if(!this._activeModel._getRenderer){return;
}var j=this._activeModel._getRenderer();
if(j){j.refreshView();
this._updateScrollAreas();
}},dispose:function(){if(this._advancedInsertTemplate&&this._advancedInsertTemplate.dispose){this._advancedInsertTemplate.dispose();
}if(this._advancedEditTemplate&&this._advancedEditTemplate.dispose){this._advancedEditTemplate.dispose();
}if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate);
}if(this._onKeyboardEventDelegate){$removeHandler(document.documentElement,"keydown",this._onKeyboardEventDelegate);
}if(this._onDocumentMouseOutDelegate){$removeHandler(document.documentElement,"mouseout",this._onDocumentMouseOutDelegate);
}var j=this.get_contentElement();
if(j){$clearHandlers(j);
}this._clearScrollAreaHandlers();
this._eventMap.dispose();
this._modelTables=null;
this._resizingState=null;
if(this._inlineTemplate){this._inlineTemplate.dispose();
}if(this._popupDialog){this._popupDialog.close();
}this._disposePlugins();
b.RadScheduler.callBaseMethod(this,"dispose");
},_disposePlugins:function(){var j=this;
d.each(b.RadScheduler._plugins,function(){this.onDispose.call(j);
});
},_clearScrollAreaHandlers:function(){if(this._contentScrollArea){$clearHandlers(this._contentScrollArea);
}},repaint:function(){if(this._repainting){return;
}this._repainting=true;
b.RadScheduler._adjustContentDimensions(d(this.get_element()),this.get_scrollTop(),this.get_scrollLeft(),this.get_overflowBehavior(),this._useHorizontalScrolling);
this._repaintAdvancedTemplate();
this._initializeModelTables();
b.RadScheduler._recalcAppointmentWidth(this.get_element());
this._repainting=false;
},_repaintAdvancedTemplate:function(){if(this.get_overflowBehavior()==1&&!this._advancedFormSettings.modal){if(typeof(b.Scheduling)!="undefined"&&typeof(b.Scheduling.AdvancedTemplate)!="undefined"){b.Scheduling.AdvancedTemplate._adjustHeight($get(this.get_id()));
}}},get_appointments:function(){return this._appointments;
},set_appointments:function(m){this._appointments=new b.SchedulerAppointmentCollection(this);
var l=eval("("+m+")");
for(var k=0;
k<l.length;
k++){var j=new b.SchedulerAppointment(l[k],this);
this._appointments.add(j);
}},get_resources:function(){return this._resources;
},set_resources:function(l){var m=Sys.Serialization.JavaScriptSerializer.deserialize(l);
for(var k=0;
k<m.length;
k++){var j=new b.SchedulerResource(m[k]);
this._resources.add(j);
}},get_resourceTypes:function(){return this._resourceTypes;
},set_resourceTypes:function(m){var j=Sys.Serialization.JavaScriptSerializer.deserialize(m);
for(var k=0;
k<j.length;
k++){var l=new b.ResourceType(j[k]);
this._resourceTypes.add(l);
}},get_resourceStyles:function(){if(!this._resourceStyles){if(b.ResourceStyleMappingCollection){this._resourceStyles=new b.ResourceStyleMappingCollection();
}else{return null;
}}return this._resourceStyles;
},set_resourceStyles:function(j){var n=eval("("+j+")");
var m=this.get_resourceStyles();
for(var k=0;
k<n.length;
k++){var l=new b.ResourceStyleMapping(n[k],this);
m.add(l);
}},get_firstDayStart:function(){return this._firstDayStart;
},set_firstDayStart:function(j){this._firstDayStart=new Date(Date.parse(j));
},get_currentAppointment:function(){return this._currentAppointment;
},set_currentAppointment:function(k){var j=Sys.Serialization.JavaScriptSerializer.deserialize(k);
this._currentAppointment=new b.SchedulerAppointment(j,this);
},get_localization:function(){return this._localization;
},set_localization:function(j){this._localization=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_scrollTop:function(){return this._scrollTop;
},set_scrollTop:function(j){this._scrollTop=j;
},get_scrollLeft:function(){return this._scrollLeft;
},set_scrollLeft:function(j){this._scrollLeft=j;
},get_displayDeleteConfirmation:function(){return this._displayDeleteConfirmation;
},set_displayDeleteConfirmation:function(j){this._displayDeleteConfirmation=j;
},get_displayRecurrenceActionDialogOnMove:function(){return this._displayRecurrenceActionDialogOnMove;
},set_displayRecurrenceActionDialogOnMove:function(j){this._displayRecurrenceActionDialogOnMove=j;
},get_shouldPostbackOnClick:function(){return this._shouldPostbackOnClick;
},set_shouldPostbackOnClick:function(j){this._shouldPostbackOnClick=j;
},get_shouldUseClientInlineInsertForm:function(){return this._shouldUseClientInlineInsertForm;
},set_shouldUseClientInlineInsertForm:function(j){this._shouldUseClientInlineInsertForm=j;
},get_shouldUseClientInlineEditForm:function(){return this._shouldUseClientInlineEditForm;
},set_shouldUseClientInlineEditForm:function(j){this._shouldUseClientInlineEditForm=j;
},get_overflowBehavior:function(){return this._overflowBehavior;
},set_overflowBehavior:function(j){this._overflowBehavior=j;
},get_readOnly:function(){return this._readOnly;
},set_readOnly:function(j){this._readOnly=j;
},get_selectedView:function(){return this._selectedView;
},set_selectedView:function(m,n){this._selectedView=m;
if(this._renderingManager){this._newActiveModel=this._getModelFactory(this._selectedView).createModel();
this._newActiveModel.initialize();
if(!n){var j={};
var k=b.SchedulerViewType;
var l=b.SchedulerNavigationCommand;
j[k.DayView]=l.SwitchToDayView;
j[k.WeekView]=l.SwitchToWeekView;
j[k.MonthView]=l.SwitchToMonthView;
j[k.TimelineView]=l.SwitchToTimelineView;
j[k.MultiDayView]=l.SwitchToMultiDayView;
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(j[m]));
}}this.raisePropertyChanged("selectedView");
},get_minutesPerRow:function(){return this._minutesPerRow;
},set_minutesPerRow:function(j){this._minutesPerRow=j;
},get_timeLabelRowSpan:function(){return this._timeLabelRowSpan;
},set_timeLabelRowSpan:function(j){this._timeLabelRowSpan=j;
this.raisePropertyChanged("timeLabelRowSpan");
},get_hoursPanelTimeFormat:function(){return this._hoursPanelTimeFormat||"htt";
},set_hoursPanelTimeFormat:function(j){this._hoursPanelTimeFormat=j;
},get_postBackReference:function(){return this._postBackReference;
},set_postBackReference:function(j){this._postBackReference=j;
},get_allowEdit:function(){return this._allowEdit;
},set_allowEdit:function(j){this._allowEdit=j;
},get_allowDelete:function(){return this._allowDelete;
},set_allowDelete:function(j){this._allowDelete=j;
},get_allowInsert:function(){return this._allowInsert;
},set_allowInsert:function(j){this._allowInsert=j;
},get_attributes:function(){return this._attributes;
},set_attributes:function(j){this._attributes._load(j);
},get_customAttributeNames:function(){return this._customAttributeNames;
},set_customAttributeNames:function(j){this._customAttributeNames=j;
},get_activeModel:function(){return this._activeModel;
},set_numberOfHoveredRows:function(j){this._numberOfHoveredRows=j;
},get_numberOfHoveredRows:function(){return this._numberOfHoveredRows;
},set_groupBy:function(j){this._groupBy=j;
},get_groupBy:function(){return this._groupBy;
},get_contentElement:function(){return $telerik.getElementByClassName(this.get_element(),"rsContent","div");
},get_rowHeight:function(){return this._rowHeight;
},set_rowHeight:function(j){this._rowHeight=j;
},get_height:function(){return d(this.get_element()).css("height");
},set_height:function(j){this.get_element().style.height=j;
this.repaint();
},get_minimumInlineFormWidth:function(){return this._minimumInlineFormWidth;
},set_minimumInlineFormWidth:function(j){this._minimumInlineFormWidth=j;
},get_minimumInlineFormHeight:function(){return this._minimumInlineFormHeight;
},set_minimumInlineFormHeight:function(j){this._minimumInlineFormHeight=j;
},get_validationGroup:function(){return this._validationGroup||this.get_id();
},set_validationGroup:function(j){this._validationGroup=j;
},get_webServiceSettings:function(){return this._webServiceSettings;
},set_webServiceSettings:function(k){var j=Sys.Serialization.JavaScriptSerializer.deserialize(k);
this._webServiceSettings=new b.SchedulerWebServiceSettings(j);
},get_selectedDate:function(){return this._selectedDate;
},set_selectedDate:function(k){var j;
if(k instanceof Date){j=k;
}else{j=new Date(k);
}if(j!=null&&j!=NaN&&j!="Invalid Date"){this._selectedDate=j;
this.raisePropertyChanged("selectedDate");
}},get_showFullTime:function(){return this._showFullTime;
},set_showFullTime:function(j){if(this._renderingManager&&j!=this._showFullTime){if(j){this.get_activeModel()._getRenderer().showFullTime();
this._showFullTime=true;
}else{this.get_activeModel()._getRenderer().showBusinessTime();
this._showFullTime=false;
}this._renderingManager.loadAppointments(false);
this.repaint();
}else{this._showFullTime=j;
}},get_showAllDayRow:function(){return this._showAllDayRow;
},set_showAllDayRow:function(j){this._showAllDayRow=j;
},get_firstDayOfWeek:function(){return this._firstDayOfWeek;
},set_firstDayOfWeek:function(j){this._firstDayOfWeek=j;
},get_lastDayOfWeek:function(){return this._lastDayOfWeek;
},set_lastDayOfWeek:function(j){this._lastDayOfWeek=j;
},get_weekViewSettings:function(){return this._weekViewSettings;
},set_weekViewSettings:function(j){this._weekViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_dayViewSettings:function(){return this._dayViewSettings;
},set_dayViewSettings:function(j){this._dayViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_monthViewSettings:function(){return this._monthViewSettings;
},set_monthViewSettings:function(j){this._monthViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_multiDayViewSettings:function(){return this._multiDayViewSettings;
},set_multiDayViewSettings:function(j){this._multiDayViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_timelineViewSettings:function(){return this._timelineViewSettings;
},set_timelineViewSettings:function(j){this._timelineViewSettings=Sys.Serialization.JavaScriptSerializer.deserialize(j);
},get_advancedFormSettings:function(){return this._advancedFormSettings;
},set_advancedFormSettings:function(k){for(var j in k){this._advancedFormSettings[j]=k[j];
}},get_appointmentStyleMode:function(){return this._appointmentStyleMode;
},set_appointmentStyleMode:function(j){this._appointmentStyleMode=j;
},showInlineInsertForm:function(m){if(this._renderingManager&&this._startInsertingInAdvancedForm){var j=this._createAppointmentFromTimeSlot(m);
this._showAdvancedInsertForm(j);
return;
}if(this.get_shouldUseClientInlineInsertForm()||this._renderingManager){if(this._datePickerCalendarExpanded){this._onDatePickerToggle();
}var j=this._createAppointmentFromTimeSlot(m);
var l=this._getInlineTemplate();
l.instantiateIn(m.get_domElement());
l.set_text("");
l.set_start(j.get_start());
l.set_end(j.get_end());
l.set_isInsert(true);
this._fireFormCreated(j,b.SchedulerFormMode.Insert);
return;
}var o=m.get_domElement().offsetWidth;
var n=m.get_domElement().offsetHeight;
var k={command:"Insert",appointmentID:-1,targetSlotIndex:m.get_index(),slotWidth:o,slotHeight:n};
this.postback(k);
},showInsertFormAt:function(j){this.showInlineInsertForm(j);
},showAllDayInlineInsertForm:function(n){var j=new Date(n.getFullYear(),n.getMonth(),n.getDate());
var m=new f(j).add(i).toDate();
var l=new b.SchedulerAppointment();
l.set_start(j);
l.set_end(m);
var k=this.get_activeModel().getTimeSlotForAppointment(l);
this.showInlineInsertForm(k);
},showInlineEditForm:function(l,j){var k=l.get_element().parentNode.parentNode;
if(this._renderingManager&&this._startEditingInAdvancedForm){this.showAdvancedEditForm(l,j);
return;
}if(this.get_shouldUseClientInlineEditForm()||this._renderingManager){if(this._datePickerCalendarExpanded){this._onDatePickerToggle();
}var m=this._getInlineTemplate();
m.instantiateIn(l.get_element());
m.set_appointmentInternalID(l._internalID);
m.set_text(l.get_subject());
m.set_start(l.get_start());
m.set_end(l.get_end());
m.set_editSeries(j);
m.set_isInsert(false);
this._fireFormCreated(l,b.SchedulerFormMode.Edit,j);
return;
}var p=k.offsetWidth;
var o=k.offsetHeight;
var n={command:"Edit",appointmentID:l._internalID,editSeries:j,slotWidth:p,slotHeight:o};
this.postback(n);
},showAdvancedInsertForm:function(j){var l=f.add(j,this.get_minutesPerRow()*c);
var k=new b.SchedulerAppointment();
k.set_subject("");
k.set_start(j);
k.set_end(l);
this._showAdvancedInsertForm(k);
},showAllDayAdvancedInsertForm:function(m){var j=new Date(m.getFullYear(),m.getMonth(),m.getDate());
var l=f.add(j,i);
var k=new b.SchedulerAppointment();
k.set_subject("");
k.set_start(j);
k.set_end(l);
this._showAdvancedInsertForm(k);
},showAdvancedEditForm:function(j,k){if(this._renderingManager){this._showAdvancedFormWrapper(d("div.rsAdvancedEditWrapper",this.get_element()));
this._advancedTemplate=this._getAdvancedEditTemplate();
var l=this.prepareToEdit(j,k);
this._fireFormCreated(l,b.SchedulerFormMode.AdvancedEdit,k);
if(this._advancedTemplate){this._advancedTemplate.populate(l,false,k);
}return;
}var m={command:"AdvancedEdit",appointmentID:j._internalID,appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm"),editSeries:k};
this.postback(m);
},hideAdvancedForm:function(){var j=this.get_element();
if(this._renderingManager){var k=d("> div.rsAdvancedEditWrapper, > div.rsAdvancedInsertWrapper",j);
if(k.parent().is(".rsHiddenAdvancedForm")){return;
}this._advancedTemplate=null;
d("div.rsHiddenAdvancedForm",j).append(k);
d("div.rsTopWrap",j).show();
}else{d("> .rsAdvFormWrap",j).hide();
}if(this._popupDialog){this._popupDialog.close();
}},hideInlineForm:function(){var j=this._getInlineTemplate();
if(j.get_element()){j.hide();
}},editAppointmentWithConfirmation:function(j){this._editAppointmentInline(j);
},editAppointment:function(k,j){this.showInlineEditForm(k,j);
},insertAppointment:function(k){if(this._renderingManager){this.get_appointments().add(k);
return;
}var j={command:"InsertAppointment",appointment:this._getSerializableAppointment(k),startDate:k.get_start().format("yyyyMMddHHmm"),endDate:k.get_end().format("yyyyMMddHHmm")};
this.postback(j);
},prepareToEdit:function(m,k){if(m.get_recurrenceState()!=b.RecurrenceState.NotRecurring){var j=m;
if(m.get_recurrenceParentID()){j=this.get_appointments().findByID(m.get_recurrenceParentID());
}if(k){return j;
}if(m.get_recurrenceState()!=b.RecurrenceState.Exception){var l=m.clone();
l._recurrenceParentID=j.get_id();
l._recurrenceRule="";
l._recurrenceState=b.RecurrenceState.Exception;
l.__newRecurrenceException=true;
return l;
}}return m;
},updateAppointment:function(j,k){if(this._renderingManager){this._renderingManager.updateAppointment(j);
return;
}var l={command:"UpdateAppointment",appointmentID:j._internalID,appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm"),editSeries:k};
this.postback(l);
},deleteAppointmentWithConfirmation:function(j){this._deleteAppointment(j);
},deleteAppointment:function(j,l){if(this._renderingManager){this.get_appointments().remove(j,l);
return;
}var k={command:"Delete",appointmentID:j._internalID,editSeries:l};
this.postback(k);
},moveAppointment:function(r,p,x,v){if(this._renderingManager){var o=this.prepareToEdit(r,p);
var t=v.get_startTime();
var j=o.get_duration();
j=this.get_activeModel().getDurationOfMovedAppointment(r,x,v);
var w=f.subtract(t,r.get_start());
var k=f.add(o.get_start(),w);
var m=f.add(k,j);
o.set_start(k);
o.set_end(m);
if(x.get_resource){var n=o.get_resources();
var l=x.get_resource();
var s=n.getResourceByTypeAndKey(l.get_type(),l.get_key());
if(s){n.remove(s);
}var u=v.get_resource();
n.add(u);
}this._renderingManager.updateAppointment(o);
return;
}var q={Command:"Move",AppointmentID:r._internalID,EditSeries:p,SourceSlotIndex:x.get_index(),TargetSlotIndex:v.get_index()};
this.postback(q);
},resizeAppointment:function(l,p,j,m){if(this._renderingManager){var o=this.prepareToEdit(l,p);
var k=f.subtract(m.get_endTime(),l.get_start());
o.set_end(f.add(o.get_start(),k));
this._renderingManager.updateAppointment(o);
return;
}var n={Command:"Resize",AppointmentID:l._internalID,EditSeries:p,SourceSlotIndex:j.get_index(),TargetSlotIndex:m.get_index()};
this.postback(n);
},removeRecurrenceExceptions:function(j){if(this._renderingManager){this._renderingManager.removeRecurrenceExceptions(j);
}},getAppointmentDomElement:function(j){while(j&&!Sys.UI.DomElement.containsCssClass(j,"rsApt")){j=j.parentNode;
}return j;
},getAppointmentFromDomElement:function(k){if(!k){return null;
}var m=this.getAppointmentDomElement(k);
var j=this.get_appointments();
for(var l=0;
l<j.get_count();
l++){var o=j.getAppointment(l);
if(!o.get_element()){continue;
}for(var n=0;
n<o._domElements.length;
n++){if(m.id==o._domElements[n].id){return o;
}}}return null;
},displayToUtc:function(j){return f.add(j,-this._timeZoneOffset);
},utcToDisplay:function(j){return f.add(j,this._timeZoneOffset);
},saveClientState:function(){return'{"scrollTop":'+this._scrollTop+',"scrollLeft":'+this._scrollLeft+"}";
},rebind:function(){if(!this._renderingManager){return;
}this.hideInlineForm();
this.hideAdvancedForm();
this._renderingManager.loadAppointments();
},_createAppointmentFromTimeSlot:function(l){var j=l.get_startTime();
var n=l.get_endTime();
var k=this.get_activeModel();
if(k.getDurationOfInsertedAppointment){n=f.add(j,k.getDurationOfInsertedAppointment(l));
}var m=new b.SchedulerAppointment();
m.set_start(j);
m.set_end(n);
if(l.get_resource){m.get_resources().add(l.get_resource());
}return m;
},_getSerializableAppointment:function(j){return{ID:j._internalID,Subject:this._encodeString(j.get_subject()),Description:this._encodeString(j.get_description()),Resources:this._getSerializableResources(j.get_resources()),RecurrenceState:j.get_recurrenceState(),RecurrenceParentID:j.get_recurrenceParentID()};
},_encodeString:function(j){return encodeURIComponent((j||"").replace(/'/g,"&squote"));
},_getSerializableResources:function(l){var k=[];
for(var m=0;
m<l.get_count();
m++){var j=l.getResource(m);
k[k.length]={Key:j.get_key(),Text:j.get_text(),Type:j.get_type(),Available:j.get_available()};
}return k;
},_onAppointmentInserting:function(j){if(!this._renderingManager){return;
}j._setOwner(this);
if(!this.get_activeModel().isVisible(j)){j._visible=false;
}if(j.get_visible()){this._activeModel._getRenderer().renderAppointment(j);
if(j.get_visible()){this._raiseAppointmentCreated(j);
}}this._renderingManager.insertAppointment(j);
},_onAppointmentRemove:function(j,k){if(!this._renderingManager){return;
}this._activeModel._getRenderer().removeAppointment(j);
this._renderingManager.deleteAppointment(j,k);
},_onAppointmentsClear:function(){if(!this._renderingManager){return;
}var l=this.get_appointments();
for(var k=0,j=l.get_count();
k<j;
k++){this._activeModel._getRenderer().removeAppointment(l.getAppointment(k));
}},_fireFormCreated:function(m,l,n){var k=d("div.rsAptEditFormInner",this.get_element());
if(!k.length){k=d("div.rsAdvancedEdit:visible",this.get_element());
}if(k.length){var j=new b.SchedulerFormCreatedEventArgs(m,k[0],l,n);
this.raise_formCreated(j);
}},_onKeyboardEvent:function(j){if(j.keyCode==27){if(this._dragging){this._abortDrag(j,true);
}if(this._resizingState.resizing){this._restoreResizingAppointmentSize();
this._cleanupResize();
}}},_onDocumentMouseOut:function(k){if(!this._dragging||this._finishDragExecuting){return;
}var j=k.rawEvent.relatedTarget?k.rawEvent.relatedTarget:k.rawEvent.toElement;
if(!j){this._abortDrag(k,true);
}},_onDatePickerToggle:function(n){var m=d(this.get_element()).find("div.rsDatePickerWrapper");
var j=m.find("div:first");
var k=j.find("table:first");
var l=d(this.get_element()).find("a.rsDatePickerActivator");
var o=this.get_element().offsetWidth+"px";
j.stop().css({position:"absolute",overflow:"hidden",width:o}).css({width:k.width()+"px"});
m.css("overflow","visible");
if(!this._datePickerCalendarExpanded){this.hideInlineForm();
j.animate({height:k.height()+"px"},300,"easeInQuart");
l.addClass("rsDatePickerActivatorDown");
}else{j.animate({height:"0px"},300,"easeOutQuart",function(){m.css("overflow","hidden");
});
l.removeClass("rsDatePickerActivatorDown");
}this._datePickerCalendarExpanded=!this._datePickerCalendarExpanded;
if(n){n.preventDefault();
}return false;
},_onContentScroll:function(){var j=this._contentScrollArea;
if(!j){return;
}if(this._horizontalScrollAreas.length){if($telerik.isIE6){this._horizontalScrollAreas.css("margin-left",-j.scrollLeft+"px");
}else{this._horizontalScrollAreas.scrollLeft(j.scrollLeft);
}}b.RadScheduler._scrollVerticalArea(this._verticalScrollAreas,j.scrollTop);
var k=this._getInlineTemplate().get_element();
if(k&&k.detached){k.style.left=k.originalLeft-j.scrollLeft+"px";
}this._scrollLeft=j.scrollLeft;
this._scrollTop=j.scrollTop;
this.updateClientState();
},_onAppointmentClick:function(n){if(this._dragging){return;
}var j=new Date().getTime();
var m=100;
if($telerik.isIE&&j-this._resizingState.resizeTimestamp<m){return;
}var l=this.getAppointmentFromDomElement(n.eventMapTarget);
var k=new b.SchedulerAppointmentClickEventArgs(l,n);
this.raise_appointmentClick(k);
if(this.get_readOnly()&&this.get_shouldPostbackOnClick()){var o={Command:"Click",AppointmentID:l._internalID,EditSeries:false};
this.postback(o);
}},_onAppointmentContextMenu:function(l){var j=this.getAppointmentFromDomElement(l.eventMapTarget);
var k=new b.SchedulerAppointmentContextMenuEventArgs(j,l);
this.raise_appointmentContextMenu(k);
},_onEditFormClick:function(j){j.stopPropagation();
},_getHourCellFromDomElement:function(j){var k=j;
while(k.tagName.toLowerCase()!="th"){k=k.parentNode;
}return k;
},_onAllDayCellMouseOver:function(j){if(this._dragging&&this._draggingAppointment){j.eventMapTarget.lastChild.appendChild(this._draggingAppointment.get_element());
}this._onRowMouseOver(j);
},_onRowMouseOver:function(o){if(this._dragging||this._resizingState.resizing||this._getInlineTemplate()._resizing){return;
}var p=this.get_numberOfHoveredRows();
if(p==0){return;
}this._removeRowHover();
var k=d(o.target);
while(!(k.is("td")&&k.parents("table:first").is(".rsContentTable, .rsAllDayTable"))){k=k.parent();
if(k.length==0){return;
}}if(k.parents("table").is(".rsAllDayTable")||this.get_selectedView()==b.SchedulerViewType.MonthView){p=1;
}this._currentHoverCell=k[0];
var n=[this._currentHoverCell];
for(var j=1;
j<p;
j++){var m=this._getNextRowCell(n[j-1]);
if(m){n[j]=m;
}else{break;
}}this._hoveredCells=n;
var l=1;
d.each(this._hoveredCells,function(){d(this).addClass("rsAptCreate").addClass("rsAptCreateRow"+l++);
});
return true;
},_getParentTable:function(j){var k=j.parentNode;
while(k.tagName.toLowerCase()!="table"){k=k.parentNode;
}return k;
},_getNextRowCell:function(n){var l=n.parentNode;
var k=this._getParentTable(n);
var j=k.rows[l.rowIndex+1];
var m=null;
if(j){var p=j.cells.length;
var o=l.cells.length;
if(p==o){m=j.cells[n.cellIndex];
}else{if(p<o){m=j.cells[n.cellIndex-1];
}else{m=j.cells[n.cellIndex+1];
}}}return m;
},_onRowMouseOut:function(j){if(!this._currentHoverCell){return;
}if(!j.eventMapRelatedTarget||$telerik.isDescendant(this._currentHoverCell,j.eventMapRelatedTarget)){return;
}this._removeRowHover();
},_removeRowHover:function(){if(!this._hoveredCells){return;
}this._currentHoverCell=null;
var j=1;
d.each(this._hoveredCells,function(){d(this).removeClass("rsAptCreate").removeClass("rsAptCreateRow"+j++);
});
},_stopEventPropagation:function(j){j.stopPropagation();
},_onResizeGripMouseDown:function(n){if(this.get_readOnly()){return;
}this._resizingState.resizingElement=this.getAppointmentDomElement(n.eventMapTarget);
var l=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var k=(l.get_allowEdit()!=null)?l.get_allowEdit():this.get_allowEdit();
if(!k){return;
}var m=new b.SchedulerAppointmentResizeStartEventArgs(l);
this.raise_appointmentResizeStart(m);
if(!m.get_cancel()){this._resizingState.resizing=true;
this._resizingState.resizingAppointment=l;
var j=d(this._resizingState.resizingElement);
this._resizingState.originalSize={height:j.height(),width:j.width()};
$addHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$addHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$addHandler(document,"selectstart",this._onSelectStartDelegate);
}},_restoreResizingAppointmentSize:function(){if(!this._resizingState.originalSize){return;
}var k=this._resizingState.originalSize.height;
var j=this._resizingState.originalSize.width;
if($telerik.isIE6||$telerik.quirksMode){k-=g;
j-=g;
}var l=d(this._resizingState.resizingElement);
if(l.parents().is("table.rsAllDayTable")){l.width(j);
}else{l.height(k);
}d(".rsAptMid, .rsAptIn",l).css({width:""});
d(".rsAptOut, .rsAptMid, .rsAptIn, .rsAptContent",l).css({height:k});
this._resizingState.resizingElement=null;
this._resizingState.originalSize=null;
},_onResizeGripMouseMove:function(q){var l=this._resizingState.resizingElement;
if(!l){return;
}b.RadScheduler._clearSelection();
var j=l.parentNode.parentNode;
var r=10;
var n=this._getCellFromCoordinates(q.clientX,q.clientY-r);
if(!n){return;
}var o=this._activeModel.getTimeSlotFromDomElement(n);
var p=new b.SchedulerAppointmentResizingEventArgs(this._resizingState.resizingAppointment,o);
this.raise_appointmentResizing(p);
if(p.get_cancel()){return;
}var k=j.parentNode.parentNode.parentNode;
var m=n.parentNode.parentNode.parentNode;
if(k!=m){return;
}this._activeModel.updateResizingAppointmentSize(l,n);
this._keepElementInView(this._resizingState.resizingElement,true);
},_onSelectStart:function(j){$telerik.cancelRawEvent(j);
return false;
},_findResizeTargetSlot:function(o){var k=o.parentNode.parentNode;
var m=k.parentNode;
var t;
if(this.get_selectedView()==b.SchedulerViewType.TimelineView){var j=k.offsetWidth;
var p=Math.round(o.offsetWidth/j);
var s=k.cellIndex+p-1;
s=Math.min(s,m.cells.length-1);
t=m.cells[s];
}else{var l=o.parentNode.parentNode.offsetHeight;
var n=Math.ceil(o.offsetHeight/l);
var q=m.rowIndex+n-1;
q=Math.min(q,m.parentNode.rows.length-1);
var r=m.parentNode.rows[q];
t=r.cells[k.cellIndex];
}return this._activeModel.getTimeSlotFromDomElement(t);
},_onResizeGripMouseUp:function(p){if(!this._resizingState.resizingElement){return;
}var n=this._findResizeTargetSlot(this._resizingState.resizingElement);
var m=this.getAppointmentFromDomElement(this._resizingState.resizingElement);
var j=this._activeModel.getTimeSlotFromDomElement(m.get_element());
var o=n.get_endTime();
if(o.getTime()==m.get_end().getTime()){this._cleanupResize();
return;
}var q={OnConfirm:this._onAppointmentResizeCallback,OnCancel:this._onAppointmentResizeAbortCallback,Scheduler:this,Appointment:m,SourceSlot:j,TargetSlot:n,UpdatedEndDate:o,CallbackIsCalledFromDialog:true};
if(m._recurrenceState==1||m._recurrenceState==2){var l=new b.SchedulerRecurrenceActionDialogShowingEventArgs(q.Appointment,b.RecurrenceAction.Resize);
this.raise_recurrenceActionDialogShowing(l);
if(l.get_cancel()){var k=l.get_editSeries();
if(k!==null){q.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(k,q);
}else{this._onAppointmentResizeAbortCallback(q);
}}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Resize,q);
}}else{q.CallbackIsCalledFromDialog=false;
this._onAppointmentResizeCallback(false,q);
}p.stopPropagation();
this._cleanupResize();
},_cleanupResize:function(){this._resizingState.resizing=false;
this._resizingState.resizingAppointment=null;
this._resizingState.resizeTimestamp=new Date().getTime();
$removeHandler(document,"mousemove",this._onResizeGripMouseMoveDelegate);
$removeHandler(document,"mouseup",this._onResizeGripMouseUpDelegate);
$removeHandler(document,"selectstart",this._onSelectStartDelegate);
},_onAppointmentResizeCallback:function(j,k){if(k.CallbackIsCalledFromDialog){var l=new b.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,b.RecurrenceAction.Resize,j);
k.Scheduler.raise_recurrenceActionDialogClosed(l);
}var m=new b.SchedulerAppointmentResizeEndEventArgs(k.Appointment,k.TargetSlot,k.UpdatedEndDate,j);
k.Scheduler.raise_appointmentResizeEnd(m);
if(!m.get_cancel()){k.Scheduler.resizeAppointment(k.Appointment,j,k.SourceSlot,k.TargetSlot);
}else{k.Scheduler._restoreResizingAppointmentSize();
}},_onAppointmentResizeAbortCallback:function(j){j.Scheduler._restoreResizingAppointmentSize();
},_onResizeGripMouseClick:function(j){j.stopPropagation();
},_onResizeGripMouseOver:function(j){j.stopPropagation();
},_initializeModelTables:function(){this._modelTables=[];
var k=this;
var j=k.get_element();
d(".rsTopWrap .rsAllDayTable, .rsTopWrap .rsContentTable, .rsTopWrap .rsTimelineTable",this.get_element()).each(function(){var l=this;
l.targetRect=$telerik.getBounds(l);
var m=k._getTotalOffset(j);
l.targetRect.x-=m.left;
l.targetRect.y-=m.top;
k._compensateScrollOffset(l);
l.cellWidth=l.targetRect.width/l.rows[0].cells.length;
var n=[];
d.each(l.rows,function(){Array.add(n,this.cells[0].offsetHeight);
});
l.cellHeights=n;
Array.add(k._modelTables,l);
});
return this._modelTables;
},_compensateScrollOffset:function(k){var j=$telerik.getScrollOffset(k,true);
var l=$telerik.getScrollOffset(document.documentElement,false);
j.x-=l.x;
j.y-=l.y;
k.targetRect.x+=j.x;
k.targetRect.y+=j.y;
if($telerik.isSafari3||$telerik.isChrome){k.targetRect.x+=j.x;
k.targetRect.y+=j.y;
}},_getTotalOffset:function(j){var m=j.offsetTop;
var l=j.offsetLeft;
var k=j.offsetParent;
while(k){m+=k.offsetTop;
l+=k.offsetLeft;
k=k.offsetParent;
}return{top:m,left:l};
},_getCellFromCoordinates:function(w,q){if(!this.get_element()){return;
}var k=this._modelTables;
var t=d("#"+this.get_element().id+" div.rsContentScrollArea:first")[0];
var v=$telerik.getScrollOffset(t,true);
var m=this._getTotalOffset(this.get_element());
for(var r=0,o=k.length;
r<o;
r++){var j=w+v.x;
var u=q+v.y;
var z=k[r];
var s={x:z.targetRect.x+m.left,y:z.targetRect.y+m.top,width:z.targetRect.width,height:z.targetRect.height};
var p=s.y+s.height;
var A=s.x+s.width;
if(j>=s.x&&j<=A&&u>=s.y&&u<=p){var l=this._getRowIndex(u,z,s.y);
l=Math.min(z.rows.length-1,Math.max(0,l));
var n=parseInt((j-s.x)/z.cellWidth);
n=Math.min(z.rows[l].cells.length-1,Math.max(0,n));
return z.rows[l].cells[n];
}}return null;
},_getRowIndex:function(l,j,p){var n=0;
var o=j.cellHeights.length;
var k=p;
while(n<o){var m=k+j.cellHeights[n];
if(k<=l&&l<m){break;
}k=m;
n++;
}return n;
},_shouldStartDrag:function(j){if(!this._initialDragAppointment||!this._initialDragMousePos){return false;
}if(Math.abs(this._initialDragMousePos.x-j.x)>4||Math.abs(this._initialDragMousePos.y-j.y)>4){return true;
}},_onDocumentMouseMove:function(p){var j=this._getMousePosition(p);
if(!this._dragging&&this._shouldStartDrag(j)){this._startDrag(p);
}if(!this._dragging||!this._draggingAppointment){return;
}b.RadScheduler._clearSelection();
var q=this._draggingAppointment.get_element();
var l=this._getCellFromCoordinates(p.clientX,p.clientY-this._draggingOffset);
if(!l||!l.tagName||l.tagName.toLowerCase()!="td"||l.firstChild==q.parentNode){return;
}d(q.parentNode).removeClass(this._styles.dragTarget);
var n=d(l).find("div.rsWrap:first");
if(n.length==0){var r=d(l);
n=d(q.parentNode.cloneNode(false)).css({width:r.width(),height:"auto"});
if(l.innerHTML=="&nbsp;"){l.innerHTML="";
}else{n.css({position:"absolute",top:r[0].offsetTop,left:r[0].offsetLeft});
}n.appendTo(r);
}n.data("oldZIndex",n.css("zIndex")).css("zIndex",999);
this._restoreWrapZIndex(q.parentNode);
if(this._activeModel.updateDraggingAppointmentSize){this._activeModel.updateDraggingAppointmentSize(q,l,this._draggingAppointmentWidth);
}if(this.get_selectedView()!=b.SchedulerViewType.MonthView){var m=l.parentNode.parentNode.rows.length-l.parentNode.rowIndex;
var k=(m*parseInt(this.get_rowHeight()))-g;
k=Math.min(this._draggingAppointmentHeight,k);
d(q).height(k+"px");
n.append(q);
}else{if(l.childNodes[1]){l.childNodes[1].appendChild(q);
}}d(q.parentNode).addClass(this._styles.dragTarget).css("display","");
var o=this._activeModel.getTimeSlotFromDomElement(l);
var s=new b.SchedulerAppointmentMovingEventArgs(this._draggingAppointment,o);
this.raiseEvent("appointmentMoving",s);
if(s.get_cancel()){this._abortDrag(p);
}else{this._keepElementInView(q);
}return true;
},_restoreWrapZIndex:function(l){var j=d(l);
var k=j.data("oldZIndex");
if(k){j.css("zIndex",k);
}},_keepElementInView:function(j,k){this._keepElementInViewHorizontal(j,k);
this._keepElementInViewVertical(j,k);
},_keepElementInViewHorizontal:function(k,p){var j=d("#"+this.get_element().id+" div.rsContentScrollArea")[0];
var q=d("#"+this.get_element().id+" div.rsContent")[0];
var s=this._getRelativeOffset(j,q);
var n=this._getRelativeOffset(k,q);
n.left-=s.left;
n.top-=s.top;
var t=k.parentNode.parentNode.offsetWidth;
var l=n.left;
var m=k.offsetWidth;
var r=l+m;
var u=j.clientWidth+j.scrollLeft;
if(!p&&l<j.scrollLeft){j.scrollLeft=l;
}if(r>u){var o=j.scrollLeft+(r-u);
o=Math.min(o,j.clientWidth+o);
if(!p&&o>l){o=l;
}j.scrollLeft=o;
}if(p&&(r-t)<j.scrollLeft){j.scrollLeft=r-t;
}},_keepElementInViewVertical:function(k,p){var j=d("div.rsContentScrollArea",this.get_element())[0];
var r=d("div.rsContent",this.get_element().id)[0];
var s=this._getRelativeOffset(j,r);
var t=this._getRelativeOffset(k,r);
t.left-=s.left;
t.top-=s.top;
var l=k.parentNode.parentNode.offsetHeight;
var u=t.top;
var m=k.offsetHeight;
var o=u+m;
var n=j.clientHeight+j.scrollTop;
if(p){if(o>n){var q=j.scrollTop+(o-n);
if((j.clientHeight+q)>j.scrollHeight){return;
}j.scrollTop=q;
}if((o-l)<j.scrollTop){j.scrollTop=o-l;
}}else{if(u<j.scrollTop){j.scrollTop=Math.max(j.scrollTop-(l*2),0);
}if(u>n){j.scrollTop=Math.min(j.scrollTop+(l*2),j.scrollHeight);
}}},_getRelativeOffset:function(m,k){var n=m.offsetParent;
var j=m.offsetTop;
var l=m.offsetLeft;
while(n!=k){j+=n.offsetTop;
l+=n.offsetLeft;
if(!n.offsetParent){break;
}n=n.offsetParent;
}return{top:j,left:l};
},_getMousePosition:function(m){var k=$telerik.getScrollOffset(document.body,true);
var j=m.clientX;
var l=m.clientY;
j+=k.x;
l+=k.y;
return{x:j,y:l};
},_onAppointmentMouseDown:function(l){if(this.get_readOnly()){return;
}var j=this.getAppointmentFromDomElement(l.eventMapTarget);
var k=(j.get_allowEdit()!=null)?j.get_allowEdit():this.get_allowEdit();
if(!k){return;
}this._initialDragMousePos=this._getMousePosition(l);
this._initialDragAppointment=j;
$addHandler(document,"selectstart",this._onSelectStartDelegate);
$addHandler(document,"mouseup",this._onDocMouseUpDelegate);
$addHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=true;
},_startDrag:function(p){var m=this._initialDragAppointment;
var j=this._getCellFromCoordinates(p.clientX,p.clientY);
if(!j){return;
}var o=new b.SchedulerAppointmentMoveStartEventArgs(m);
this.raiseEvent("appointmentMoveStart",o);
if(o.get_cancel()){return;
}this._draggingAppointment=m;
this._draggingAppointmentHeight=d(m.get_element()).height();
this._draggingAppointmentWidth=d(m.get_element()).width();
this._dragging=true;
var k=this._draggingAppointment.get_element();
var n=$telerik.getLocation(k);
if($telerik.isFirefox||$telerik.isSafari){var l=$telerik.getScrollOffset(k,true);
n.x-=l.x;
n.y-=l.y;
if($telerik.isFirefox){n.x+=document.body.parentNode.scrollLeft;
n.y+=document.body.parentNode.scrollTop;
}else{n.x+=document.body.scrollLeft;
n.y+=document.body.scrollTop;
}}var q=$telerik.getLocation(j);
var r=p.clientY-n.y;
var s=p.clientY-q.y;
this._draggingOffset=r-s;
if($telerik.isFirefox&&document.compatMode=="BackCompat"){this._draggingOffset=0;
}if(this.get_selectedView()==b.SchedulerViewType.MonthView||this.get_selectedView()==b.SchedulerViewType.TimelineView){this._draggingOffset=0;
}m._startDrag();
},_endDrag:function(j){this._finishDrag(j,false);
},_onDocMouseUp:function(j){this._finishDrag(j,false);
},_abortDrag:function(j,k){this._finishDrag(j,true,k);
},_finishDrag:function(m,k,n){this._finishDragExecuting=true;
if(this._dragHandlersAttached){$removeHandler(document,"selectstart",this._onSelectStartDelegate);
$removeHandler(document,"mouseup",this._onDocMouseUpDelegate);
$removeHandler(document,"mousemove",this._onDocumentMouseMoveDelegate);
this._dragHandlersAttached=false;
}if(this._dragging){var l=this._draggingAppointment.get_element();
if(!k&&l.parentNode&&l.parentNode.parentNode){var j=l.parentNode.parentNode;
this._draggingAppointment._finishDrag(j);
}else{d(l).height(this._draggingAppointmentHeight).width(this._draggingAppointmentWidth);
this._restoreWrapZIndex(l.parentNode);
this._draggingAppointment._abortDrag();
this._draggingAppointment._raiseMoveEnd(n);
}var o=this;
window.setTimeout(function(){o._draggingAppointment=null;
o._dragging=false;
},0);
Sys.UI.DomElement.removeCssClass(l.parentNode,this._styles.dragTarget);
m.preventDefault();
m.stopPropagation();
}this._finishDragExecuting=false;
},_onAppointmentDoubleClick:function(l){if(this._resizingState.resizing){this._resizingState.resizing=false;
l.stopPropagation();
return;
}b.RadScheduler._clearSelection();
var j=this.getAppointmentFromDomElement(l.eventMapTarget);
var k=new b.SchedulerAppointmentDoubleClickEventArgs(j);
this.raise_appointmentDoubleClick(k);
this._editAppointmentInline(j);
$telerik.cancelRawEvent(l);
return false;
},_editAppointmentInline:function(j){if(this.get_readOnly()||!j){return;
}var l=(j.get_allowEdit()!=null)?j.get_allowEdit():this.get_allowEdit();
if(!l){return;
}var k={OnConfirm:this._onAppointmentEditCallback,Scheduler:this,Appointment:j,CallbackIsCalledFromDialog:true};
this._showEditConfirmationDialog(k);
},_showEditConfirmationDialog:function(k){if(k.Appointment._recurrenceState==1||k.Appointment._recurrenceState==2||k.Appointment._recurrenceState==3){var j=new b.SchedulerRecurrenceActionDialogShowingEventArgs(k.Appointment,b.RecurrenceAction.Edit);
this.raise_recurrenceActionDialogShowing(j);
if(j.get_cancel()){var l=j.get_editSeries();
if(l!==null){k.CallbackIsCalledFromDialog=false;
k.OnConfirm(l,k);
}}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Edit,k);
}}else{k.CallbackIsCalledFromDialog=false;
k.OnConfirm(false,k);
}},_onAppointmentEditCallback:function(j,k){if(k.CallbackIsCalledFromDialog){var l=new b.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,b.RecurrenceAction.Edit,j);
k.Scheduler.raise_recurrenceActionDialogClosed(l);
}var m=new b.SchedulerAppointmentEditingEventArgs(k.Appointment,j);
k.Scheduler.raise_appointmentEditing(m);
if(!m.get_cancel()){k.Scheduler.editAppointment(k.Appointment,j);
}},_onDateHeaderClick:function(l){$telerik.cancelRawEvent(l);
var m=new Date();
var j=l.eventMapTarget.href.match(/#(\d{4}-\d{2}-\d{2})/);
if(j&&j.length==2){var k=j[1];
m=new Date(k);
}return this._switchToSelectedDay(m);
},_onShowMoreClick:function(k){$telerik.cancelRawEvent(k);
var j=this._activeModel.getTimeSlotFromDomElement(k.eventMapTarget);
return this._switchToSelectedDay(j.get_startTime());
},_switchToSelectedDay:function(l){var l=f.getDate(l);
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToSelectedDay,l);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this._renderingManager._suppressWebServiceCalls=true;
this.set_selectedDate(l);
this._renderingManager._suppressWebServiceCalls=false;
this.set_selectedView(b.SchedulerViewType.DayView,true);
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.SwitchToSelectedDay));
return;
}var k={Command:"SwitchToSelectedDay",StartDate:l.format("yyyyMMddHHmm")};
this.postback(k);
return false;
},_onAppointmentMouseOver:function(n){if(this._resizingState.resizing||this._dragging){n.stopPropagation();
return;
}var m=this.getAppointmentDomElement(n.eventMapTarget);
var j=this.getAppointmentFromDomElement(m);
var l=(j.get_allowDelete()!=null)?j.get_allowDelete():this.get_allowDelete();
if(!l){return;
}this._hoveredAppointmentElement=m;
var k=$telerik.getElementByClassName(m,"rsAptDelete","a");
if(k){k.style.visibility="visible";
}},_onAppointmentMouseOut:function(m){var l=m.rawEvent.relatedTarget?m.rawEvent.relatedTarget:m.rawEvent.toElement;
if(!l){return;
}if($telerik.isDescendant(this._hoveredAppointmentElement,l)){return;
}var k=this.getAppointmentDomElement(m.eventMapTarget);
var j=$telerik.getElementByClassName(k,"rsAptDelete","a");
if(j){j.style.visibility="hidden";
}},_onCellClick:function(l){if(l.target.tagName.toUpperCase()=="TBODY"){return;
}var j=this._activeModel.getTimeSlotFromDomElement(l.target);
if(!j){return;
}var k=new b.SchedulerTimeSlotClickEventArgs(j.get_startTime(),j,l);
this.raise_timeSlotClick(k);
},_onCellContextMenu:function(l){var j=this._activeModel.getTimeSlotFromDomElement(l.target);
if(!j){return;
}var k=new b.SchedulerTimeSlotContextMenuEventArgs(j.get_startTime(),j.get_isAllDay(),l,j);
this.raise_timeSlotContextMenu(k);
},_onCellDoubleClick:function(l){if(!this.get_readOnly()&&this.get_allowInsert()){var j=this._activeModel.getTimeSlotFromDomElement(l.target);
var k=new b.SchedulerAppointmentInsertingEventArgs(j.get_startTime(),j.get_isAllDay(),j);
this.raise_appointmentInserting(k);
if(!k.get_cancel()){this.showInsertFormAt(j);
}}return false;
},_onAppointmentDeleteClick:function(k){if(!this.get_readOnly()){var j=this.getAppointmentFromDomElement(k.eventMapTarget);
this._deleteAppointment(j);
}k.preventDefault();
},_deleteAppointment:function(j){if(!j){return;
}var k={OnConfirm:this._onAppointmentDeleteCallback,Scheduler:this,Appointment:j,CallbackIsCalledFromDialog:true};
this._showDeleteConfirmationDialog(k);
},_showDeleteConfirmationDialog:function(m){if(m.Appointment._recurrenceState==1||m.Appointment._recurrenceState==2||m.Appointment._recurrenceState==3){var k=new b.SchedulerRecurrenceActionDialogShowingEventArgs(m.Appointment,b.RecurrenceAction.Delete);
this.raise_recurrenceActionDialogShowing(k);
if(k.get_cancel()){var n=k.get_editSeries();
if(n!==null){m.CallbackIsCalledFromDialog=false;
m.OnConfirm(n,m);
}}else{b.RecurrenceActionDialog.Show(b.RecurrenceAction.Delete,m);
}}else{if(this.get_displayDeleteConfirmation()){var j=this.get_localization();
var l=$telerik.$.modal("#"+this.get_element().id+">.rsTopWrap");
l.initialize().set_content({title:j.ConfirmDeleteTitle,content:j.ConfirmDeleteText,ok:j.ConfirmOK,cancel:j.ConfirmCancel}).set_onActionConfirm(function(){m.OnConfirm(false,m);
l.hide();
}).show();
}else{m.CallbackIsCalledFromDialog=false;
m.OnConfirm(false,m);
}}},_onAppointmentDeleteCallback:function(l,k){if(k.CallbackIsCalledFromDialog){var j=new b.SchedulerRecurrenceActionDialogClosedEventArgs(k.Appointment,b.RecurrenceAction.Delete,l);
k.Scheduler.raise_recurrenceActionDialogClosed(j);
}var m=new b.SchedulerAppointmentDeletingEventArgs(k.Appointment,l);
k.Scheduler.raise_appointmentDeleting(m);
if(!m.get_cancel()){k.Scheduler.deleteAppointment(k.Appointment,l);
}},_onPreviousDayClick:function(m){m.stopPropagation();
m.preventDefault();
var k=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.DisplayPreviousAppointmentSegment);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){return;
}var j=this.getAppointmentFromDomElement(m.eventMapTarget);
if(j){var l={Command:"GoToPrevious",AppointmentID:j._internalID};
this.postback(l);
}},_onNextDayClick:function(m){m.stopPropagation();
m.preventDefault();
var k=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.DisplayNextAppointmentSegment);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){return;
}var j=this.getAppointmentFromDomElement(m.eventMapTarget);
if(j){var l={Command:"GoToNext",AppointmentID:j._internalID};
this.postback(l);
}},_onDayViewTabClick:function(j){j.preventDefault();
var k=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToDayView);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(b.SchedulerViewType.DayView);
return;
}this.postback({Command:"SwitchToDayView"});
},_onWeekViewTabClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToWeekView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(b.SchedulerViewType.WeekView);
return;
}var k={Command:"SwitchToWeekView"};
this.postback(k);
},_onMonthViewTabClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToMonthView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(b.SchedulerViewType.MonthView);
return;
}var k={Command:"SwitchToMonthView"};
this.postback(k);
},_onTimelineViewTabClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToTimelineView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedView(b.SchedulerViewType.TimelineView);
return;
}var k={Command:"SwitchToTimelineView"};
this.postback(k);
},_onMultiDayViewTabClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToMultiDayView);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){return;
}var k={Command:"SwitchToMultiDayView"};
this.postback(k);
},_onPreviousSchedulerDayClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.NavigateToPreviousPeriod);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(this._activeModel.get_previousPeriodDate());
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.NavigateToPreviousPeriod));
return;
}var k={Command:"NavigateToPreviousPeriod"};
this.postback(k);
},_onNextSchedulerDayClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.NavigateToNextPeriod);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(this._activeModel.get_nextPeriodDate());
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.NavigateToNextPeriod));
return;
}var k={Command:"NavigateToNextPeriod"};
this.postback(k);
},_onTodayClick:function(m){m.preventDefault();
var j=f.getDate(new Date());
var k=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchToSelectedDay,j);
this.raiseEvent("NavigationCommand",k);
if(k.get_cancel()){return;
}if(this._renderingManager){this.set_selectedDate(j);
this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.SwitchToSelectedDay));
return;
}var l={Command:"GoToToday"};
this.postback(l);
},_onFullTimeLinkClick:function(l){l.preventDefault();
var j=new h.NavigationCommandEventArgs(b.SchedulerNavigationCommand.SwitchFullTime);
this.raiseEvent("NavigationCommand",j);
if(j.get_cancel()){return;
}if(this._renderingManager){if(!this.get_activeModel()._isVertical){this.set_showFullTime(!this.get_showFullTime());
}this.raiseEvent("NavigationComplete",new h.NavigationCompleteEventArgs(b.SchedulerNavigationCommand.SwitchFullTime));
return;
}var k={Command:"SwitchFullTime"};
this.postback(k);
},postback:function(k){this._onContentScroll();
var j=this.get_postBackReference().replace("arguments",Sys.Serialization.JavaScriptSerializer.serialize(k));
eval(j);
},_getElementIndex:function(l,j){if(!l){return;
}for(var k=0;
k<l.length;
k++){if(l[k]===j){return k;
}}return -1;
},_getInlineTemplate:function(){if(!this._inlineTemplate){this._inlineTemplate=new b.InlineTemplate(this.get_element(),this.get_localization(),this._advancedFormSettings.enabled,this.get_minimumInlineFormWidth(),this.get_minimumInlineFormHeight());
var k=d("#"+this.get_element().id+" .rsAptEditSizingWrapper");
if(k.length){this._inlineTemplate.attachTo(k[0]);
}var j=Function.createDelegate(this,this._inlineFormSaveClicked);
this._inlineTemplate.add_saveClicked(j);
var l=Function.createDelegate(this,this._inlineFormMoreClicked);
this._inlineTemplate.add_moreClicked(l);
}return this._inlineTemplate;
},_inlineFormSaveClicked:function(j){var k=this._extractAppointmentFromInlineTemplate(j);
if(j.get_isInsert()){this.insertAppointment(k);
}else{this.updateAppointment(k,j.get_editSeries());
}},_inlineFormMoreClicked:function(j){var k=this._extractAppointmentFromInlineTemplate(j);
if(j.get_isInsert()){this._showAdvancedInsertForm(k);
}else{this.showAdvancedEditForm(k,j.get_editSeries());
}},_extractAppointmentFromInlineTemplate:function(k){var j=k.get_element();
if(j.originalParent){j=j.originalParent;
}var m=new b.SchedulerAppointment();
m._internalID=k.get_appointmentInternalID();
if(k.get_isInsert()){var l=this._activeModel.getTimeSlotFromDomElement(j);
if(l.get_resource){m.get_resources().add(l.get_resource());
}}else{var n=this.get_appointments().find(function(o){return o.get_internalID()==m.get_internalID();
});
if(this._renderingManager){m=this.prepareToEdit(n,k.get_editSeries());
}else{n.get_resources().forEach(function(o){m.get_resources().add(o);
});
}}m.set_subject(k.get_text());
m.set_start(k.get_start());
m.set_end(k.get_end());
return m;
},_showAdvancedInsertForm:function(j,k,l){if(this._renderingManager){this._showAdvancedFormWrapper(d("div.rsAdvancedInsertWrapper",this.get_element()));
this._advancedTemplate=this._getAdvancedInsertTemplate();
this._fireFormCreated(j,b.SchedulerFormMode.AdvancedInsert);
if(this._advancedTemplate){this._advancedTemplate.populate(j,true);
}return;
}var m={command:"AdvancedInsert",appointment:this._getSerializableAppointment(j),startDate:j.get_start().format("yyyyMMddHHmm"),endDate:j.get_end().format("yyyyMMddHHmm")};
if(k){m.command="AdvancedInsertRecurring";
m.targetSlotIndex=l.get_index();
}this.postback(m);
},_getAdvancedInsertTemplate:function(){if(!this._advancedInsertTemplate&&this._useDefaultAdvancedInsert){var l=this.get_element();
var k=d("div.rsAdvancedInsertWrapper div.rsAdvancedEdit",this.get_element());
var j=this.get_advancedFormSettings().modal;
this._advancedInsertTemplate=new b.Scheduling.AdvancedTemplate(l,k,j);
this._advancedInsertTemplate.initialize();
}return this._advancedInsertTemplate;
},_getAdvancedEditTemplate:function(){if(!this._advancedEditTemplate&&this._useDefaultAdvancedEdit){var l=this.get_element();
var k=d("div.rsAdvancedEditWrapper div.rsAdvancedEdit",this.get_element());
var j=this.get_advancedFormSettings().modal;
this._advancedEditTemplate=new b.Scheduling.AdvancedTemplate(l,k,j);
this._advancedEditTemplate.initialize();
}return this._advancedEditTemplate;
},_showAdvancedFormWrapper:function(k){if(k.parent().is(".RadScheduler")){return;
}this.hideInlineForm();
this.hideAdvancedForm();
var j=this.get_element();
d(j).append(k);
if(this._advancedFormSettings.modal){k.css("position","static");
this._makeModal(d("div.rsAdvancedEdit",k)[0]);
}else{d("div.rsTopWrap",j).hide();
}},_makeModal:function(j){if(!this._advancedFormSettings.modal){return;
}this._popupDialog=d.popupDialog(j,d(".rsAdvInnerTitle",j)[0],this._advancedFormSettings);
d(".rsAdvFormWrap",this.get_element()).css({display:"block"});
this._popupDialog.show();
if(this._popupDialog.legacyPositioning()){this.get_element().style.overflow="visible";
}},_getModelFactory:function(j){switch(j){case b.SchedulerViewType.DayView:return new b.Scheduler.DayModelFactory(this);
case b.SchedulerViewType.WeekView:return new b.Scheduler.WeekModelFactory(this);
case b.SchedulerViewType.MonthView:return new b.Scheduler.MonthModelFactory(this);
case b.SchedulerViewType.TimelineView:return new b.Scheduler.TimelineModelFactory(this);
case b.SchedulerViewType.MultiDayView:return new b.Scheduler.MultiDayModelFactory(this);
}},_setIndicatorState:function(k){var j=[],l=[];
d.each(k,function(m){j[m]=(this==1||this==3)?1:0;
l[m]=(this==2||this==3)?1:0;
});
this._aptTopIndicators=j;
this._aptBottomIndicators=l;
this._updateHiddenAppointmentsIndicator(this._aptTopIndicators,"top");
this._updateHiddenAppointmentsIndicator(this._aptBottomIndicators,"bottom");
},_updateHiddenAppointmentsIndicator:function(m,j){var l=j=="top"?"rsTopIndicator":"rsBottomIndicator";
this._removeIndicatorsTable(l);
for(var k=0;
k<m.length;
k++){if(m[k]>0){this._createIndicatorsTable(m,l);
return;
}}},_createIndicatorsTable:function(l,o){var n=d(".rsTopWrap .rsContentScrollArea",this.get_element());
var m=new Telerik.Web.StringBuilder();
m.append("<table cellspacing='0' cellpadding='0' border='0' class='rsArrowContainer ").append(o).append("'><tr>");
for(var j=0;
j<l.length;
j++){m.append("<td>");
if(l[j]>0){m.append("<div class='rsArrowWrap'><a class='rsOvertimeArrow' href='#' /></div>");
}m.append("</td>");
}m.append("</tr></table>");
var k=d(m.toString()).width(n.find(".rsContentTable").width());
n.append(k);
},_removeIndicatorsTable:function(j){d(".rsTopWrap .rsContentScrollArea table."+j,this.get_element()).remove();
},add_appointmentClick:function(j){this.get_events().addHandler("AppointmentClick",j);
},remove_appointmentClick:function(j){this.get_events().removeHandler("AppointmentClick",j);
},raise_appointmentClick:function(j){this.raiseEvent("AppointmentClick",j);
},add_appointmentInserting:function(j){this.get_events().addHandler("AppointmentInserting",j);
},remove_appointmentInserting:function(j){this.get_events().removeHandler("AppointmentInserting",j);
},raise_appointmentInserting:function(j){this.raiseEvent("AppointmentInserting",j);
},add_appointmentDoubleClick:function(j){this.get_events().addHandler("AppointmentDoubleClick",j);
},remove_appointmentDoubleClick:function(j){this.get_events().removeHandler("AppointmentDoubleClick",j);
},raise_appointmentDoubleClick:function(j){this.raiseEvent("AppointmentDoubleClick",j);
},add_appointmentResizeStart:function(j){this.get_events().addHandler("AppointmentResizeStart",j);
},remove_appointmentResizeStart:function(j){this.get_events().removeHandler("AppointmentResizeStart",j);
},raise_appointmentResizeStart:function(j){this.raiseEvent("AppointmentResizeStart",j);
},add_appointmentResizeEnd:function(j){this.get_events().addHandler("AppointmentResizeEnd",j);
},remove_appointmentResizeEnd:function(j){this.get_events().removeHandler("AppointmentResizeEnd",j);
},raise_appointmentResizeEnd:function(j){this.raiseEvent("AppointmentResizeEnd",j);
},add_appointmentResizing:function(j){this.get_events().addHandler("AppointmentResizing",j);
},remove_appointmentResizing:function(j){this.get_events().removeHandler("AppointmentResizing",j);
},raise_appointmentResizing:function(j){this.raiseEvent("AppointmentResizing",j);
},add_appointmentDeleting:function(j){this.get_events().addHandler("AppointmentDeleting",j);
},remove_appointmentDeleting:function(j){this.get_events().removeHandler("AppointmentDeleting",j);
},raise_appointmentDeleting:function(j){this.raiseEvent("AppointmentDeleting",j);
},add_timeSlotClick:function(j){this.get_events().addHandler("TimeSlotClick",j);
},remove_timeSlotClick:function(j){this.get_events().removeHandler("TimeSlotClick",j);
},raise_timeSlotClick:function(j){this.raiseEvent("TimeSlotClick",j);
},add_appointmentEditing:function(j){this.get_events().addHandler("AppointmentEditing",j);
},remove_appointmentEditing:function(j){this.get_events().removeHandler("AppointmentEditing",j);
},raise_appointmentEditing:function(j){this.raiseEvent("AppointmentEditing",j);
},add_appointmentMoveStart:function(j){this.get_events().addHandler("appointmentMoveStart",j);
},remove_appointmentMoveStart:function(j){this.get_events().removeHandler("appointmentMoveStart",j);
},add_appointmentMoving:function(j){this.get_events().addHandler("appointmentMoving",j);
},remove_appointmentMoving:function(j){this.get_events().removeHandler("appointmentMoving",j);
},add_appointmentMoveEnd:function(j){this.get_events().addHandler("appointmentMoveEnd",j);
},remove_appointmentMoveEnd:function(j){this.get_events().removeHandler("appointmentMoveEnd",j);
},add_recurrenceActionDialogShowing:function(j){this.get_events().addHandler("RecurrenceActionDialogShowing",j);
},remove_recurrenceActionDialogShowing:function(j){this.get_events().removeHandler("RecurrenceActionDialogShowing",j);
},raise_recurrenceActionDialogShowing:function(j){this.raiseEvent("RecurrenceActionDialogShowing",j);
},add_recurrenceActionDialogClosed:function(j){this.get_events().addHandler("RecurrenceActionDialogClosed",j);
},remove_recurrenceActionDialogClosed:function(j){this.get_events().removeHandler("RecurrenceActionDialogClosed",j);
},raise_recurrenceActionDialogClosed:function(j){this.raiseEvent("RecurrenceActionDialogClosed",j);
},add_formCreated:function(j){this.get_events().addHandler("FormCreated",j);
},remove_formCreated:function(j){this.get_events().removeHandler("FormCreated",j);
},raise_formCreated:function(j){this.raiseEvent("FormCreated",j);
},add_appointmentContextMenu:function(j){this.get_events().addHandler("AppointmentContextMenu",j);
},remove_appointmentContextMenu:function(j){this.get_events().removeHandler("AppointmentContextMenu",j);
},raise_appointmentContextMenu:function(j){this.raiseEvent("AppointmentContextMenu",j);
},add_timeSlotContextMenu:function(j){this.get_events().addHandler("TimeSlotContextMenu",j);
},remove_timeSlotContextMenu:function(j){this.get_events().removeHandler("TimeSlotContextMenu",j);
},raise_timeSlotContextMenu:function(j){this.raiseEvent("TimeSlotContextMenu",j);
},add_appointmentsPopulating:function(j){this.get_events().addHandler("AppointmentsPopulating",j);
},remove_appointmentsPopulating:function(j){this.get_events().removeHandler("AppointmentsPopulating",j);
},_raiseAppointmentsPopulating:function(j){this.raiseEvent("AppointmentsPopulating",j);
},add_appointmentsPopulated:function(j){this.get_events().addHandler("AppointmentsPopulated",j);
},remove_appointmentsPopulated:function(j){this.get_events().removeHandler("AppointmentsPopulated",j);
},_raiseAppointmentsPopulated:function(){this.raiseEvent("AppointmentsPopulated",Sys.EventArgs.Empty);
},add_appointmentDataBound:function(j){this.get_events().addHandler("AppointmentDataBound",j);
},remove_appointmentDataBound:function(j){this.get_events().removeHandler("AppointmentDataBound",j);
},_raiseAppointmentDataBound:function(j){this.raiseEvent("AppointmentDataBound",j);
},add_appointmentCreated:function(j){this.get_events().addHandler("AppointmentCreated",j);
},remove_appointmentCreated:function(j){this.get_events().removeHandler("AppointmentCreated",j);
},_raiseAppointmentCreated:function(j){this.raiseEvent("AppointmentCreated",new b.AppointmentEventArgs(j));
},add_resourcesPopulating:function(j){this.get_events().addHandler("ResourcesPopulating",j);
},remove_resourcesPopulating:function(j){this.get_events().removeHandler("ResourcesPopulating",j);
},_raiseResourcesPopulating:function(j){this.raiseEvent("ResourcesPopulating",j);
},add_resourcesPopulated:function(j){this.get_events().addHandler("ResourcesPopulated",j);
},remove_resourcesPopulated:function(j){this.get_events().removeHandler("ResourcesPopulated",j);
},_raiseResourcesPopulated:function(){this.raiseEvent("ResourcesPopulated",Sys.EventArgs.Empty);
},add_dataBound:function(j){this.get_events().addHandler("DataBound",j);
},remove_dataBound:function(j){this.get_events().removeHandler("DataBound",j);
},_raiseDataBound:function(){this.raiseEvent("DataBound",Sys.EventArgs.Empty);
},add_requestFailed:function(j){this.get_events().addHandler("RequestFailed",j);
},remove_requestFailed:function(j){this.get_events().removeHandler("RequestFailed",j);
},_raiseRequestFailed:function(j){this.raiseEvent("RequestFailed",j);
},add_requestSuccess:function(j){this.get_events().addHandler("RequestSuccess",j);
},remove_requestSuccess:function(j){this.get_events().removeHandler("RequestSuccess",j);
},_raiseRequestSuccess:function(j){this.raiseEvent("RequestSuccess",j);
},add_appointmentWebServiceInserting:function(j){this.get_events().addHandler("AppointmentWebServiceInserting",j);
},remove_appointmentWebServiceInserting:function(j){this.get_events().removeHandler("AppointmentWebServiceInserting",j);
},_raiseAppointmentWebServiceInserting:function(j){this.raiseEvent("AppointmentWebServiceInserting",j);
},add_appointmentWebServiceDeleting:function(j){this.get_events().addHandler("AppointmentWebServiceDeleting",j);
},remove_appointmentWebServiceDeleting:function(j){this.get_events().removeHandler("AppointmentWebServiceDeleting",j);
},_raiseAppointmentWebServiceDeleting:function(j){this.raiseEvent("AppointmentWebServiceDeleting",j);
},add_appointmentWebServiceUpdating:function(j){this.get_events().addHandler("AppointmentWebServiceUpdating",j);
},remove_appointmentWebServiceUpdating:function(j){this.get_events().removeHandler("AppointmentWebServiceUpdating",j);
},_raiseAppointmentWebServiceUpdating:function(j){this.raiseEvent("AppointmentWebServiceUpdating",j);
},add_recurrenceExceptionCreating:function(j){this.get_events().addHandler("RecurrenceExceptionCreating",j);
},remove_recurrenceExceptionCreating:function(j){this.get_events().removeHandler("RecurrenceExceptionCreating",j);
},_raiseRecurrenceExceptionCreating:function(j){this.raiseEvent("RecurrenceExceptionCreating",j);
},add_recurrenceExceptionsRemoving:function(j){this.get_events().addHandler("RecurrenceExceptionsRemoving",j);
},remove_recurrenceExceptionsRemoving:function(j){this.get_events().removeHandler("RecurrenceExceptionsRemoving",j);
},_raiseRecurrenceExceptionsRemoving:function(j){this.raiseEvent("RecurrenceExceptionsRemoving",j);
},add_navigationCommand:function(j){this.get_events().addHandler("NavigationCommand",j);
},remove_navigationCommand:function(j){this.get_events().removeHandler("NavigationCommand",j);
},add_navigationComplete:function(j){this.get_events().addHandler("NavigationComplete",j);
},remove_navigationComplete:function(j){this.get_events().removeHandler("NavigationComplete",j);
}};
d.registerControlProperties(b.RadScheduler,{shouldPostbackOnAppointmentContextMenuItemClick:false,shouldPostbackOnTimeSlotContextMenuItemClick:false,appointmentContextMenuIDs:[],timeSlotContextMenuIDs:[]});
d.registerControlEvents(b.RadScheduler,["appointmentSerialized","appointmentContextMenuItemClicking","appointmentContextMenuItemClicked","timeSlotContextMenuItemClicking","timeSlotContextMenuItemClicked"]);
b.RadScheduler.registerClass("Telerik.Web.UI.RadScheduler",b.RadWebControl);
})();
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RecurrenceAction=function(){};
Telerik.Web.UI.RecurrenceAction.prototype={Edit:1,Delete:2,Resize:3,Move:4};
Telerik.Web.UI.RecurrenceAction.registerEnum("Telerik.Web.UI.RecurrenceAction");
(function(a){Telerik.Web.UI.RecurrenceActionDialog=function(){};
Telerik.Web.UI.RecurrenceActionDialog.Show=function(b,i){var c=i.Scheduler.get_localization();
var f="";
var h="";
var e="";
switch(b){case Telerik.Web.UI.RecurrenceAction.Delete:f=c.ConfirmRecurrenceDeleteOccurrence;
h=c.ConfirmRecurrenceDeleteSeries;
e=c.ConfirmRecurrenceDeleteTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Edit:f=c.ConfirmRecurrenceEditOccurrence;
h=c.ConfirmRecurrenceEditSeries;
e=c.ConfirmRecurrenceEditTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Resize:f=c.ConfirmRecurrenceResizeOccurrence;
h=c.ConfirmRecurrenceResizeSeries;
e=c.ConfirmRecurrenceResizeTitle;
break;
case Telerik.Web.UI.RecurrenceAction.Move:f=c.ConfirmRecurrenceMoveOccurrence;
h=c.ConfirmRecurrenceMoveSeries;
e=c.ConfirmRecurrenceMoveTitle;
break;
}var d=a.modal("#"+i.Scheduler.get_element().id+">.rsTopWrap");
var g=['<label><input type="radio" id="choiceOccurrenceSpan_0" name="choiceOccurrenceSpan" value="occurrence" checked="checked" />',f,"</label>",'<label><input type="radio" id="choiceOccurrenceSpan_1" name="choiceOccurrenceSpan" value="series" />',h,"</label>"];
d.initialize().set_content({title:e,content:g.join(""),ok:c.ConfirmOK,cancel:c.ConfirmCancel}).set_onActionConfirm(function(l,j){var k=a(d.get_element()).find("input[name=choiceOccurrenceSpan]:checked").val()=="series";
i.OnConfirm(k,i);
d.dispose();
}).set_onActionCancel(function(){if(i.OnCancel){i.OnCancel(i);
}d.dispose();
}).show();
};
})($telerik.$);
Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.SchedulerResource=function(a){this._attributes=new Telerik.Web.UI.SchedulerAttributeCollection(this);
if(a){this._key=a.key;
this._type=a.type;
this._text=a.text;
this._internalKey=a.internalKey;
this._available=a.available;
this._cssClass=a.cssClass;
if(typeof(a.attributes)!="undefined"){this._attributes._load(a.attributes);
}}};
Telerik.Web.UI.SchedulerResource.prototype={get_key:function(){return this._key;
},set_key:function(a){this._key=a;
},get_type:function(){return this._type;
},set_type:function(a){this._type=a;
},get_text:function(){return this._text;
},set_text:function(a){this._text=a;
},get_available:function(){return this._available;
},set_available:function(a){this._available=a;
},get_cssClass:function(){return this._cssClass;
},set_cssClass:function(a){this._cssClass=a;
},_getInternalKey:function(){return this._internalKey;
},get_attributes:function(){return this._attributes;
}};
Telerik.Web.UI.SchedulerResource.registerClass("Telerik.Web.UI.SchedulerResource");
Type.registerNamespace("Telerik.Web.UI");
(function(){var a=Telerik.Web.UI;
a.SchedulerResourceCollection=function(){this._array=new Array();
};
a.SchedulerResourceCollection.prototype={add:function(c){var b=this._array.length;
this.insert(b,c);
},insert:function(b,c){Array.insert(this._array,b,c);
},remove:function(b){Array.remove(this._array,b);
},removeAt:function(b){var c=this.getResource(b);
if(c){this.remove(c);
}},indexOf:function(d){for(var b=0,c=this._array.length;
b<c;
b++){if(this._array[b]===d){return b;
}}return -1;
},removeResourcesByType:function(c){var b=this;
this.getResourcesByType(c).forEach(function(d){b.remove(d);
});
},clear:function(){this._array=new Array();
},get_count:function(){return this._array.length;
},forEach:function(d){for(var c=0,b=this.get_count();
c<b;
c++){d(this.getResource(c));
}},getResource:function(b){return this._array[b];
},getResourcesByType:function(b){return this.findAll(function(c){return c.get_type()==b;
});
},getResourceByType:function(d){for(var c=0,b=this.get_count();
c<b;
c++){var e=this.getResource(c);
if(e.get_type()==d){return e;
}}return null;
},findAll:function(c){var b=new a.SchedulerResourceCollection();
this.forEach(function(d){if(c(d)){b.add(d);
}});
return b;
},getResourceByTypeAndKey:function(c,b){return this.findAll(function(d){return d.get_type()==c&&d.get_key()==b;
}).getResource(0)||null;
},clone:function(){var b=new a.SchedulerResourceCollection();
this.forEach(function(c){b.add(c);
});
return b;
}};
a.SchedulerResourceCollection.registerClass("Telerik.Web.UI.SchedulerResourceCollection");
}());
(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
a.ResourceType=function(b){if(b){this._name=b.name;
this._allowMultipleValues=b.allowMultipleValues||false;
}};
a.ResourceType.prototype={get_name:function(){return this._name;
},set_name:function(b){this._name=b;
},get_allowMultipleValues:function(){return this._allowMultipleValues;
},set_allowMultipleValues:function(b){this._allowMultipleValues=b;
}};
a.ResourceType.registerClass("Telerik.Web.UI.ResourceType");
})();
(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
a.ResourceTypeCollection=function(){this._array=[];
};
a.ResourceTypeCollection.prototype={add:function(c){var b=this._array.length;
this.insert(b,c);
},insert:function(b,c){Array.insert(this._array,b,c);
},remove:function(b){Array.remove(this._array,b);
},removeAt:function(b){var c=this.getResourceType(b);
if(c){this.remove(c);
}},clear:function(){this._array=[];
},get_count:function(){return this._array.length;
},forEach:function(d){for(var c=0,b=this.get_count();
c<b;
c++){d(this.getResourceType(c));
}},getResourceType:function(b){return this._array[b];
},getResourceTypeByName:function(b){return this.findAll(function(c){return c.get_name()==b;
}).getResourceType(0)||null;
},findAll:function(c){var b=new a.ResourceTypeCollection();
this.forEach(function(d){if(c(d)){b.add(d);
}});
return b;
}};
a.ResourceTypeCollection.registerClass("Telerik.Web.UI.ResourceTypeCollection");
}());
Type.registerNamespace("Telerik.Web.UI");
(function(){var a=Telerik.Web.UI;
a.SchedulerAttributeCollection=function(){this._data={};
this._keys=[];
};
a.SchedulerAttributeCollection.prototype={getAttribute:function(b){return this._data[b];
},setAttribute:function(d,b){this._add(d,b);
var c={};
c[d]=b;
},forEach:function(e){for(var c=0,b=this.get_count();
c<b;
c++){var d=this._keys[c];
e(d,this.getAttribute(d));
}},removeAttribute:function(b){Array.remove(this._keys,b);
delete this._data[b];
},get_count:function(){return this._keys.length;
},clear:function(){this._data={};
this._keys=[];
},clone:function(){var b=new a.SchedulerAttributeCollection();
this.forEach(function(c,d){b.setAttribute(c,d);
});
return b;
},_add:function(b,c){if(Array.indexOf(this._keys,b)<0){Array.add(this._keys,b);
}this._data[b]=c;
},_load:function(b){for(var c in b){this._add(c,b[c]);
}}};
a.SchedulerAttributeCollection.registerClass("Telerik.Web.UI.SchedulerAttributeCollection");
}());
Type.registerNamespace("Telerik.Web.UI");
Type.registerNamespace("Telerik.Web.UI.Scheduler.Views");
(function(a,b){a.ModelFactory=function(c){this._owner=c;
};
a.ModelFactory.prototype={createModel:function(){throw Error.notImplemented();
},_getGroupBy:function(){throw Error.notImplemented();
},_getGroupByDate:function(){return/^\s*date\s*/i.test(this._getGroupBy());
},_getGroupingResourceName:function(){var d=this._getGroupBy();
if(d.trim().toLowerCase()=="date"){throw Error.argument("groupBy","groupBy property should be in one of the following formats: <[Resource name]> or <Date,[Resource name]>. Using only <Date> is not allowed. ");
}var c=d.split(",");
if(c.length>2){throw Error.argument("groupBy","GroupBy property should be in one of the following formats: <[Resource name]> or <Date,[Resource name]> ");
}if(this._getGroupByDate()){if(c.length==2){return c[1].trim();
}return"";
}return c[0].trim();
},_getEnableGrouping:function(){return this._getGroupBy()!="";
}};
a.ModelFactory.registerClass("Telerik.Web.UI.Scheduler.ModelFactory");
a.DayModelFactory=function(c){a.DayModelFactory.initializeBase(this,[c]);
};
a.DayModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_dayViewSettings().isVertical||false;
if(this._getGroupByDate()){c=false;
}return new a.ResourceGroupedDayModel(this._owner,this._getGroupingResourceName(),c);
}return new a.DayModel(this._owner);
},_getGroupBy:function(){return this._owner.get_dayViewSettings().groupBy||"";
}};
a.DayModelFactory.registerClass("Telerik.Web.UI.Scheduler.DayModelFactory",a.ModelFactory);
a.WeekModelFactory=function(c){a.WeekModelFactory.initializeBase(this,[c]);
};
a.WeekModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_weekViewSettings().isVertical||false;
if(this._getGroupByDate()){return new a.DateGroupedWeekModel(this._owner,this._getGroupingResourceName(),c);
}else{return new a.ResourceGroupedWeekModel(this._owner,this._getGroupingResourceName(),c);
}}return new a.WeekModel(this._owner);
},_getGroupBy:function(){return this._owner.get_weekViewSettings().groupBy||"";
}};
a.WeekModelFactory.registerClass("Telerik.Web.UI.Scheduler.WeekModelFactory",a.ModelFactory);
a.MultiDayModelFactory=function(c){a.MultiDayModelFactory.initializeBase(this,[c]);
};
a.MultiDayModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_multiDayViewSettings().isVertical||false;
if(this._getGroupByDate()){return new a.DateGroupedMultiDayModel(this._owner,this._getGroupingResourceName(),c);
}else{return new a.ResourceGroupedMultiDayModel(this._owner,this._getGroupingResourceName(),c);
}}return new a.MultiDayModel(this._owner);
},_getGroupBy:function(){return this._owner.get_multiDayViewSettings().groupBy||"";
}};
a.MultiDayModelFactory.registerClass("Telerik.Web.UI.Scheduler.MultiDayModelFactory",a.ModelFactory);
a.MonthModelFactory=function(c){a.MonthModelFactory.initializeBase(this,[c]);
};
a.MonthModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_monthViewSettings().isVertical||false;
if(this._getGroupByDate()){return new b.Month.GroupedByDate.Model(this._owner,this._getGroupingResourceName(),c);
}else{return new b.Month.GroupedByResource.Model(this._owner,this._getGroupingResourceName(),c);
}}return new b.Month.Model(this._owner);
},_getGroupBy:function(){return this._owner.get_monthViewSettings().groupBy||"";
}};
a.MonthModelFactory.registerClass("Telerik.Web.UI.Scheduler.MonthModelFactory",a.ModelFactory);
a.TimelineModelFactory=function(c){a.TimelineModelFactory.initializeBase(this,[c]);
};
a.TimelineModelFactory.prototype={createModel:function(){if(this._getEnableGrouping()){var c=this._owner.get_timelineViewSettings().isVertical||false;
if(this._getGroupByDate()){return new b.Timeline.GroupedByDate.Model(this._owner,this._getGroupingResourceName(),c);
}else{return new b.Timeline.GroupedByResource.Model(this._owner,this._getGroupingResourceName(),c);
}}return new b.Timeline.Model(this._owner);
},_getGroupBy:function(){return this._owner.get_timelineViewSettings().groupBy||"";
}};
a.TimelineModelFactory.registerClass("Telerik.Web.UI.Scheduler.TimelineModelFactory",a.ModelFactory);
})(Telerik.Web.UI.Scheduler,Telerik.Web.UI.Scheduler.Views);
(function(){var a=Telerik.Web.UI;
var b;
a.SchedulerWebServiceSettings=function(c){a.SchedulerWebServiceSettings.initializeBase(this,[c]);
if(!this._method){this._method="GetAppointments";
}if(c.deleteAppointmentMethod!=b){this._deleteAppointmentMethod=c.deleteAppointmentMethod;
}else{this._deleteAppointmentMethod="DeleteAppointment";
}if(c.insertAppointmentMethod!=b){this._insertAppointmentMethod=c.insertAppointmentMethod;
}else{this._insertAppointmentMethod="InsertAppointment";
}if(c.updateAppointmentMethod!=b){this._updateAppointmentMethod=c.updateAppointmentMethod;
}else{this._updateAppointmentMethod="UpdateAppointment";
}if(c.getResourcesMethod!=b){this._getResourcesMethod=c.getResourcesMethod;
}else{this._getResourcesMethod="GetResources";
}if(c.createRecurrenceExceptionMethod!=b){this._createRecurrenceExceptionMethod=c.createRecurrenceExceptionMethod;
}else{this._createRecurrenceExceptionMethod="CreateRecurrenceException";
}if(c.removeRecurrenceExceptionsMethod!=b){this._removeRecurrenceExceptionsMethod=c.removeRecurrenceExceptionsMethod;
}else{this._removeRecurrenceExceptionsMethod="RemoveRecurrenceExceptions";
}if(c.resourcesPopulated!=b){this._resourcesPopulated=c.resourcesPopulated;
}else{this._resourcesPopulated=true;
}};
a.SchedulerWebServiceSettings.prototype={get_getAppointmentsMethod:function(){return this._method;
},set_getAppointmentsMethod:function(c){this._method=c;
},get_deleteAppointmentMethod:function(){return this._deleteAppointmentMethod;
},set_deleteAppointmentMethod:function(c){this._deleteAppointmentMethod=c;
},get_insertAppointmentMethod:function(){return this._insertAppointmentMethod;
},set_insertAppointmentMethod:function(c){this._insertAppointmentMethod=c;
},get_updateAppointmentMethod:function(){return this._updateAppointmentMethod;
},set_updateAppointmentMethod:function(c){this._updateAppointmentMethod=c;
},get_getResourcesMethod:function(){return this._getResourcesMethod;
},set_getResourcesMethod:function(c){this._getResourcesMethod=c;
},get_createRecurrenceExceptionMethod:function(){return this._createRecurrenceExceptionMethod;
},set_createRecurrenceExceptionMethod:function(c){this._createRecurrenceExceptionMethod=c;
},get_removeRecurrenceExceptionsMethod:function(){return this._removeRecurrenceExceptionsMethod;
},set_removeRecurrenceExceptionsMethod:function(c){this._removeRecurrenceExceptionsMethod=c;
},get_resourcesPopulated:function(){return this._resourcesPopulated;
},set_resourcesPopulated:function(c){this._resourcesPopulated=c;
},get_isEmpty:function(){return a.SchedulerWebServiceSettings.callBaseMethod(this,"get_isEmpty");
}};
a.SchedulerWebServiceSettings.registerClass("Telerik.Web.UI.SchedulerWebServiceSettings",a.WebServiceSettings);
})();
Type.registerNamespace("Telerik.Web.UI");
(function(a){a.ISchedulerModel=function(){};
a.ISchedulerModel.prototype={getTimeSlotFromDomElement:function(b){throw Error.notImplemented();
},getTimeSlotForAppointment:function(b){throw Error.notImplemented();
},updateResizingAppointmentSize:function(b,c){},get_visibleRangeStart:function(){throw Error.notImplemented();
},get_visibleRangeEnd:function(){throw Error.notImplemented();
}};
a.ISchedulerModel.registerInterface("Telerik.Web.UI.ISchedulerModel");
a.ISchedulerTimeSlot=function(){};
a.ISchedulerTimeSlot.prototype={get_index:function(){throw Error.notImplemented();
},get_isAllDay:function(){throw Error.notImplemented();
},get_startTime:function(){throw Error.notImplemented();
},get_endTime:function(){throw Error.notImplemented();
},get_duration:function(){throw Error.notImplemented();
},get_durationInMinutes:function(){throw Error.notImplemented();
},get_domElement:function(){throw Error.notImplemented();
}};
a.ISchedulerTimeSlot.registerInterface("Telerik.Web.UI.ISchedulerTimeSlot");
})(Telerik.Web.UI);

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();