
	function go_back(page, booking_mode, jt) {
		switch (page) {
		case 'sp':	// shuttle passengers
			
			if (booking == 'bulletin_board') {
				if (jt.substr(0,3) == 'rtn') {direction = '-inbound';}
				document.pricing.action = '/bulletin-board' + direction + '.php';
				document.pricing.submit();
			} else {
				location.href = '/shuttle_booking.php';
			} // end-if
		break;
		}
	}


	function submit_booking(jt, no_date_check) {

		var fail_submit = false;
		var date_filter = /^\d{1,2}\/\d{1,2}\/\d{4}$/;		
		var time_now = new Date();

		if (jt == 'one_to_air' || jt == 'rtn_from_air' || jt == 'rtn_to_air') {
			var dep_date = new Date(document.pricing.dep_date.value.substr(6,4), document.pricing.dep_date.value.substr(3,2) - 1, document.pricing.dep_date.value.substr(0,2), document.pricing.dep_hours.value, document.pricing.dep_minutes.value, 0);			
		}
		
		if (jt == 'one_from_air' || jt == 'rtn_from_air' || jt == 'rtn_to_air') {
			var arr_date = new Date(document.pricing.arr_date.value.substr(6,4), document.pricing.arr_date.value.substr(3,2) - 1, document.pricing.arr_date.value.substr(0,2), document.pricing.arr_hours.value, document.pricing.arr_minutes.value, 0);			
		}


		if (jt == 'one_to_air' || jt == 'rtn_to_air') {			
			
			if (document.pricing.adults.value == 0) {
				alert("Please specify at least 1 passenger for this booking.");
				highlight_bg('adults');
				document.pricing.adults.focus();
				fail_submit = true;

			} else if (document.pricing.port_destination.value == '') {
				alert("Please specify the airport you're flying to.");
				highlight_bg('port_destination');
				document.pricing.port_destination.focus();
				fail_submit = true;

			} else if (!document.pricing.dep_date.value.match(date_filter)) {
				alert("Please enter your departure date.");
				highlight_bg('dep_date');
				document.pricing.dep_date.focus();
				fail_submit = true;

			} else if (document.pricing.dep_hours.value == '') {
				alert("Please specify the time your flight departs.");
				highlight_bg('dep_hours');
				highlight_bg('dep_minutes');
				document.pricing.dep_hours.focus();
				fail_submit = true;
			
			} else if (dep_date.valueOf() < time_now.valueOf()) {
				alert("Please enter a departure date in the future.");
				highlight_bg('dep_date');
				document.pricing.dep_date.focus();
				fail_submit = true;
				
			} else if (no_date_check == false && jt == 'rtn_to_air' && arr_date.valueOf() < dep_date.valueOf()) {
				alert("Your return date cannot be earlier than your departure date.");
				highlight_bg('arr_date');
				document.pricing.arr_date.focus();
				fail_submit = true;
			}
			
		} // end-if
		
		
		if (jt == 'one_from_air' || jt == 'rtn_from_air') {
			
			if (document.pricing.ib_adults.value == 0) {
				alert("Please specify at least 1 passenger for this booking.");
				highlight_bg('ib_adults');
				document.pricing.ib_adults.focus();
				fail_submit = true;

			} else if (document.pricing.port2.value == '') {
				alert("Please specify the airport you're flying to.");
				highlight_bg('port2');
				document.pricing.port_destination.focus();
				fail_submit = true;

			} else if (!document.pricing.arr_date.value.match(date_filter)) {
				alert("Please enter your departure date.");
				highlight_bg('arr_date');
				document.pricing.arr_date.focus();
				fail_submit = true;

			} else if (document.pricing.arr_hours.value == '') {
				alert("Please specify the time your flight departs.");
				highlight_bg('arr_hours');
				highlight_bg('arr_minutes');
				document.pricing.arr_hours.focus();
				fail_submit = true;
			
			} else if (arr_date.valueOf() < time_now.valueOf()) {
				alert("Please enter an arrival date in the future.");
				highlight_bg('arr_date');
				document.pricing.arr_date.focus();
				fail_submit = true;
				
			} else if (no_date_check == false && jt == 'rtn_from_air' && dep_date.valueOf() < arr_date.valueOf()) {
				alert("Your (outbound) departure date cannot be earlier than your (in-bound) arrival date.");
				highlight_bg('dep_date');
				document.pricing.dep_date.focus();
				fail_submit = true;
			}
			
		} // end-if
		
		
		if (fail_submit == false) {
			document.pricing.jt.value = jt;
			document.pricing.submit();
		} // end-if
	}
	
	
	
	function set_direction_vars() {
		if (document.pricing.direction.value == '0') { journey_type = 'one_'; }
												else { journey_type = 'rtn_'; }
		
		if (document.pricing.lcn_collect.value.substr(0,3) == 'cty') { journey_type += 'to_air'; }
																 else { journey_type += 'from_air'; }
		
		document.pricing.jt.value = journey_type;
	}


	function start_journey(transport_opt) {		
		document.pricing.travel_opt.value = transport_opt;
		document.pricing.adults.value = 0;
		document.pricing.submit();
	}
	

	function journey_info_headingXX(stage_no, stage_heading, direction, subtitle, img_file) {
		show_frame('journey_stage_' + stage_no, 'block');
		
		var j_img 		= (img_file) ? '<a href="/shuttle_booking.php" title="Select a different journey type"><img src="/_images/buttons/' + img_file + '" alt="' + direction + '" id="journey_info_icon"/></a><br/>' : '';
		var j_direction	= (direction) ? '<h3 class="label_colour" style="display:inline;">' + direction + '</h3><br/>' : '';
		var j_subtitle	= (subtitle) ? '<a href="/shuttle_booking.php" title="Select a different journey type">' + subtitle + '</a>' : '';

		document.getElementById('journey_stage_' + stage_no + '_title').innerHTML = stage_heading;
		document.getElementById('journey_info_' + stage_no).innerHTML = j_img + j_direction + j_subtitle;
	}
	

	function journey_info_heading(stage_no, stage_heading, direction, img_file, guidance) {
		show_frame('journey_stage_' + stage_no, 'block');
		
		var j_img 		= (img_file) ? '<a href="/shuttle_booking.php" title="Select a different journey type"><img src="/_images/buttons/' + img_file + '" alt="' + direction + '" id="journey_info_icon"/></a><br/>' : '';
		var j_change	= '<a href="/shuttle_booking.php" title="Select a different journey type">' + direction + '</a>';

		document.getElementById('journey_stage_' + stage_no + '_title').innerHTML = stage_heading;
		document.getElementById('journey_info_' + stage_no).innerHTML = j_img + j_change;
		//document.getElementById('journey_info_help').innerHTML = guidance;
		
		//if (direction == 'One Way<br/>from the airport') {document.getElementById('journey_info_help_b').innerHTML = guidance;}
	}
		
	
	function update_flying_from(flying_from, eleFlyingFrom) {
		//if (document.pricing.direction.value == '1') {document.pricing.port2.value = flying_from;}
		eleFlyingFrom.value = flying_from;
	}
	
	function update_adults_dropdown(objAdults, num_adults) {
		objAdults.selectedIndex = parseInt(num_adults);
	}
	
	function update_babies_dropdown(num_babies, eleInfants) {
		//document.pricing.ib_babies
		eleInfants.selectedIndex = parseInt(num_babies);
	}
	
	function update_dropoffs(dropoffs) {
		document.pricing.inbound_stops.selectedIndex = parseInt(dropoffs - 1);
	}
	
	function update_pickup_ib(dropoff_ob) {
		document.pricing.lcn_collect_rtn.selectedIndex = dropoff_ob;
	}
	
	function update_pickup_ob(dropoff_ib) {
		document.pricing.lcn_collect.selectedIndex = dropoff_ib;
	}
	
	function update_dropdown(target_dropdown, new_si) {
		target_dropdown.selectedIndex = new_si;
	}


