//'Submits form with flight info...
function submitDate (strDepartDate) {
	var frm = document.forms[0];
	
	frm.strDepartDate.value = strDepartDate;
	frm.submit();
}

//Shows disclaimer...
function showDisclaimer() {
	alert('DISCLAIMER: The information on this web site is provided free-of-charge. Whilst we endeavour \n' +
		'to ensure that the information on this website is correct, we do not warrant its completeness \n' +
		'or accuracy; nor do we not commit to ensuring that the website remains available or that the \n' +
		'material on this website is kept up-to-date. \n\n' +
		'The owner of this web site will not be liable for any direct, indirect or consequential loss or damage \n' +
		'arising from the use of this website. By using our website, you accept these terms and conditions. \n' +
		'If you disagree with these terms and conditions, do not use our website.');
}

//'Submits form & goes to chosen month... 
function gotoMonth(selIndex) {
	var frm = document.forms["mainform"];
	var chosenMonthYear = frm.selMonthYear.value;
	var chosenMonth = chosenMonthYear.substring(0, chosenMonthYear.indexOf("~"));
	var chosenYear = chosenMonthYear.substring(chosenMonthYear.indexOf("~") + 1, chosenMonthYear.length);
	var chosenDay = frm.strDepartDate.value.substring(0, strDepartDate.indexOf("/"))
	
	frm.strDepartDate.value = chosenDay + "/" + chosenMonth + "/" + chosenYear;
	frm.submit();
}

//'Submits form & goes to chosen month... 
function changeMonth(selIndex) {
	var frm = document.forms["mainform"];
	var intSelectedIndex = frm.selMonthYear.selectedIndex;
	intSelectedIndex = intSelectedIndex + selIndex
	if ((intSelectedIndex < 0) || (intSelectedIndex == frm.selMonthYear.length)) {
		return false;
	} else {
		frm.selMonthYear.selectedIndex = intSelectedIndex;
	}
	var chosenMonthYear = frm.selMonthYear.value;
	var chosenMonth = chosenMonthYear.substring(0, chosenMonthYear.indexOf("~"));
	var chosenYear = chosenMonthYear.substring(chosenMonthYear.indexOf("~") + 1, chosenMonthYear.length);
	var chosenDay = frm.strDepartDate.value.substring(0, strDepartDate.indexOf("/"))
	
	frm.strDepartDate.value = chosenDay + "/" + chosenMonth + "/" + chosenYear;
	frm.submit();
}
