

function openCalendar(pickUpId, dropOffId, action) 
{
	if (action == "") return;
	
	var ret = "";
	
	switch (action) 
	{
		case "pickup":
			break;
		
		case "dropoff":
			break;
	}

	document.getElementById('calendarCont').style.display = "block";
	document.getElementById('calendarCont').style.top = tempY + "px";
	document.getElementById('calendarCont').style.left = tempX + "px";
	
	document.getElementById('calendarCont').src = "back/calendar.aspx?pickUp=" + pickUpId + "&dropOff=" + dropOffId + "&active=" + action + "&pickupDT=" + document.getElementById(pickUpId + '_DT').value + "&dropoffDT=" + document.getElementById(dropOffId + '_DT').value;
}

var calendarTimeout;

function setCalendarVisibleInterval() 
{
	calendarTimeout = setTimeout('closeCalendar()', 3000);
}


function closeCalendar()
{
	if (document.getElementById('calendarCont')) document.getElementById('calendarCont').style.display = "none";
	
	clearTimeout(calendarTimeout);
}



function cancelCloseCalendar()
{
	clearTimeout(calendarTimeout);
}
