<!--
function checkDates() {
	thereturn = true;
	
	var currentTime = new Date()
	currentTime = currentTime.getYear()+"/"+(currentTime.getMonth()+1)+"/"+currentTime.getDate();
	currentTime  = new Date(currentTime);
	
	ArrDD 	= document.getElementById('ArrDD').value;
	ArrMMYY = document.getElementById('ArrMMYY').value;
	ArrMMYY = ArrMMYY.split('-');
	ArrYYMM = ArrMMYY[1]+'/'+ArrMMYY[0];
	ArrDate = new Date(ArrYYMM+'/'+ArrDD);
	
	DepDD 	= document.getElementById('DepDD').value;
	DepMMYY = document.getElementById('DepMMYY').value;
	DepMMYY = DepMMYY.split('-');
	DepYYMM = DepMMYY[1]+'/'+DepMMYY[0];
	DepDate = new Date(DepYYMM+'/'+DepDD);
	
	ArrDiff = ArrDate - currentTime;
	DepDiff = DepDate - currentTime;
	StayDiff = ArrDate - DepDate;

	if (ArrDiff < 0) { alert("Your arrival date is in the past"); thereturn = false; }
	if (DepDiff < 0) { alert("Your departure date is in the past"); thereturn = false; }
	if (StayDiff > 0) { alert("Your departure date is before the arrival date"); thereturn = false; }
	if (StayDiff = 0) { alert("Your departure date is the same as the arrival date"); thereturn = false; }
	
	return thereturn;
}

function doDateChange(theform,thedate) {
	dateParts = thedate.split("-");
	if (theform=='start') {
		document.getElementById('ArrDD').value = dateParts[2];
		document.getElementById('ArrMMYY').value = dateParts[1] + "-" + dateParts[0];
	}
	if (theform=='end') {
		document.getElementById('DepDD').value = dateParts[2];
		document.getElementById('DepMMYY').value = dateParts[1] + "-" + dateParts[0];
	}
}


function datePicker(theday,themonth,theyear,theform,seldate) {

	var xmlhttp = false;

	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	// JScript gives us Conditional compilation, we can cope with old IE versions.
	// and security blocked creation of the objects.

	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
		}
	}

	@end @*/

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}


	document.getElementById('monthdiv').innerHTML = '';


	document.getElementById('monthdiv').style.display="inline";
	var returnText;

	uri = "datepicker.asp?theday=" + theday + "&themonth=" + themonth + "&theyear=" + theyear + "&theform=" + theform + "&seldate=" + seldate;

	xmlhttp.open("GET", uri ,true);
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			returnText = xmlhttp.responseText;

			newText = returnText;

			document.getElementById('monthdiv').innerHTML = newText;



		}

		
	}
	
xmlhttp.send(null);
}

//-->
