var giIntervalHeight = 17;
var oSchedule = new schedule(giIntervalHeight, iMedica.AppointmentSlot.Display24HoursView, iMedica.AppointmentSlot.DefaultColorScheme);

function fnInit()
{
	iMedica.AppointmentSlot.Init(myBody);
}

function SetSingleCalendar(str)
{
	oSchedule.setSingleCalendar(str, 0);
}

function LoadXmlDayObject(sXmlDay)
{
	var iDayOfWeek = parseInt(sXmlDay, 10);
	oSchedule.drawDayCustomize(document.all['scheduleDay' + sXmlDay], iDayOfWeek, sXmlDay);	
}

function ConfigureApptSlot(iDay, iTimeSlot, sApptTypeUid)
{
	var iHour = iTimeSlot * iMedica.Calendar.DisplayInterval / 60;
	var iMinute = iTimeSlot * iMedica.Calendar.DisplayInterval % 60;
	if (!iMedica.AppointmentSlot.Display24HoursView)
		iHour += oSchedule.iStartHr;
	var dApptDateTime = new Date();
	dApptDateTime.setHours(Math.floor(iHour));
	dApptDateTime.setMinutes(iMinute);	

	if (iMedica.AppointmentSlot.ConfigureSlot(sApptTypeUid, getXMLFormattedDateTime(dApptDateTime), iDay))
		iMedica.AppointmentSlot.LoadCalendar();
}

function ConfigureCalendarTimeSlot(sCalendarTimeSlotUid)
{
	if (iMedica.AppointmentSlot.ConfigureCalendarTimeSlot(sCalendarTimeSlotUid))
		iMedica.AppointmentSlot.LoadCalendar();
}