function hideBox() {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	for(i = 1; i <= sidebox; i++) { //sidebox can be found as a global variable in header_02.php
		var hide = document.getElementById('box' + i);
		hide.style.display='none';
	}
}

function showBox(x) {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	var showme = document.getElementById('box' + x);
	showme.style.display='block';
}

function hoverYes(x) {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	var menu = document.getElementById('menu_item' + x);
	if(menu.className == 'light') {
		menu.className='dark2';
	}
}

function hoverNo(x) {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	var menu = document.getElementById('menu_item' + x);
	if(menu.className == 'dark2') {
		menu.className='light';
	}
}

function hideAll() {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	for(i = 1; i <= option; i++) { //option can be found as a global variable in header_02.php
		var hide = document.getElementById('sub' + i);
		if(hide != null) {
			hide.style.display='none';
		}

		var menu = document.getElementById('menu_item' + i);
		menu.className='light';
	}
}

function show(x) {
	// if browser doesn't support this method, return false
	if(!document.getElementById) return false;

	var menu = document.getElementById('menu_item' + x);
	menu.className='dark';

	var showme = document.getElementById('sub' + x);
	showme.style.display='block';
}

function startclock() {
	var thetime=new Date();

	var nhours=thetime.getHours();
	var nmins=thetime.getMinutes();
	var nsecn=thetime.getSeconds();

	if(nsecn<10) {
		nsecn="0"+nsecn;
	}

	if(nmins<10) {
		nmins="0"+nmins;
	}

	if(nhours<10) {
		nhours="0"+nhours;
	}

	document.getElementById('clock').innerHTML = nhours + ':' + nmins + ':' + nsecn;

	setTimeout('startclock()',1000);
}

function updateDate() {
	var origin = document.forms['frmNationalSelect'].Origin.value;
	var destination = document.forms['frmNationalSelect'].Destination.value;

	var date = document.forms['frmNationalSelect'].tickets_date.value;
	var month = document.forms['frmNationalSelect'].tickets_month.value;
	var year = document.forms['frmNationalSelect'].tickets_year.value;

	document.getElementById('Date').value = date + '-' + month + '-' + year;

	document.forms['frmNationalSelect'].action = 'https://194.106.151.95/asp/NationalList.asp?Origin=' + origin + '&Destination=' + destination + '&Date=' + date + '-' + month + '-' + year;
}