//
function toggleTourDates() {
	//
	var divId = "tourDates_div";
	//
	var theDiv = document.getElementById(divId);
	theDiv.style.display=theDiv.style.display == "none"?"block":"none";
	//
}
//
function openTourBook(startDate) {
	//
	var startDateArray = startDate.split("-");
	//
	var yearValue;
	var monthValue;
	var dayValue;
	//
	if (startDateArray[0].charAt(0) != '0') { yearValue = startDateArray[0]; }
	else { yearValue = startDateArray[0]; }//.replace("0",""); }
	//
	if (startDateArray[1].charAt(0) != '0') { monthValue = startDateArray[1]; }
	else { monthValue = startDateArray[1].replace("0",""); }
	//
	if (startDateArray[2].charAt(0) != '0') { dayValue = startDateArray[2]; }
	else { dayValue = startDateArray[2]; }//.replace("0",""); }
	//
	if (startDate.length == 0 || startDate == '0000-00-00') {
		/*
		do nothing ...
		*/
	}
	else {
		//
		document.forms['bookform'].year.options.length = 0;
		document.forms['bookform'].month.options.length = 0;
		document.forms['bookform'].day.options.length = 0;
		//
		document.forms['bookform'].year.options[0] = new Option(yearValue, yearValue);
		document.forms['bookform'].month.options[0] = new Option(bookformMonthFieldNamesArray[monthValue-1], startDateArray[1]);
		document.forms['bookform'].day.options[0] = new Option(dayValue, dayValue);
		/*
		document.bookform.year.value = yearValue;
		document.bookform.month.selectedIndex = parseInt(monthValue)-1;
		document.bookform.day.selectedIndex = parseInt(dayValue)-1;
		*/
	}
	//
	toggleTourDates();
	toogleBook();
	//
}
//
function toggleTermsConditions() {
	//
	var divId = "termsConditions_div";
	//
	var theDiv = document.getElementById(divId);
	theDiv.style.display=theDiv.style.display == "none"?"block":"none";
	//
}
function searchTours() {
	if (
	/*document.getElementById('cboStartMonth1').selectedIndex == 0 &&
	document.getElementById('cboStartMonth2').selectedIndex == 0 &&
	*/
	document.getElementById('cboStartMonth3').selectedIndex == 0
	) {
		alert("Please select a starting date");
		//return;
	}
	else {
		//document.getElementById('searchTours_form').submit();
		document.searchTours_form.submit();
	}
}
