
	function __doPostBack(eventTarget, eventArgument) {
		var theform;
		if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
			theform = document.carForm;
		}
		else {
			theform = document.forms["carForm"];
		}
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
		theform.submit();
	}

function Validate() {
var datemonth  = document.Form1.date_month ? document.Form1.date_month.value : "";
var dateday    = document.Form1.date_day ? document.Form1.date_day.value : "";
var dep_out_gr = document.Form1.fromarea ? document.Form1.fromarea.value : "";
var dep_out_1  = document.Form1.from_1 ? document.Form1.from_1.value.replace(/\s+/g,"") : "";
var dep_out_2  = document.Form1.from_2 ? document.Form1.from_2.value.replace(/\s+/g,"") : "";
var dep_out_3  = document.Form1.from_3 ? document.Form1.from_3.value.replace(/\s+/g,"") : "";
var nights     = document.Form1.nights ? document.Form1.nights.value.replace(/\s+/g,"") : "";
var year = "20" + datemonth.substring(2,0);
var month = datemonth.substring(4,2);
if((datemonth == "0601" && parseInt(dateday,10) < 26) || !dateCheck(year,month,dateday))
{
alert("Please make sure you select a valid departure date that is in the future.");
return false;
}
else if(!(dep_out_gr || dep_out_1 || dep_out_2 || dep_out_3))
{
alert("Please specify your departure point or grouping.");
return false;
}
else if(!nights)
{
alert("Please specify number of nights.");
return false;
}
return true;
}
function dateCheck(y, m, d)
{
if(m != '')
{
if((m == "04" || m == "06" || m == "09" || m == "11") && d == "31")
{
return false;
}
if(m == "02" && ((parseInt(y)%4 != 0 && d == "29") || d == "30" || d == "31"))
{
return false;
}
return true;
}
return false;
}

