
// This library contains functions to help with the callback functionality

function YT_CalendarDaySelected(calObj, renderDay)
{
    
}

function ToggleCalendar(calContID, calBlockID, ifCalenderID, calenderPage, event)
{
    var calendarEl = eval(calContID);
    if (!calendarEl.isVisible())
    {   
        HideAllCalendars();
        calendarEl.show();
        
        if (typeof(CalendarPopupOpened) != 'undefined') CalendarPopupOpened(calContID);
        if (typeof(FlightsCalendarPopupOpened) != 'undefined') FlightsCalendarPopupOpened(calContID);
        if (typeof(CarsCalendarPopupOpened) != 'undefined') CarsCalendarPopupOpened(calContID);
        if (typeof(HotelsCalendarPopupOpened) != 'undefined') HotelsCalendarPopupOpened(calContID);
        if (typeof(AvailabilityCalendarPopupOpened) != 'undefined') AvailabilityCalendarPopupOpened(calContID);
        if (typeof(TravelInsuranceCalendarPopupOpened) != 'undefined') TravelInsuranceCalendarPopupOpened(calContID);
                        
    }
    else
    {   
        calendarEl.hide();
    }
}

function HideCalendar(calContID, calBlockID, ifCalenderID)
{
    var calObj = eval(calContID);
    if (typeof(calObj) != 'undefined')
    {
        calObj.hide();
    }
}

function HideAllCalendars()
{
    HideAllAirtradeCalendars();
}

//CQS.Common.addEvent(window, 'resize', function(){ HideAllCalendars(); });
