
	function reset_tab_buttons(colour) {
		document.getElementById('tab_btn_faremiles').style.color = colour;
		document.getElementById('tab_btn_bulletin_board').style.color = colour;
		document.getElementById('tab_btn_shuttles').style.color = colour;
	}
	

	function change_color(eleId, colour) {
		document.getElementById(eleId).style.color = colour;
	}
	

	function change_img(img, fn) {
		img.src = "/_images/" + fn;
	}


	function change_bg(eleId, fn) {
		document.getElementById(eleId).style.backgroundImage = "url(/_images/" + fn + ")";
	}


	function tab_to_air() {
		show_hide('tab_to_airport', 'block'); show_hide('tab_from_airport', 'none');
		change_bg('tab_to_air', 'bg/frm_booking_to_air_h.gif'); change_bg('tab_fr_air', 'bg/frm_booking_fr_air.gif');
		document.getElementById('tab_link_fr_air').style.color = '#909090';
		document.getElementById('tab_link_to_air').style.color = '#181818';
		document.pricing.jt_direction.value = 'to_air';
		set_journey_direction(document.pricing.return_transfer.value);
	}


	function tab_from_air() {
		show_hide('tab_to_airport', 'none'); show_hide('tab_from_airport', 'block');
		change_bg('tab_to_air', 'bg/frm_booking_to_air.gif'); change_bg('tab_fr_air', 'bg/frm_booking_fr_air_h.gif');
		document.getElementById('tab_link_to_air').style.color = '#909090';
		document.getElementById('tab_link_fr_air').style.color = '#181818';
		document.pricing.jt_direction.value = 'from_air';
		set_journey_direction(document.pricing.return_transfer_ib.value);
	}


	function input_switch(box, io, text) {
		
		if (io == 'input') {
			if ( box.value == text ) { box.value = ""; }
		} else {
			if ( box.value == "" ) { box.value = text; }
		}
	}


	function toggle_frame(frame, op) {
		
		if (op) {
			document.getElementById(frame).style.visibility = op;
		} else {
			document.getElementById(frame).style.visibility = (document.getElementById(frame).style.visibility == 'visible') ? 'hidden' : 'visible';
		}
	}


	function show_frame(frame, op) {
		
		if (op) {
			document.getElementById(frame).style.display = op;
		} else {
			document.getElementById(frame).style.display = (document.getElementById(frame).style.display == 'block') ? 'none' : 'block';
		}
	}


	function highlight(square) {
		document.getElementById(square).style.visibility='visible';
	}


	function highlight_off(square) {
		document.getElementById(square).style.visibility='hidden';
	}


	function showHide(eleID) { 
	   elem = document.getElementById(eleID);    
	   if (elem.className=="eleShown") {elem.className="eleHidden";} 
	   else { elem.className="eleShown";} 
	}


	function show_hide(id, state) {
		document.getElementById(id).style.display = state;
	}


	function highlight_bg(eleID, colour) {
		if (colour != 'none') { colour = (colour) ? colour : '#fffab2'; }		
		document.getElementById(eleID).style.backgroundColor = colour;
	}
	
	
	function unhighlight_bg(eleID, eleValue) {
		if (eleValue != 0) { highlight_bg(eleID, 'transparent'); }
	}



	// bulletin board -----------------------------------------------------------------------------------------------------------------------------------------------------

	function hideRows() {
		
		var divs = document.getElementsByTagName('tr');
		for (i=0; i < divs.length; i++) {
			if (divs[i].id.substr(0,6) == "oneway" || divs[i].id.substr(0,6) == "return") {
				document.getElementById(divs[i].id).style.display = 'none';
			}
		}		
	}


	function open_row(row_id) {
		if (document.getElementById(row_id).style.display=='table-row') document.getElementById(row_id).style.display = 'none';
		if (document.getElementById(row_id).style.display=='none') document.getElementById(row_id).style.display = 'table-row';
	}


	
	// booking form -----------------------------------------------------------------------------------------------------------------------------------------------------

		
		function set_selectedIndex(ob_elem, ib_elem, jt_direction) {

			if (jt_direction=='to_air' && document.pricing.return_transfer.value=='rtn_') {
				ib_elem.selectedIndex = ob_elem.selectedIndex;
				
			} else if (jt_direction=='from_air' && document.pricing.return_transfer_ib.value=='rtn_') {
				ob_elem.selectedIndex = ib_elem.selectedIndex;
			
			} // end-if
		}
		
		function set_dep_date() {
			document.pricing.dep_date.value = document.pricing.departure_day.value+'/'+document.pricing.departure_month.value+'/'+document.pricing.departure_year.value;
		}
		
		function set_dep_time() {
			document.pricing.dep_time.value = document.pricing.dep_hours.value+':'+document.pricing.dep_minutes.value;
		}
		
		function set_arr_date() {
			document.pricing.arr_date.value = document.pricing.arrival_day.value+'/'+document.pricing.arrival_month.value+'/'+document.pricing.arrival_year.value;
		}
		
		function set_arr_time() {
			document.pricing.arr_time.value = document.pricing.arr_hours.value+':'+document.pricing.arr_minutes.value;
		}
		
		function set_journey_direction(one_rtn) {
			document.pricing.jt.value = one_rtn + document.pricing.jt_direction.value;
		}
		

	
