function dtchk()
{
	var dtmXMLDropOff	= new XmlDateTime(document.getElementById('dropoffdate').value,'#dd-#MM-#yyyy');
        var dtmXMLPickUp	= new XmlDateTime(document.getElementById('pickupdate').value,'#dd-#MM-#yyyy');
	var strPickUpXmlDate	= dtmXMLPickUp.GetXMLDateTime().substring(0,10)+ 'T00:00:00';
	var strDropOffXmlDate	= dtmXMLDropOff.GetXMLDateTime().substring(0,10)+ 'T00:00:00';
	
	if(!isXMLDate(strDropOffXmlDate) || !isXMLDate(strPickUpXmlDate))
	{
		alert(WRONG_DATE);
		//document.getElementById('dropoffdate').focus();
	}
	else
	{
		
		submitSearch('searchForm');animShow();
		
	}
}

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);
}