var CREATED_CALENDAR=false;
var oTextBox = '';

function hideCalendar(pDateString)  {

    oTextBox.value = pDateString;
    
    calendar_container.style.display = 'none';
}
function showCalendar(pTextbox)  {

    oTextBox = eval(pTextbox);
    
	if ( !CREATED_CALENDAR )  {
		CREATED_CALENDAR=true;
		Calendar.setup( { inputField : pTextbox,
                          ifFormat   : "%m/%d/%Y",
                          flat       : "calendar_container",
                          flatCallback : dateChanged   } ); 
    }

	calendar_container.style.pixelLeft =  (window.event.screenX + 10);
    calendar_container.style.pixelTop =  465 //(window.event.screenY);	
    calendar_container.style.display = 'block';
}
function checkData(pDate)  {

    var oDate;
    var arrDate = pDate.split(",");

    for (var i=0; i<arrDate.length; i++)
    {
        oDate = eval(arrDate[i]);
    
        if (oDate.value.length > 0)
        {
            if (!checkDate(oDate))
                return false;
        }
    }
    return true;
}
