		var searchType = "hotelc";
		var formErrors = new Array();
		
		function flagError(elem) {
			elem.className += ' formError';
			formErrors.push(elem);
		}
		
		function clearErrors() {
			for(e=0; e < formErrors.length; e++){
				formErrors[e].className = formErrors[e].className.replace(/\s+formError/, '');
			}
			formErrors = new Array();
		}
		var allowUnaccompaniedChildren = true;
	
	if (document.images)
	{
		var Dests = new Array ( 
			"AUS", "BKG", "RBD", 0 
		);
		
		var sAUS = "Austin-Bergstrom Intl. Airport - AUS";
		var sBKG = "Branson Airport - BKG";
		var sRBD = "Dallas Executive Airport - RBD";
		
		var cAUS = new Array(   
			"BKG","RBD", 0 
		);
		
		var cBKG = new Array(   
			"AUS","RBD", 0 
		);
		
		var cRBD = new Array(   
			"AUS","BKG", 0 
		);
	
	}

	function updateODList(origBox, destBox, labelDest, fromOnload)
	{
		if (!document.images)
		{
			return;
		}

		var origIndex	= eval(origBox.selectedIndex)
		var destIndex	= eval(destBox.selectedIndex)
		var orig     	= ('c' + origBox.options[ origIndex ].value)
		var dest     	= ('c' + destBox.options[ destIndex ].value)
		var initDest	= 0


		if (orig != "XXX")
		{
			orig = eval(orig)
			destBox.length = 1
			var newDest = new Option(labelDest)
			destBox.options[0] = newDest
			destBox.options[0].value = ""

			for (var i = 0; i < orig.length-1; i++)
			{
				destBox.length += 1
				destBox.options[destBox.length - 1] = new Option( eval('s' + orig[i]))

				destBox.options[destBox.length - 1].value = orig[i]

				if ( dest == destBox.options[destBox.length - 1].value )
				{
					initDest = destBox.length - 1
				}
			}


			if (fromOnload == true)
			{
				origBox.selectedIndex = origIndex
				destBox.selectedIndex = destIndex
			}
			else
			{
				destBox.selectedIndex = initDest
			}

		}
		else
		{
			refillDestList( destBox, labelDest);
		}


	}	// updateODList


	function refillDestList(destBox, labelDest, unusedOption)
	{
		var destValue = destBox.options[ destBox.selectedIndex ].value
		destBox.length = 1
		destBox.options[0] = new Option(labelDest)
		destBox.options[0].value = ""
		var i = 1
		var selIndex = 0

		if ( unusedOption )
		{
			destBox.length += 1
			var newOption = new Option( unusedOption )
			destBox.options[i] = newOption
			destBox.options[i].value = ""
			i++
		}

		for (var j = 0; j < Dests.length-1; j++)
		{
			destBox.length += 1
			var newOption = new Option(eval('s' + Dests[j]))
			destBox.options[i+j] = newOption
			destBox.options[i+j].value = Dests[j]
			if (destValue == Dests[j]) {selIndex = i+j}
		}

		destBox.selectedIndex = selIndex

	}	// end refillDestList

	function checkSearchForm()
	{
		clearErrors();
		var okay = false;
		
		// Make sure cities are entered

		if (document.forms.search.origin.value=='')
		{
			alert ("\nPlease select the city you will be departing from.\n");
			flagError(document.forms.search.origin);
			okay = false;
		}
		else if (document.forms.search.dest.value=='')
		{
			alert ("\nPlease choose your destination.\n");
			flagError(document.forms.search.dest);
			okay = false;
		}
		else if (document.forms.search.depart_date.value == '' || document.forms.search.depart_date.value == 'mm/dd/yyyy')
		{
			alert ("\nPlease select a valid departure date.\n");
			flagError(document.forms.search.depart_date);
			okay = false;
		}
		else if (document.forms.search.return_date.value == '' || document.forms.search.return_date.value == 'mm/dd/yyyy')
		{
			alert ("\nPlease select a valid return date.\n");
			flagError(document.forms.search.return_date);
			okay = false;
		}
		else
		{
			
			var origBox = document.forms.search.origin;
			var destBox = document.forms.search.dest;
			var destValue = destBox.options[ destBox.selectedIndex ].value;
			var orig = eval('c' + origBox.options[ origBox.selectedIndex ].value);
			for (var j = 0; j < orig.length-1; j++)
			{
				if (destValue == orig[j]) {
					// Selected destination was found in valid destination list.
					okay = true;
				}
			}
			if(!okay) {
				// A valid destination was not found, refill the destination list and try again.
				updateODList(document.forms.search.origin, document.forms.search.dest, '', false);
				alert("\nThe destination selected is not available when departing from " + (origBox.options[ origBox.selectedIndex ].text) + ".\n");
				flagError(document.forms.search.dest);
			}
			
		}

		return okay

	}  // end checkSearchForm
	
	function updatePaxCount() {
		var adults = (document.forms.search.adult_passengers.value);
		var children = (document.forms.search.child_passengers.value);
		var infants = (document.forms.search.infant_passengers.value);
		var pets = (document.forms.search.pets_passengers.value);
		
		if (infants > adults) {
			alert("You have specified " + infants + " infant passenger" + (infants > 1 ? "s" : "") + ", but " + (adults == 0 ? "no adults" : ("only " + adults + " adult" + (adults > 1 ? "s"  : ""))) + ". Infants are not assigned a seat, and each infant must ride on the lap of an adult passenger.");
			return(false);
		}else if ((infants > 0) && (infants == adults)) {
			alert("You have specified that " + infants + " infant passenger" + (infants > 1 ? "s" : "") + " will be accompanying you on your flight. Due to the airline seating restrictions, reservations for infants (defined as a Lap Child) must be made by calling 1-888-359-2541. Reservations Center agents will communicate Lap Children policies to you over the telephone. Thanks for choosing Branson AirExpress!");
			return(false);
		}else if ((children > 0) && (adults == 0)) {
			alert("You have specified " + children + " child passenger" + (children > 1 ? "s" : "") + ", but no adults. Due to the airline seating restrictions, reservations for Unaccompanied Minors must be made by calling 1-888-359-2541. Reservations Center agents will communicate Unaccompanied Minor policies to you over the telephone. Thanks for choosing Branson AirExpress!");
			return(false);
		}else if (!allowUnaccompaniedChildren && (children > 0) && (adults == 0)) {
			alert("You have specified " + children + " child passenger" + (children > 1 ? "s" : "") + ", but no adults. All child passengers MUST be accompanied by an adult passenger.");
			return(false);
		}else if (pets > 0) {
			alert("You have specified that " + pets + " pet" + (pets > 1 ? "s" : "") + " will be accompanying you on your flight. Due to airline restrictions, reservations for pets as flight passengers must be made by calling 1-888-359-2541. Reservations Center agents will communicate our pet policies to you over the telephone.");
			return(false);
		}else{
			document.forms[0].passengers.value = adults + children;
			return(true);
		}
	}
	
	function updateLuggageCount() {
		var carryon = (document.forms.search.luggage_carryOn.value);
		var checked = (document.forms.search.luggage_checked.value);
		
		if (checked > 0) {
			alert("You have specified " + checked + " checked luggage item" + (checked > 1 ? "s" : "") + ". Be aware, there is a surcharge per checked item that will be due upon check-in at Branson Airport. We allow a maximum of 2 checked items per passenger, $20.00 for the first piece and $25.00 for the second. See our site's Terms and Conditions for more details on allowable items and luggage dimensions.");
			return(false);
		}
	}
