document.write(''); //Defines the functions that are used by all pages that contain the booking panel or parts of it. //Unavailable routes that should be removed from default routes var unavailableRoutes = new Array(); //adding existing unavailable routes unavailableRoutes = unavailableRoutes.concat(['CPTJNB', 'JNBCPT']); //Singapore unavailableRoutes = unavailableRoutes.concat(['SINADL', 'SINBNE', 'SINMEL', 'SINPER', 'SINSYD', 'ADLSIN', 'BNESIN', 'MELSIN', 'PERSIN', 'SYDSIN']); //Virgin Blue unavailableRoutes = unavailableRoutes.concat(['SYDADL', 'SYDBNE', 'SYDCBR', 'SYDMEL', 'SYDOOL', 'ADLSYD', 'BNESYD', 'CBRSYD', 'MELSYD', 'OOLSYD']); //British Midland unavailableRoutes = unavailableRoutes.concat(['LONAMS', 'LONLHRAMS', 'LONDUB', 'LONLHRDUB', 'LONBRU', 'LONLHRBRU','LONPMI', 'LONLHRPMI', 'LONNAP', 'LONLHRNAP', 'LONVCE', 'LONLHRVCE', 'LONHAJ', 'LONLHRHAJ', 'AMSLON', 'AMSLONLHR', 'DUBLON', 'DUBLONLHR', 'BRULON', 'BRULONLHR', 'PMILON', 'PMILONLHR', 'NAPLON', 'NAPLONLHR', 'VCELON', 'VCELONLHR','HAJLON', 'HAJLONLHR']); /* * Removes the unavailable routes from default routes. */ function removeUnavailableRoutes() { for (var i = 0; i < unavailableRoutes.length; i++) { var unavailableRoute = unavailableRoutes[i]; for (var j = 0; j < ourRoutes.length; j++) { var route = ourRoutes[j]; if (route.departCity + route.arriveCity == unavailableRoute) { //remove the current route ourRoutes.splice(j, 1); break; } } } } //Function to check whether the cities are in the allowed routes function checkDepartCities(outBoundDepart, inBoundDepart, searchType){ if(!checkDepartCity(outBoundDepart, searchType)){ return true; } if(!checkDepartCity(inBoundDepart, searchType)){ return true; } return false; } //function to check city is in the departures list function checkDepartCity(departureCityName, searchType){ for (var i = 0; i < ourRoutes.length; i++) { var route = ourRoutes[i]; // if this route departs from our departcity then true if (qualifiesForSearchType(route, searchType) && (route.departCity == departureCityName)) { return true; } } return false; } //function to return whether city is in the list of can depart cities function isDepartCity(cityToDepart) { for (var i = 0; i < cityNames.length; i++) { var city = cityNames[i]; if(city.code == cityToDepart){ if (city.canDepart) return true; } } return false; } /* Determines whether the given route is allowed for the given search type. */ function qualifiesForSearchType(route, searchType){ if (searchType == "milesPlusMoney"){ return route.allowsMPM; } else if (searchType == "redeemMiles"){ return route.allowsRedemption; } else{ return true; } } // gets the city name from the city code function getCityName(cityCode) { var city; // loop through the cities till we find this one for (var i=0; i < cityNames.length; i++) { city = cityNames[i]; if (city.code == cityCode) break; } return city.name; } // gets the default arrival city for this departure city function getDefaultArrival(departCity){ var arrivalCity; if (departCity.substring(0,3) == 'LON') { arrivalCity = 'NYC'; } else if (departCity == 'MAN') { arrivalCity = 'ORL'; } else { arrivalCity = 'LON'; } return arrivalCity; } // Clears the select box function clearOptions(theSelect){ if (theSelect.type=='select-one') while(theSelect.length>0) theSelect.options[0]=null; } //---------------- JS types ----------------------------------- // The CabinDetails class represents info on a cabin such as cabin ID // (for submission to the backend) and a friendly name for display. function CabinDetails(id, fn, flx, nei, sk) { this.myId=id; this.myFriendlyName=fn; this.flexible = flx; this.neither = nei; this.sortKey = sk; } // represents a city for the drop downs. This is not used by the Multiple Destinations page. function City(cd, nm, cdp, c_id) { this.code = cd; this.name = nm; this.country_id = c_id; this.canDepart = cdp; } // The Route class represents an individiual route function Route(dc, ac, cl, ms, allowsRedemption, allowsMPM, allowsMatesOrMatesPlus) { this.departCity = dc; this.arriveCity = ac; this.cabinList = cl; this.multiSector = ms; this.allowsRedemption = allowsRedemption; this.allowsMPM = allowsMPM; this.allowsMatesOrMatesPlus = allowsMatesOrMatesPlus; // getDescription() = function() { // return this.departCity + this.arriveCity; // } } //---------------- END JS types ----------------------------------- //Defines functions used by the following pages: Home and Search. xdfgsgs //The functions that are used by other pages too can be found in common_booking.js // this is the Main function called on entry to the page function setUp(obDepartCity, obArriveCity, obCabin, ibDepartCity, ibArriveCity, ibCabin) { removeUnavailableRoutes(); var searchType = getSearchType(); //check whether the Outbound and Inbound departure cities are in the dropdown list or not //if one of them are not available, set default departure cities as Gateway City and LON if(checkDepartCities(obDepartCity, ibDepartCity, searchType) || !isDepartCity(obDepartCity)){ obDepartCity = gatewayCityCode; defaultArrivalCity = 'LON'; if(gatewayCityCode=='LON'){//if Gateway Country is UK, set arrival city as NYC defaultArrivalCity = 'NYC'; } obArriveCity = defaultArrivalCity; ibDepartCity = defaultArrivalCity; ibArriveCity = gatewayCityCode; } //If gateway city is not in the list, set defult to LON and NYC if(checkDepartCities(obDepartCity, ibDepartCity, searchType)){ obDepartCity = 'LON'; obArriveCity = 'NYC'; ibDepartCity = 'NYC'; ibArriveCity = 'LON'; } if (!nonBookingPage){ //sets the cabin groups according to the current booking type setCabinGroups(); //sets the currently selected booking type currentSearchOption = getSearchType(); } // do the outbound stuff doOutboundDeparture(obDepartCity); doOutboundArrival(document.main.departure.value, obArriveCity); // do the inbound stuff if (detailedBookingPage) { doInboundDeparture(ibDepartCity); doInboundArrival(document.main.departureReturn.value, ibArriveCity); checkMPMInboundRoute(); } doOutboundCabin(obCabin); if (!nonBookingPage){ doInboundCabin(ibCabin); } if (searchType == "milesPlusMoney") { document.main.isreturn[0].checked = true; document.main.isreturn[1].disabled = true; } } // Populates the outbound departure city drop down // Loops through all the cities, adding the ones that have the canDepart flag set to true and that are valid //according to the currently selected booking type function doOutboundDeparture(departCity) { var selected = 0; var optionIndex = 0; document.main.departure.options.length = 0; for (var i = 0; i < cityNames.length; i++) { var city = cityNames[i]; if ((city.canDepart) && (isAllowedForBookingType(city))) { document.main.departure.options.length++; document.main.departure.options[optionIndex++] = new Option(city.name, city.code); if (city.code == departCity){ selected = optionIndex - 1; } } } // set the selected one document.main.departure.options[selected].selected = true; } // Populates the outbound arrival city drop down function doOutboundArrival(departCity, arrivalCity){ populateArrivalDropdown(departCity, arrivalCity, document.main.arrival, false); } // populates the outbound cabin drop down function doOutboundCabin(cabinId) { var cabinList = getCabinList(true); // clear down the select box clearOptions(document.main.classType); var selected = 0; // get the array of cabins var cabins = cabinGroups[cabinList]; // loop through these populating the class drop down for (var i = 0; i < cabins.length; i++) { var cabin = cabins[i]; document.main.classType.options[i] = new Option(cabin.myFriendlyName, cabin.myId); if (cabin.myId == cabinId) selected = i; } // now set the default document.main.classType.options[selected].selected = true; // check that they tally with the inbound checkOutboundCabins(); } // populates the inbound departure city drop down function doInboundDeparture(outboundArrivalCity) { // clear the box down clearOptions(document.main.departureReturn); // add all cities except the one selected in the outbound departure drop down var selected = -1; var optionIndex = 0; // get outbound departure city var outboundDepartureCity = document.main.departure.options[document.main.departure.selectedIndex].value; var departureCountry_id = getCountry_id(outboundDepartureCity); var arrivalCountryId = getCountry_id(outboundArrivalCity); for (var i = 0; i < cityNames.length; i++){ var city = cityNames[i]; if ((city.code != outboundDepartureCity) && (isAllowedForBookingType(city) || city.code=="MRU")){ if (isBookingMethodMates() && (!allowRouteAsInboundForMates(city.code,departureCountry_id))) { continue; } if (!canBeDepartureCity(city.code)) { continue; } document.main.departureReturn.options[optionIndex++] = new Option(city.name, city.code); if (city.code == outboundArrivalCity){ selected = optionIndex - 1; } } } // determine the selected one if the outbound arrival is not found in the inbound departure if (selected == -1) { // for US default the selection to NYC if (arrivalCountryId == 3) { var NYCIndex = getValueIndex('NYC', document.main.departureReturn); if (NYCIndex != -1) { selected = NYCIndex; } else { selected = 0; } } else { // default to the first element of the list selected = 0; } } document.main.departureReturn.options[selected].selected = true; } function getValueIndex(value, selectControl) { for (index = 0; index < selectControl.length; index++) { if (value == selectControl.options[index].value) { return index; } } return -1; } function canBeDepartureCity(cityCode) { for (var i = 0; i < ourRoutes.length; i++) { var route = ourRoutes[i]; if (route.departCity == cityCode) { return true; } } return false; } // populates the inbound arrival city drop down function doInboundArrival(departCity, arrivalCity){ populateArrivalDropdown(departCity, arrivalCity, document.main.arrivalReturn, true); } /** Populates the given dropdown with the arrival cities for the given departure cities. **/ function populateArrivalDropdown(departCity, arrivalCity, arrivalDropdown, isInbound){ var searchType = getSearchType(); var isMatesOrMatesPlus = isBookingMethodMates(); // clear down the select box clearOptions(arrivalDropdown); var optionIndex = 0; var cabinList = 0; var selected = 0; for (var i = 0; i < ourRoutes.length; i++) { var route = ourRoutes[i]; //if mates(P) && isInbound && route.departure is the same as outbound arrival country, allow the route for inbound var isMatesInbound = isMatesOrMatesPlus && isInbound; isMatesInbound = isMatesInbound && (getCountry_id(route.departCity) == getCountry_id(departCity)); // if this route departs from our departcity then add it if ((route.departCity == departCity) && (allowsBookingType(route, searchType, isMatesOrMatesPlus) || route.departCity=="MRU" || isMatesInbound)) { if (isMatesOrMatesPlus && isInbound) { var obDepCity = document.main.departure.value; var obDepCountry_id = getCountry_id(obDepCity); var ibArrCountry_id = getCountry_id(route.arriveCity); if (obDepCountry_id != ibArrCountry_id){ continue; } } var cityName = getCityName(route.arriveCity) arrivalDropdown.options[optionIndex++] = new Option(cityName, route.arriveCity); // check for the default if (route.arriveCity == arrivalCity) { selected = optionIndex - 1; } } } // set the selected one if (arrivalDropdown.length > 0){ arrivalDropdown.options[selected].selected = true; } } // populates the inbound cabin drop down function doInboundCabin(cabinId){ // clear down the select box clearOptions(document.main.classTypeReturn); if (canMixCabins()){ // get the outbound cabin var outboundCabinId = document.main.classType.options[document.main.classType.selectedIndex].value; var outboundCabins = cabinGroups[getCabinList(true)]; var flexible = false; // now checked whether it is lowest, flexible or neither for (var i = 0; i < outboundCabins.length; i++) { var cabin = outboundCabins[i]; if (cabin.myId == outboundCabinId) { flexible = cabin.flexible; } } var optionIndex = 0; // get the array of cabins var inboundCabins = cabinGroups[getCabinList(false)]; // loop through these populating the class drop down for (var i = 0; i < inboundCabins.length; i++) { var cabin = inboundCabins[i]; //if flexible is true then add only the flexible cabins, otherwise add only the non flexible cabins //(neither and lowest) if (flexible == cabin.flexible){ var currentOption = new Option(cabin.myFriendlyName, cabin.myId); document.main.classTypeReturn.options[optionIndex++] = currentOption; if (cabin.myId == cabinId){ currentOption.selected = true; } } } } else{ // can't mix cabins, inbound option must be the same as outbound // if either the outbound or inbound have different (non-combinable) options to each other, reduce // the options in the drop down with the most in till we have parity trimClassTypeOptions(); // get the outbound cabin var outboundCabinId = document.main.classType.options[document.main.classType.selectedIndex].value; // get the inbound cabins var inboundCabins = cabinGroups[getCabinList(false)]; // loop through these populating the class drop down for (var i = 0; i < inboundCabins.length; i++) { var cabin = inboundCabins[i]; if (cabin.myId == outboundCabinId) { document.main.classTypeReturn.options[0] = new Option(cabin.myFriendlyName, cabin.myId); break; } } } } // trims the class type options in the case where you can't mix cabins so that they are the same function trimClassTypeOptions() { // get the one presently selected - we may need this var outboundSelected = document.main.classType.options.selectedIndex; clearOptions(document.main.classType); var outboundCabins = cabinGroups[getCabinList(true)]; var inboundCabins = cabinGroups[getCabinList(false)]; var optionIndex = 0; // loop through these populating the class drop down for (var i = 0; i < outboundCabins.length; i++) { var outboundCabin = outboundCabins[i]; for (var j = 0; j < inboundCabins.length; j++) { var inboundCabin = inboundCabins[j]; if (outboundCabin.myId == inboundCabin.myId) { document.main.classType.options[optionIndex++] = new Option(outboundCabin.myFriendlyName, outboundCabin.myId); break; } } } // set the selected one if (outboundSelected < document.main.classType.options.length) document.main.classType.options[outboundSelected].selected = true; } // checks that the outbound cabins tally with the inbound // if the inbound cabins are 'neither' then filter the // outbound for all but 'lowest' cabins function checkOutboundCabins() { var inboundCabinList = getCabinList(false); if (inboundCabinList != -1) { var inboundCabins = cabinGroups[inboundCabinList]; if (inboundCabins[0].neither) { var outboundCabins = cabinGroups[getCabinList(true)]; if (!outboundCabins[0].neither) { // clear them down clearOptions(document.main.classType); var optionIndex = 0; // now filter them for (var i = 0; i < outboundCabins.length; i++) { var cabin = outboundCabins[i]; if (!cabin.flexible) { document.main.classType.options[optionIndex++] = new Option(cabin.myFriendlyName, cabin.myId); } } } } } } /** Determines whether the given city is a valid departure for the currently selected search type. For exact date and lowest fare The given city is valid if there is at least one route that departs from this city and allows the selected search type. **/ function isAllowedForBookingType(city){ var searchType = getSearchType(); var isMatesOrMatesPlus = isBookingMethodMates(); var obArrivalCity = document.main.arrival.value; var obArrCountry_id = getCountry_id(obArrivalCity); var cityCountry_id = getCountry_id(city.code); if ((searchType == "milesPlusMoney") || (searchType == "redeemMiles")){ for (var i = 0; i < ourRoutes.length; i++){ var route = ourRoutes[i]; if ((route.departCity == city.code) && allowsBookingType(route, searchType, isMatesOrMatesPlus)){ return true; } } return false; } else if (isMatesOrMatesPlus) { for (var i = 0; i < ourRoutes.length; i++){ var route = ourRoutes[i]; //for mates allow a city even if it doesn't allow a mates booking but has the same country id as the outbound arrival city if ((route.departCity == city.code) && (route.allowsMatesOrMatesPlus || (obArrCountry_id == cityCountry_id))){ return true; } } return false; } else{ return true; } } /** Determines whether the given route allows the given booking type. **/ function allowsBookingType(route, searchType, isMatesOrMatesPlus){ if (searchType == "redeemMiles"){ return route.allowsRedemption; } else if (searchType == "milesPlusMoney"){ return route.allowsMPM; } else if (isMatesOrMatesPlus) { return route.allowsMatesOrMatesPlus; } else{ return true; } } // returns the route object with this departCity and arriveCity function getRoute(departCity, arriveCity) { var route; // this will occur on first entry into the main booking page as the inbound cities are not set // when this method is first called if (departCity == '' || arriveCity == '') { route = -1; } else { for (var i = 0; i < ourRoutes.length; i++) { route = ourRoutes[i]; if (route.departCity == departCity && route.arriveCity == arriveCity) break; } } return route; } //returns true if there's a route departing from city to the specified country function allowRouteAsInboundForMates(departCity, arrCountry_id) { var isMatesOrMatesPlus = isBookingMethodMates(); var searchType = getSearchType(); var obArrivalCity = document.main.arrival.value; var obArrCountry_id = getCountry_id(obArrivalCity); for (var i = 0; i < ourRoutes.length; i++) { var route = ourRoutes[i]; var ibDepCountry_id = getCountry_id(route.departCity); if ((route.departCity == departCity) && (getCountry_id(route.arriveCity)==arrCountry_id) && (ibDepCountry_id == obArrCountry_id)) { return true; } } return false; } // gets the cabin list number from the selected departure and arrival options function getCabinList(outbound){ var depCityCode; var arrCityCode; // get the route var route; if (outbound){ depCityCode = document.main.departure.value; arrCityCode = document.main.arrival.value; } else if (detailedBookingPage){ depCityCode = document.main.departureReturn.value; arrCityCode = document.main.arrivalReturn.value; } else{ depCityCode = document.main.arrival.value; arrCityCode = document.main.departure.value; } route = getRoute(depCityCode, arrCityCode); var cabinList; if (route != -1) { cabinList = route.cabinList; } else { cabinList = -1; } // need to return the cabin list number return cabinList; } /** Sets the cabin groups according to the booking type. This method is designed to be called only from the booking pages. **/ function setCabinGroups(){ var bookingType; var searchType = getSearchType(); if ((searchType == "redeemMiles") || (searchType == "milesPlusMoney")){ //for Redemtion and MPM used the Redemption cabin groups bookingType = 3; } else if (isBookingMethodMates()) { bookingType=6; } else{ bookingType = 1; } cabinGroups = allCabinGroups[bookingType]; } /** Determines the search type that is currently selected. **/ function getSearchType(){ var radioButtons = document.getElementsByName("search_type"); for (var i = 0; i < radioButtons.length; i++){ var currentButton = radioButtons[i]; if (currentButton.checked){ return currentButton.value; } } //if none of the radio buttons is selected, return the value of the first control. This can happen if the //radio buttons are not displayed and replaced with a hidden field with the same name. return radioButtons[0].value; } function isBookingMethodMates(){ return document.getElementsByName("mates").length > 0; } /** Refreshes the cities and cabins dropdowns when the booking type has changed. This method tries to preserve the user selections if possible. **/ function refreshDropdownsForBookingTypeChanged(){ var currentObDep = document.main.departure.value; var obArr = document.main.arrival.value; var preserveInbound = true; doOutboundDeparture(currentObDep); //if the previous selection is not present anymore in the dropdown select the default city for the gateway if (currentObDep != document.main.departure.value){ document.main.departure.value = gatewayCityCode; obArr = getDefaultArrival(gatewayCityCode); preserveInbound = false; } //populate the outbound arrival doOutboundArrival(document.main.departure.value, obArr); //if obArr is not present in the dropdown select the default arrival. This can happen if the departure does not //change but the route that was selected is not available for the current search type if (obArr != document.main.arrival.value){ tryToSelect(document.main.arrival, getDefaultArrival(document.main.departure.value)); preserveInbound = false; } if (preserveInbound){ if (detailedBookingPage){ //populate the inbound departure var currentIbDep = document.main.departureReturn.value; var ibArr = document.main.arrivalReturn.value; doInboundDeparture(currentIbDep); //if the previous selection is not present anymore in the dropdown select the outbound arrival if (currentIbDep != document.main.departureReturn.value){ tryToSelect(document.main.departureReturn, document.main.arrival.value); ibArr = document.main.departure.value; } doInboundArrival(document.main.departureReturn.value, ibArr); //if ibArr is not present in the dropdown select the departure. This can happen if the departure does not //change but the route that was selected is not available for the current search type if (ibArr != document.main.arrivalReturn.value){ tryToSelect(document.main.arrivalReturn, document.main.departure.value); } // for MPM check whether we should display only the return route in the inbound dropdowns checkMPMInboundRoute(); } // refresh the outbound cabins doOutboundCabin(document.main.classType.value); // refresh inbound cabins doInboundCabin(document.main.classTypeReturn.value); } else{ //if inbound selections should not be preserved, just call obArrivalChanged() obArrivalChanged(); } } /** * For MPM search checks whether the return route that corresponds to the selected outbound route is a valid MPM route. * If this is the case, this method takes no action. If not, sets as the inbound route the return route for the outbound. * This will be the only route that can be selected by the user. **/ function checkMPMInboundRoute(){ if (getSearchType() == "milesPlusMoney") { var departureCityCode = document.main.departure.value; var departureCityDesc = document.main.departure.options[document.main.departure.selectedIndex].text; var arrivalCityCode = document.main.arrival.value; var arrivalCityDesc = document.main.arrival.options[document.main.arrival.selectedIndex].text; var departureReturnDropdown = document.main.departureReturn; var arrivalReturnDropdown = document.main.arrivalReturn; if (!(isCityInDropdown(departureCityCode, arrivalReturnDropdown) && isCityInDropdown(arrivalCityCode, departureReturnDropdown))){ departureReturnDropdown.options.length = 0; arrivalReturnDropdown.options.length = 0; departureReturnDropdown.options[0] = new Option(arrivalCityDesc, arrivalCityCode); arrivalReturnDropdown.options[0] = new Option(departureCityDesc, departureCityCode); } } } /** * Determines whether the given city is in the given dropdown. **/ function isCityInDropdown(city, dropdown){ for (var i = 0; i < dropdown.length; i++){ if (city == dropdown.options[i].value){ return true; } } return false; } /* Tries to select the given value in the given dropdown. If the given value does not exist in the dropdown, the first value will be selected. */ function tryToSelect(dropdown, valueToSelect){ var exists = false; for (i = 0; i < dropdown.options.length; i++){ if (dropdown.options[i].value == valueToSelect){ exists = true; break; } } if (exists){ dropdown.value = valueToSelect; } else{ dropdown.selectedIndex = 0; } } // --------EVENT HANDLERS------- // Outbound Departure drop down changed function obDepChanged() { // do outbound arrival cities var departCity = document.main.departure.options[document.main.departure.selectedIndex].value; doOutboundArrival(departCity, getDefaultArrival(departCity)); // do outbound classes, inbound cities and classes if necessary obArrivalChanged(); } // Outbound arrival drop down changed function obArrivalChanged(){ // if we are on the main booking page then do the inbound stuff if (detailedBookingPage) { //if there's mates search the obDepCountry should be the same with the ibArrCountry // if (getSearchType() == "mates") { // doI // } else { // do inbound departure - set this to the same as the outbound arrival doInboundDeparture(document.main.arrival.options[document.main.arrival.selectedIndex].value); // } // do inbound arrival and classes - call the event as if the inbound departure has changed ibDepChanged(); } else{ // do outbound classes doOutboundCabin(document.main.classType.value); if (!nonBookingPage){ // do inbound cabins doInboundCabin(document.main.classTypeReturn.value); } } } // Outbound cabins drop down has changed function obCabinChanged() { // set the inbound cabin to this one doInboundCabin(document.main.classType.value); } // Inbound departure drop down changed function ibDepChanged() { // do inbound arrival cities doInboundArrival(document.main.departureReturn.value, document.main.departure.value); // for MPM check whether we should display only the return route in the inbound dropdowns checkMPMInboundRoute(); // do inbound classes ibArrivalChanged(); } // Inbound arrival drop down changed function ibArrivalChanged(){ // refresh the outbound cabins doOutboundCabin(document.main.classType.value); // do inbound cabins doInboundCabin(document.main.classTypeReturn.value); } /** Function called when the booking type has changed. This function is designed to be called only from the booking pages. **/ function bookingTypeChanged(){ var newlySelectedSearch = getSearchType(); if (!(((newlySelectedSearch == "exact_date") && (currentSearchOption == "lowest_fare")) || ((newlySelectedSearch == "lowest_fare") && (currentSearchOption == "exact_date")))){ setCabinGroups(); refreshDropdownsForBookingTypeChanged(); } if (newlySelectedSearch == "milesPlusMoney") { document.main.isreturn[0].checked = true; document.main.isreturn[1].disabled = true; doRoundTrip(true); } if (currentSearchOption == "milesPlusMoney") { document.main.isreturn[1].disabled = false; } currentSearchOption = newlySelectedSearch; } // -------- END EVENT HANDLERS ------- /** Enables or disables the controls for the return flight depending on whether round trip or one way was selected. **/ function doRoundTrip(isRoundTrip) { if (!isRoundTrip) { closeCalendarById('returnDate'); } document.main.returnDate.disabled = !isRoundTrip; document.main.classTypeReturn.disabled = !isRoundTrip; if (detailedBookingPage){ document.main.departureReturn.disabled = !isRoundTrip; document.main.arrivalReturn.disabled = !isRoundTrip; } } /** Determines whether the route between the given cities is multisector or not. **/ function isMultiSector(depCityCode, arrCityCode){ var route = getRoute(depCityCode, arrCityCode); return route.multiSector; } /** Determines whether mixed cabins are allowed or not. **/ function canMixCabins(){ var selectedSearch = getSearchType(); var outboundRoute = getRoute(document.main.departure.value, document.main.arrival.value); /** SYD - LON route is allowed for mixed cabins **/ var result = !outboundRoute.multiSector || (checkRoute(outboundRoute,"LON","SYD") && (selectedSearch != "milesPlusMoney")); if (result && detailedBookingPage){ var inboundRoute = getRoute(document.main.departureReturn.value, document.main.arrivalReturn.value); result = !inboundRoute.multiSector || checkRoute(inboundRoute,"LON","SYD"); } /** Checks if it's a MPM search and openJaw booking **/ if ((selectedSearch == "milesPlusMoney") && detailedBookingPage) { var outboundArrival = document.main.arrival.value; var inboundDeparture = document.main.departureReturn.value; if (!(outboundArrival == inboundDeparture)) { result = false; } } return result; } /** *Determines whether it's a specific route or not **/ function checkRoute(route, departureCity, arrivalCity){ if (((route.departCity.indexOf(departureCity) != -1) && (route.arriveCity.indexOf(arrivalCity) != -1)) || ((route.departCity.indexOf(arrivalCity) != -1) && (route.arriveCity.indexOf(departureCity) != -1))) { return true; } return false; } /** * Returns the country_id for a given city_code **/ function getCountry_id(cityCode){ for(i=0;i days) { var iSel = dayObject.selectedIndex; dayObject.options.length = 0; for (var i=0; i dayObject.options.length - 1) { iSel = dayObject.options.length - 1 } dayObject.options[iSel].selected = true; } } function theMonthYearChange(dayObject,monthObject,yearObject) { var year=yearObject; if(monthObject==2) { year=2004; } onMonthYearChange(dayObject,monthObject,year) } // added by Kishor K SCR ID:483 function monthChange(dayObject,monthYearObject) { var the_string = monthYearObject; if(the_string=="None") { return; } var broken_up_string = the_string.split("/"); var monthObject = broken_up_string[0]; var yearObject = broken_up_string[1]; //alert("monthObject="+monthObject); //alert("yearObject="+yearObject); onMonthYearChange3(dayObject,monthObject,yearObject); } // added by kishor k populate the days drop down options function onMonthYearChange3(dayObject,monthObject,yearObject) { // get the no of days in the new year/month combination var monthSelected = monthObject; var yearSelected = yearObject; //monthSelected = monthSelected-1; var days = days_in_month (yearSelected , monthSelected); //alert("days_in_month"+days); var currentDays1 = dayObject.length-1; var currentDays = dayObject.length; if(currentDays1 == days) return; if(currentDays1 < days) { var iSel = dayObject.selectedIndex; var diff = days - currentDays1; for(var i=0; i days) { var iSel = dayObject.selectedIndex; dayObject.options.length = 0; dayObject.options[dayObject.options.length] = new Option("", -1); for (var i=0; i dayObject.options.length - 1) { iSel = dayObject.options.length - 1 } dayObject.options[iSel].selected = true; } } function advanceDepartureDateTo7Days(departureDay,countryId,returnDay,currentYear,currentMonth,currentDay,departureYear,departureMonth,returnMonth,returnYear) { var year =currentYear; var month =currentMonth; var day =currentDay; var dayAdvancedTo7Days=day+7; var daysInCurrentMonth = days_in_month(currentYear,currentMonth); var newDate = dayAdvancedTo7Days - daysInCurrentMonth ; var newMonth = currentMonth; if(dayAdvancedTo7Days > daysInCurrentMonth) { newMonth = currentMonth+1; } else { newDate =dayAdvancedTo7Days; } var departureDateWithin7Days=false; var returnDateWithin7Days=false; if(countryId == 10) { departureDateWithin7Days = isWithin7Days (year, month,day,departureYear.value, departureMonth.options[departureMonth.selectedIndex].value-1,departureDay.options[departureDay.selectedIndex].value,newDate,newMonth); returnDateWithin7Days = isWithin7Days (year, month,day,returnYear.value, returnMonth.options[returnMonth.selectedIndex].value-1,returnDay.options[returnDay.selectedIndex].value,newDate,newMonth); if(departureDateWithin7Days) { advanceDateTo7Days(departureDay,departureMonth,dayAdvancedTo7Days,daysInCurrentMonth,newMonth,newDate); } if(returnDateWithin7Days) { advanceDateTo7Days(returnDay,returnMonth,dayAdvancedTo7Days,daysInCurrentMonth,newMonth,newDate); } } } function isWithin7Days (currentYear, currentMonth,currentDay,tripYear, tripMonth,tripDay,newDate,newMonth) { var currentDate=new Date(currentYear, currentMonth,currentDay).getDate(); var tripDate=new Date(tripYear, tripMonth,tripDay).getDate(); //var dayAdvancedTo7Days=tripDay+7; //var daysInCurrentMonth = days_in_month(tripYear,tripMonth); //var newTripDate = dayAdvancedTo7Days - daysInCurrentMonth ; if(tripYear >= currentYear) { if(tripMonth > newMonth) { return false; } else if(tripMonth == newMonth) { //alert("tripDate ="+tripDate +"newDate="+newDate); if(tripDate > newDate) { return false; } } } return true; } function advanceDateTo7Days(day,month,dayAdvancedTo7Days,daysInCurrentMonth,newMonth,newDate) { var newDate = 0; //alert("dayAdvancedTo7Days ="+dayAdvancedTo7Days +"daysInCurrentMonth="+daysInCurrentMonth); if(dayAdvancedTo7Days > daysInCurrentMonth) { newDate = dayAdvancedTo7Days - daysInCurrentMonth -1; } else { newDate = dayAdvancedTo7Days -1; } //alert("newDate ="+newDate ); var tripMonth=month.options[month.selectedIndex].value-1; if(tripMonth < newMonth) { month = month.options[month.selectedIndex+1].selected =true; day.options[newDate].selected = true; } else { day.options[newDate].selected = true; } } /** Populates the given daySelect with the given number of days. Includes a blank option or not depending on the blankOption parameter. **/ function populateDaySelect(daySelect, nrDays, blankOption, selectedValue){ daySelect.length = 0; if (blankOption){ daySelect.options[daySelect.length] = new Option('', ''); } for (i = 1; i <= nrDays; i++){ daySelect.options[daySelect.length] = new Option(i, i); } if ((selectedValue != '') && (selectedValue > nrDays)){ selectedValue = nrDays; } daySelect.value = selectedValue; } // popup Created by S. Barlas 08.11.2001 // This function opens a pop-up window // The Imputs: // URL : the relative URL path of the document to open in the window // scroll : value of 1 - scrollable , 0 - no scroll bars // width : width of window in pixels // height : height of window in pixels function popup(URL, scroll, width, height) { day = new Date(); id = day.getTime(); popup(URL, scroll, width, height, id); } function popup(URL, scroll, width, height, id) { eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=" + scroll + ",location=0,statusbar=0,menubar=1,resizable=1,width=" + width + ",height=" + height + "');") } function popUp1(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=1,resizable=1,width=344,height=270');"); } function popUp2(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,width=455,height=270');"); } function popup1(URL, scroll, width, height) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=" + scroll + ",location=1,statusbar=1,menubar=1,resizable=1,width=" + width + ",height=" + height + "');"); } /* * File: submitTest.js * Author: David J. Bradshaw * dave.bradshaw@conchango.com * Date: 2004-06-11 * * Desc: Stop form being submitted twice. * Add onsubmit="return submitTest.check();" * to the form tag. * * (c) Conchango PLC 2004 * www.conchango.com */ var submitTest = new Object(); submitTest.submitted = false; submitTest.check = function() { var rc=false; if (!this.submitted) this.submitted = rc = true; return rc; } /** * This function is called only if the 'Continue' link is accessed. * It is used in order to disable page submit command for everything but the 'Continue' button. */ function setSubmitTrue(formId) { if (submitTest.check()) { document.getElementById(formId).submit(); } } function planeClick(n) { if (n.childNodes[0] && n.childNodes[0].href) location.href=n.childNodes[0].href; } document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.getElementById('jsEnabled').value='true' document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write('

Flight
From
'); document.write(''); document.write('
Departing
'); document.write(''); document.write('
Cabin
'); document.write(''); document.write('
To
'); document.write(''); document.write('
Returning
Cabin
'); document.write(''); document.write('

Passengers
'); document.write(''); document.write(''); document.write(''); document.write(''); document.write('
'); document.write(''); document.write(''); document.write(''); document.write(''); document.write('
'); document.write(''); document.write(''); document.write(''); document.write(''); document.write('

Search for
'); document.write(''); document.write('
'); document.write(''); document.write(''); document.write('
'); var detailedBookingPage=false; var nonBookingPage=false; var cabinGroups; var currentSearchOption = null; var cityNames = new Array(new City('ALB', 'Albany', true, false),new City('ANU', 'Antigua', true, false),new City('ATL', 'Atlanta', true, false),new City('BGI', 'Barbados', true, false),new City('BOS', 'Boston', true, false),new City('CPT', 'Cape Town', true, false),new City('CHI', 'Chicago', true, false),new City('CLE', 'Cleveland', true, false),new City('DEL', 'Delhi', true, false),new City('DTT', 'Detroit', true, false),new City('DXB', 'Dubai', true, false),new City('DUR', 'Durban', true, false),new City('ELS', 'East London', true, false),new City('GLA', 'Glasgow', true, false),new City('GND', 'Grenada', true, false),new City('HAV', 'Havana', true, false),new City('HKG', 'Hong Kong', true, false),new City('HOU', 'Houston', true, false),new City('JNB', 'Johannesburg', true, false),new City('KIN', 'Kingston', true, false),new City('LOS', 'Lagos', true, false),new City('LAS', 'Las Vegas', true, false),new City('LON', 'London All', true, false),new City('LONLGW', 'London Gatwick', true, false),new City('LONLHR', 'London Heathrow', true, false),new City('LAX', 'Los Angeles', true, false),new City('MAN', 'Manchester', true, false),new City('MRU', 'Mauritius', true, false),new City('MIA', 'Miami', true, false),new City('MBJ', 'Montego Bay', true, false),new City('BOM', 'Mumbai', true, false),new City('NBO', 'Nairobi', true, false),new City('NYC', 'New York All', true, false),new City('NYCJFK', 'New York JFK', true, false),new City('NYCEWR', 'New York Newark', true, false),new City('ORL', 'Orlando', true, false),new City('PHX', 'Phoenix', true, false),new City('PLZ', 'Port Elizabeth', true, false),new City('PVD', 'Providence', true, false),new City('RDU', 'Raleigh Durham', true, false),new City('RIC', 'Richmond', true, false),new City('ROC', 'Rochester', true, false),new City('SFO', 'San Francisco', true, false),new City('SHA', 'Shanghai', true, false),new City('SIN', 'Singapore', true, false),new City('SLU', 'St Lucia', true, false),new City('SYD', 'Sydney', true, false),new City('TAB', 'Tobago', true, false),new City('TYO', 'Tokyo', true, false),new City('WAS', 'Washington', true, false)); var ourRoutes = new Array(new Route('ALB', 'LON', 3, true, false, false), new Route('ALB', 'LONLHR', 3, true, false, false), new Route('ANU', 'HKG', 3, true, true, false), new Route('ANU', 'JNB', 3, true, true, false), new Route('ANU', 'LOS', 3, true, true, false), new Route('ANU', 'LON', 1, false, true, true), new Route('ANU', 'LONLGW', 1, false, true, true), new Route('ANU', 'NBO', 1, true, true, false), new Route('ANU', 'SHA', 3, true, true, false), new Route('ANU', 'SIN', 5, true, false, false), new Route('ANU', 'TYO', 3, true, true, false), new Route('ATL', 'LON', 3, true, false, false), new Route('ATL', 'LONLHR', 3, true, false, false), new Route('BGI', 'CPT', 3, true, true, false), new Route('BGI', 'DEL', 3, true, true, false), new Route('BGI', 'HKG', 3, true, true, false), new Route('BGI', 'JNB', 3, true, true, false), new Route('BGI', 'LOS', 3, true, true, false), new Route('BGI', 'LON', 1, false, true, true), new Route('BGI', 'LONLGW', 1, false, true, true), new Route('BGI', 'LONLHR', 1, false, true, true), new Route('BGI', 'MAN', 1, false, true, true), new Route('BGI', 'NBO', 1, true, true, false), new Route('BGI', 'SHA', 3, true, true, false), new Route('BGI', 'SIN', 5, true, false, false), new Route('BGI', 'TYO', 3, true, true, false), new Route('BOS', 'CPT', 3, true, true, false), new Route('BOS', 'DEL', 3, true, true, false), new Route('BOS', 'DXB', 3, true, true, false), new Route('BOS', 'HKG', 3, true, true, false), new Route('BOS', 'JNB', 3, true, true, false), new Route('BOS', 'LOS', 3, true, true, false), new Route('BOS', 'LON', 1, false, true, true), new Route('BOS', 'LONLHR', 1, false, true, true), new Route('BOS', 'BOM', 3, true, true, false), new Route('BOS', 'NBO', 3, true, true, false), new Route('BOS', 'SHA', 3, true, true, false), new Route('BOS', 'SIN', 5, true, false, false), new Route('BOS', 'TYO', 3, true, true, false), new Route('CPT', 'BGI', 3, true, true, false), new Route('CPT', 'BOS', 3, true, true, false), new Route('CPT', 'CHI', 3, true, true, false), new Route('CPT', 'DEL', 3, true, true, false), new Route('CPT', 'HKG', 3, true, true, false), new Route('CPT', 'JNB', 1, false, false, false), new Route('CPT', 'LAS', 3, true, true, false), new Route('CPT', 'LON', 1, false, true, true), new Route('CPT', 'LONLHR', 1, false, true, true), new Route('CPT', 'LAX', 3, true, true, false), new Route('CPT', 'MIA', 3, true, true, false), new Route('CPT', 'NYC', 3, true, true, false), new Route('CPT', 'NYCJFK', 3, true, true, false), new Route('CPT', 'NYCEWR', 3, true, true, false), new Route('CPT', 'ORL', 3, true, true, false), new Route('CPT', 'SFO', 3, true, true, false), new Route('CPT', 'SIN', 5, true, false, false), new Route('CPT', 'TYO', 3, true, true, false), new Route('CPT', 'WAS', 3, true, true, false), new Route('CHI', 'CPT', 3, true, true, false), new Route('CHI', 'DEL', 3, true, true, false), new Route('CHI', 'DXB', 3, true, true, false), new Route('CHI', 'HKG', 3, true, true, false), new Route('CHI', 'JNB', 3, true, true, false), new Route('CHI', 'LOS', 3, true, true, false), new Route('CHI', 'LON', 1, false, true, true), new Route('CHI', 'LONLHR', 1, false, true, true), new Route('CHI', 'BOM', 3, true, true, false), new Route('CHI', 'NBO', 3, true, true, false), new Route('CHI', 'SHA', 3, true, true, false), new Route('CHI', 'SIN', 3, true, false, false), new Route('CHI', 'TYO', 3, true, true, false), new Route('CLE', 'LON', 3, true, false, false), new Route('CLE', 'LONLHR', 3, true, false, false), new Route('DEL', 'BGI', 3, true, true, false), new Route('DEL', 'BOS', 3, true, true, false), new Route('DEL', 'CPT', 3, true, true, false), new Route('DEL', 'CHI', 3, true, true, false), new Route('DEL', 'HKG', 3, true, false, false), new Route('DEL', 'JNB', 3, true, true, false), new Route('DEL', 'LOS', 3, true, true, false), new Route('DEL', 'LAS', 3, true, true, false), new Route('DEL', 'LON', 1, false, true, false), new Route('DEL', 'LONLHR', 1, false, true, false), new Route('DEL', 'LAX', 3, true, true, false), new Route('DEL', 'MIA', 3, true, true, false), new Route('DEL', 'NBO', 1, true, true, false), new Route('DEL', 'NYC', 3, true, true, false), new Route('DEL', 'NYCJFK', 3, true, true, false), new Route('DEL', 'NYCEWR', 3, true, true, false), new Route('DEL', 'ORL', 3, true, true, false), new Route('DEL', 'SFO', 3, true, true, false), new Route('DEL', 'SHA', 3, true, false, false), new Route('DEL', 'SIN', 3, true, false, false), new Route('DEL', 'TYO', 3, true, false, false), new Route('DEL', 'WAS', 3, true, true, false), new Route('DTT', 'LON', 3, true, false, false), new Route('DTT', 'LONLHR', 3, true, false, false), new Route('DXB', 'BOS', 3, true, true, false), new Route('DXB', 'CHI', 3, true, true, false), new Route('DXB', 'LOS', 3, true, true, false), new Route('DXB', 'LAS', 3, true, true, false), new Route('DXB', 'LON', 1, false, true, false), new Route('DXB', 'LONLHR', 1, false, true, false), new Route('DXB', 'LAX', 3, true, true, false), new Route('DXB', 'MIA', 3, true, true, false), new Route('DXB', 'NBO', 1, true, true, false), new Route('DXB', 'NYC', 3, true, true, false), new Route('DXB', 'NYCJFK', 3, true, true, false), new Route('DXB', 'NYCEWR', 3, true, true, false), new Route('DXB', 'ORL', 3, true, true, false), new Route('DXB', 'SFO', 3, true, true, false), new Route('DXB', 'WAS', 3, true, true, false), new Route('DUR', 'LON', 1, true, false, false), new Route('DUR', 'LONLHR', 1, true, false, false), new Route('ELS', 'LON', 1, true, false, false), new Route('ELS', 'LONLHR', 1, true, false, false), new Route('GLA', 'ORL', 1, false, true, false), new Route('GND', 'HKG', 3, true, true, false), new Route('GND', 'JNB', 3, true, true, false), new Route('GND', 'LOS', 3, true, true, false), new Route('GND', 'LON', 1, false, true, true), new Route('GND', 'LONLGW', 1, false, true, true), new Route('GND', 'SHA', 3, true, true, false), new Route('GND', 'SIN', 5, true, false, false), new Route('GND', 'TYO', 3, true, true, false), new Route('HAV', 'LON', 1, false, true, true), new Route('HAV', 'LONLGW', 1, false, true, true), new Route('HKG', 'ANU', 3, true, true, false), new Route('HKG', 'BGI', 3, true, true, false), new Route('HKG', 'BOS', 3, true, true, false), new Route('HKG', 'CPT', 3, true, true, false), new Route('HKG', 'CHI', 3, true, true, false), new Route('HKG', 'DEL', 3, true, false, false), new Route('HKG', 'GND', 3, true, true, false), new Route('HKG', 'JNB', 3, true, true, false), new Route('HKG', 'LOS', 3, true, true, false), new Route('HKG', 'LAS', 3, true, true, false), new Route('HKG', 'LON', 1, false, true, false), new Route('HKG', 'LONLHR', 1, false, true, false), new Route('HKG', 'LAX', 3, true, true, false), new Route('HKG', 'MIA', 3, true, true, false), new Route('HKG', 'NBO', 1, true, true, false), new Route('HKG', 'NYC', 3, true, true, false), new Route('HKG', 'NYCJFK', 3, true, true, false), new Route('HKG', 'NYCEWR', 3, true, true, false), new Route('HKG', 'ORL', 3, true, true, false), new Route('HKG', 'SFO', 3, true, true, false), new Route('HKG', 'SLU', 3, true, true, false), new Route('HKG', 'SYD', 1, false, true, false), new Route('HKG', 'TAB', 3, true, true, false), new Route('HKG', 'WAS', 3, true, true, false), new Route('HOU', 'LON', 3, true, false, false), new Route('HOU', 'LONLHR', 3, true, false, false), new Route('JNB', 'ANU', 3, true, true, false), new Route('JNB', 'BGI', 3, true, true, false), new Route('JNB', 'BOS', 3, true, true, false), new Route('JNB', 'CPT', 1, false, false, false), new Route('JNB', 'CHI', 3, true, true, false), new Route('JNB', 'DEL', 3, true, true, false), new Route('JNB', 'GND', 3, true, true, false), new Route('JNB', 'HKG', 3, true, true, false), new Route('JNB', 'LAS', 3, true, true, false), new Route('JNB', 'LON', 1, false, true, true), new Route('JNB', 'LONLHR', 1, false, true, true), new Route('JNB', 'LAX', 3, true, true, false), new Route('JNB', 'MIA', 3, true, true, false), new Route('JNB', 'NYC', 3, true, true, false), new Route('JNB', 'NYCJFK', 3, true, true, false), new Route('JNB', 'NYCEWR', 3, true, true, false), new Route('JNB', 'ORL', 3, true, true, false), new Route('JNB', 'SFO', 3, true, true, false), new Route('JNB', 'SHA', 3, true, true, false), new Route('JNB', 'SLU', 3, true, true, false), new Route('JNB', 'TAB', 3, true, true, false), new Route('JNB', 'TYO', 3, true, true, false), new Route('JNB', 'WAS', 3, true, true, false), new Route('KIN', 'LON', 1, false, true, true), new Route('KIN', 'LONLGW', 1, false, true, true), new Route('LOS', 'ANU', 3, true, true, false), new Route('LOS', 'BGI', 3, true, true, false), new Route('LOS', 'BOS', 3, true, true, false), new Route('LOS', 'CHI', 3, true, true, false), new Route('LOS', 'DEL', 3, true, true, false), new Route('LOS', 'DXB', 3, true, true, false), new Route('LOS', 'GND', 3, true, true, false), new Route('LOS', 'HAV', 3, true, true, false), new Route('LOS', 'HKG', 3, true, true, false), new Route('LOS', 'LAS', 3, true, true, false), new Route('LOS', 'LON', 1, false, true, true), new Route('LOS', 'LONLHR', 1, false, true, true), new Route('LOS', 'LAX', 3, true, true, false), new Route('LOS', 'MIA', 3, true, true, false), new Route('LOS', 'BOM', 3, true, true, false), new Route('LOS', 'NYC', 3, true, true, false), new Route('LOS', 'NYCJFK', 3, true, true, false), new Route('LOS', 'NYCEWR', 3, true, true, false), new Route('LOS', 'ORL', 3, true, true, false), new Route('LOS', 'SFO', 3, true, true, false), new Route('LOS', 'SHA', 3, true, true, false), new Route('LOS', 'SIN', 5, true, false, false), new Route('LOS', 'SLU', 3, true, true, false), new Route('LOS', 'TAB', 3, true, true, false), new Route('LOS', 'TYO', 3, true, true, false), new Route('LOS', 'WAS', 3, true, true, false), new Route('LAS', 'CPT', 3, true, true, false), new Route('LAS', 'DEL', 3, true, true, false), new Route('LAS', 'DXB', 3, true, true, false), new Route('LAS', 'HKG', 3, true, true, false), new Route('LAS', 'JNB', 3, true, true, false), new Route('LAS', 'LOS', 3, true, true, false), new Route('LAS', 'LON', 1, false, true, true), new Route('LAS', 'LONLGW', 1, false, true, true), new Route('LAS', 'BOM', 3, true, true, false), new Route('LAS', 'NBO', 3, true, true, false), new Route('LAS', 'TYO', 3, true, true, false), new Route('LON', 'ANU', 1, false, true, true), new Route('LON', 'ATL', 3, true, false, false), new Route('LON', 'BGI', 1, false, true, true), new Route('LON', 'BOS', 1, false, true, true), new Route('LON', 'CPT', 1, false, true, true), new Route('LON', 'CHI', 1, false, true, true), new Route('LON', 'CLE', 3, true, false, false), new Route('LON', 'DEL', 1, false, true, true), new Route('LON', 'DTT', 3, true, false, false), new Route('LON', 'DXB', 1, false, true, true), new Route('LON', 'DUR', 1, true, false, false), new Route('LON', 'ELS', 1, true, false, false), new Route('LON', 'GND', 1, false, true, true), new Route('LON', 'HAV', 1, false, true, true), new Route('LON', 'HKG', 1, false, true, true), new Route('LON', 'HOU', 3, true, false, false), new Route('LON', 'JNB', 1, false, true, true), new Route('LON', 'KIN', 1, false, true, true), new Route('LON', 'LOS', 1, false, true, true), new Route('LON', 'LAS', 1, false, true, true), new Route('LON', 'LAX', 1, false, true, true), new Route('LON', 'MRU', 1, false, true, true), new Route('LON', 'MIA', 1, false, true, true), new Route('LON', 'MBJ', 1, false, true, true), new Route('LON', 'BOM', 1, false, true, true), new Route('LON', 'NBO', 1, false, true, true), new Route('LON', 'NYC', 1, false, true, true), new Route('LON', 'NYCJFK', 1, false, true, true), new Route('LON', 'NYCEWR', 1, false, true, true), new Route('LON', 'ORF', 3, true, false, false), new Route('LON', 'ORL', 1, false, true, true), new Route('LON', 'PHX', 1, true, false, false), new Route('LON', 'PLZ', 1, true, false, false), new Route('LON', 'PVD', 3, true, false, false), new Route('LON', 'RDU', 3, true, false, false), new Route('LON', 'RIC', 3, true, false, false), new Route('LON', 'SFO', 1, false, true, true), new Route('LON', 'SHA', 1, false, true, true), new Route('LON', 'SIN', 5, false, false, false), new Route('LON', 'SLU', 1, false, true, true), new Route('LON', 'SYD', 1, true, true, true), new Route('LON', 'TAB', 1, false, true, true), new Route('LON', 'TYO', 1, false, true, true), new Route('LON', 'WAS', 1, false, true, true), new Route('LONLGW', 'ANU', 1, false, true, true), new Route('LONLGW', 'BGI', 1, false, true, true), new Route('LONLGW', 'GND', 1, false, true, true), new Route('LONLGW', 'HAV', 1, false, true, true), new Route('LONLGW', 'KIN', 1, false, true, true), new Route('LONLGW', 'LAS', 1, false, true, true), new Route('LONLGW', 'MBJ', 1, false, true, true), new Route('LONLGW', 'NYC', 1, false, true, true), new Route('LONLGW', 'NYCEWR', 1, false, true, true), new Route('LONLGW', 'ORL', 1, false, true, true), new Route('LONLGW', 'PHX', 1, true, false, false), new Route('LONLGW', 'SLU', 1, false, true, true), new Route('LONLGW', 'TAB', 1, false, true, true), new Route('LONLHR', 'ATL', 3, true, false, false), new Route('LONLHR', 'BGI', 1, false, true, true), new Route('LONLHR', 'BOS', 1, false, true, true), new Route('LONLHR', 'CPT', 1, false, true, true), new Route('LONLHR', 'CHI', 1, false, true, true), new Route('LONLHR', 'CLE', 3, true, false, false), new Route('LONLHR', 'DEL', 1, false, true, true), new Route('LONLHR', 'DTT', 3, true, false, false), new Route('LONLHR', 'DXB', 1, false, true, true), new Route('LONLHR', 'DUR', 1, true, false, false), new Route('LONLHR', 'ELS', 1, true, false, false), new Route('LONLHR', 'HKG', 1, false, true, true), new Route('LONLHR', 'HOU', 3, true, false, false), new Route('LONLHR', 'JNB', 1, false, true, true), new Route('LONLHR', 'LOS', 1, false, true, true), new Route('LONLHR', 'LAS', 1, false, true, true), new Route('LONLHR', 'LAX', 1, false, true, true), new Route('LONLHR', 'MRU', 1, false, true, true), new Route('LONLHR', 'MIA', 1, false, true, true), new Route('LONLHR', 'BOM', 1, false, true, true), new Route('LONLHR', 'NBO', 1, false, true, true), new Route('LONLHR', 'NYC', 1, false, true, true), new Route('LONLHR', 'NYCJFK', 1, false, true, true), new Route('LONLHR', 'NYCEWR', 1, false, true, true), new Route('LONLHR', 'ORF', 3, true, false, false), new Route('LONLHR', 'PHX', 1, true, false, false), new Route('LONLHR', 'PLZ', 1, true, false, false), new Route('LONLHR', 'PVD', 3, true, false, false), new Route('LONLHR', 'RDU', 3, true, false, false), new Route('LONLHR', 'RIC', 3, true, false, false), new Route('LONLHR', 'SFO', 1, false, true, true), new Route('LONLHR', 'SHA', 1, false, true, true), new Route('LONLHR', 'SIN', 5, false, false, false), new Route('LONLHR', 'SYD', 1, true, true, true), new Route('LONLHR', 'TYO', 1, false, true, true), new Route('LONLHR', 'WAS', 1, false, true, true), new Route('LAX', 'CPT', 3, true, true, false), new Route('LAX', 'DEL', 3, true, true, false), new Route('LAX', 'DXB', 3, true, true, false), new Route('LAX', 'HKG', 3, true, true, false), new Route('LAX', 'JNB', 3, true, true, false), new Route('LAX', 'LOS', 3, true, true, false), new Route('LAX', 'LON', 1, false, true, true), new Route('LAX', 'LONLGW', 1, false, true, true), new Route('LAX', 'LONLHR', 1, false, true, true), new Route('LAX', 'BOM', 3, true, true, false), new Route('LAX', 'NBO', 3, true, true, false), new Route('MAN', 'BGI', 1, false, true, true), new Route('MAN', 'ORL', 1, false, true, true), new Route('MAN', 'SIN', 5, false, false, false), new Route('MAN', 'SLU', 1, false, true, true), new Route('MRU', 'LON', 1, false, false, false), new Route('MRU', 'LONLHR', 1, false, false, false), new Route('MIA', 'CPT', 3, true, true, false), new Route('MIA', 'DEL', 3, true, true, false), new Route('MIA', 'DXB', 3, true, true, false), new Route('MIA', 'HKG', 3, true, true, false), new Route('MIA', 'JNB', 3, true, true, false), new Route('MIA', 'LOS', 3, true, true, false), new Route('MIA', 'LON', 1, false, true, true), new Route('MIA', 'LONLHR', 1, false, true, true), new Route('MIA', 'BOM', 3, true, true, false), new Route('MIA', 'NBO', 3, true, true, false), new Route('MIA', 'SHA', 3, true, true, false), new Route('MIA', 'SIN', 5, true, false, false), new Route('MIA', 'TYO', 3, true, true, false), new Route('MBJ', 'LON', 1, false, true, true), new Route('MBJ', 'LONLGW', 1, false, true, true), new Route('BOM', 'BOS', 3, true, true, false), new Route('BOM', 'CHI', 3, true, true, false), new Route('BOM', 'LOS', 3, true, true, false), new Route('BOM', 'LAS', 3, true, true, false), new Route('BOM', 'LON', 1, false, true, false), new Route('BOM', 'LONLHR', 1, false, true, false), new Route('BOM', 'LAX', 3, true, true, false), new Route('BOM', 'MIA', 3, true, true, false), new Route('BOM', 'NBO', 1, true, true, false), new Route('BOM', 'NYC', 3, true, true, false), new Route('BOM', 'NYCJFK', 3, true, true, false), new Route('BOM', 'NYCEWR', 3, true, true, false), new Route('BOM', 'ORL', 3, true, true, false), new Route('BOM', 'SFO', 3, true, true, false), new Route('BOM', 'WAS', 3, true, true, false), new Route('NBO', 'ANU', 1, true, true, false), new Route('NBO', 'BGI', 1, true, true, false), new Route('NBO', 'BOS', 3, true, true, false), new Route('NBO', 'CHI', 3, true, true, false), new Route('NBO', 'DEL', 1, true, true, false), new Route('NBO', 'DXB', 1, true, true, false), new Route('NBO', 'HKG', 1, true, true, false), new Route('NBO', 'LAS', 3, true, true, false), new Route('NBO', 'LON', 1, false, true, false), new Route('NBO', 'LONLHR', 1, false, true, false), new Route('NBO', 'LAX', 3, true, true, false), new Route('NBO', 'MIA', 3, true, true, false), new Route('NBO', 'BOM', 1, true, true, false), new Route('NBO', 'NYC', 3, true, true, false), new Route('NBO', 'NYCJFK', 3, true, true, false), new Route('NBO', 'NYCEWR', 3, true, true, false), new Route('NBO', 'ORL', 3, true, true, false), new Route('NBO', 'SFO', 3, true, true, false), new Route('NBO', 'SHA', 1, true, true, false), new Route('NBO', 'SIN', 1, true, false, false), new Route('NBO', 'SYD', 1, true, true, false), new Route('NBO', 'TYO', 1, true, true, false), new Route('NBO', 'WAS', 3, true, true, false), new Route('NYC', 'CPT', 3, true, true, false), new Route('NYC', 'DEL', 3, true, true, false), new Route('NYC', 'DXB', 3, true, true, false), new Route('NYC', 'HKG', 3, true, true, false), new Route('NYC', 'JNB', 3, true, true, false), new Route('NYC', 'LOS', 3, true, true, false), new Route('NYC', 'LON', 1, false, true, true), new Route('NYC', 'LONLGW', 1, false, true, true), new Route('NYC', 'LONLHR', 1, false, true, true), new Route('NYC', 'BOM', 3, true, true, false), new Route('NYC', 'NBO', 3, true, true, false), new Route('NYC', 'SHA', 3, true, true, false), new Route('NYC', 'SIN', 5, true, false, false), new Route('NYC', 'TYO', 3, true, true, false), new Route('NYCJFK', 'CPT', 3, true, true, false), new Route('NYCJFK', 'DEL', 3, true, true, false), new Route('NYCJFK', 'DXB', 3, true, true, false), new Route('NYCJFK', 'HKG', 3, true, true, false), new Route('NYCJFK', 'JNB', 3, true, true, false), new Route('NYCJFK', 'LOS', 3, true, true, false), new Route('NYCJFK', 'LON', 1, false, true, true), new Route('NYCJFK', 'LONLHR', 1, false, true, true), new Route('NYCJFK', 'BOM', 3, true, true, false), new Route('NYCJFK', 'NBO', 3, true, true, false), new Route('NYCJFK', 'SHA', 3, true, true, false), new Route('NYCJFK', 'SIN', 5, true, false, false), new Route('NYCJFK', 'TYO', 3, true, true, false), new Route('NYCEWR', 'CPT', 3, true, true, false), new Route('NYCEWR', 'DEL', 3, true, true, false), new Route('NYCEWR', 'DXB', 3, true, true, false), new Route('NYCEWR', 'HKG', 3, true, true, false), new Route('NYCEWR', 'JNB', 3, true, true, false), new Route('NYCEWR', 'LOS', 3, true, true, false), new Route('NYCEWR', 'LON', 1, false, true, true), new Route('NYCEWR', 'LONLGW', 1, false, true, true), new Route('NYCEWR', 'LONLHR', 1, false, true, true), new Route('NYCEWR', 'BOM', 3, true, true, false), new Route('NYCEWR', 'NBO', 3, true, true, false), new Route('NYCEWR', 'SHA', 3, true, true, false), new Route('NYCEWR', 'SIN', 5, true, false, false), new Route('NYCEWR', 'TYO', 3, true, true, false), new Route('ORL', 'CPT', 3, true, true, false), new Route('ORL', 'DEL', 3, true, true, false), new Route('ORL', 'DXB', 3, true, true, false), new Route('ORL', 'GLA', 1, false, true, false), new Route('ORL', 'HKG', 3, true, true, false), new Route('ORL', 'JNB', 3, true, true, false), new Route('ORL', 'LOS', 3, true, true, false), new Route('ORL', 'LON', 1, false, true, true), new Route('ORL', 'LONLGW', 1, false, true, true), new Route('ORL', 'MAN', 1, false, true, true), new Route('ORL', 'BOM', 3, true, true, false), new Route('ORL', 'NBO', 3, true, true, false), new Route('ORL', 'SHA', 3, true, true, false), new Route('ORL', 'SIN', 5, true, false, false), new Route('ORL', 'TYO', 3, true, true, false), new Route('PHX', 'LON', 1, true, false, false), new Route('PHX', 'LONLGW', 1, true, false, false), new Route('PHX', 'LONLHR', 1, true, false, false), new Route('PLZ', 'LON', 1, true, false, false), new Route('PLZ', 'LONLHR', 1, true, false, false), new Route('PVD', 'LON', 3, true, false, false), new Route('PVD', 'LONLHR', 3, true, false, false), new Route('RDU', 'LON', 3, true, false, false), new Route('RDU', 'LONLHR', 3, true, false, false), new Route('RIC', 'LON', 3, true, false, false), new Route('RIC', 'LONLHR', 3, true, false, false), new Route('ROC', 'LON', 3, true, false, false), new Route('ROC', 'LONLHR', 3, true, false, false), new Route('SFO', 'CPT', 3, true, true, false), new Route('SFO', 'DEL', 3, true, true, false), new Route('SFO', 'DXB', 3, true, true, false), new Route('SFO', 'HKG', 3, true, true, false), new Route('SFO', 'JNB', 3, true, true, false), new Route('SFO', 'LOS', 3, true, true, false), new Route('SFO', 'LON', 1, false, true, true), new Route('SFO', 'LONLHR', 1, false, true, true), new Route('SFO', 'BOM', 3, true, true, false), new Route('SFO', 'NBO', 3, true, true, false), new Route('SFO', 'SHA', 3, true, true, false), new Route('SFO', 'TYO', 3, true, true, false), new Route('SHA', 'ANU', 3, true, true, false), new Route('SHA', 'BGI', 3, true, true, false), new Route('SHA', 'BOS', 3, true, true, false), new Route('SHA', 'CHI', 3, true, true, false), new Route('SHA', 'DEL', 3, true, false, false), new Route('SHA', 'GND', 3, true, true, false), new Route('SHA', 'JNB', 3, true, true, false), new Route('SHA', 'LOS', 3, true, true, false), new Route('SHA', 'LON', 1, false, true, false), new Route('SHA', 'LONLHR', 1, false, true, false), new Route('SHA', 'MIA', 3, true, true, false), new Route('SHA', 'NBO', 1, true, true, false), new Route('SHA', 'NYC', 3, true, true, false), new Route('SHA', 'NYCJFK', 3, true, true, false), new Route('SHA', 'NYCEWR', 3, true, true, false), new Route('SHA', 'ORL', 3, true, true, false), new Route('SHA', 'SFO', 3, true, true, false), new Route('SHA', 'SLU', 3, true, true, false), new Route('SHA', 'TAB', 3, true, true, false), new Route('SHA', 'WAS', 3, true, true, false), new Route('SIN', 'ANU', 5, true, false, false), new Route('SIN', 'BGI', 5, true, false, false), new Route('SIN', 'BOS', 5, true, false, false), new Route('SIN', 'CPT', 5, true, false, false), new Route('SIN', 'CHI', 3, true, false, false), new Route('SIN', 'DEL', 3, true, false, false), new Route('SIN', 'GND', 5, true, false, false), new Route('SIN', 'LOS', 5, true, false, false), new Route('SIN', 'LON', 5, false, false, false), new Route('SIN', 'LONLHR', 5, false, false, false), new Route('SIN', 'MAN', 5, false, false, false), new Route('SIN', 'MIA', 5, true, false, false), new Route('SIN', 'NBO', 1, true, false, false), new Route('SIN', 'NYC', 5, true, false, false), new Route('SIN', 'NYCJFK', 5, true, false, false), new Route('SIN', 'NYCEWR', 5, true, false, false), new Route('SIN', 'ORL', 5, true, false, false), new Route('SIN', 'SLU', 5, true, false, false), new Route('SIN', 'TAB', 5, true, false, false), new Route('SIN', 'WAS', 5, true, false, false), new Route('SLU', 'HKG', 3, true, true, false), new Route('SLU', 'JNB', 3, true, true, false), new Route('SLU', 'LOS', 3, true, true, false), new Route('SLU', 'LON', 1, false, true, true), new Route('SLU', 'LONLGW', 1, false, true, true), new Route('SLU', 'MAN', 1, false, true, false), new Route('SLU', 'SHA', 3, true, true, false), new Route('SLU', 'SIN', 5, true, false, false), new Route('SLU', 'TYO', 3, true, true, false), new Route('SYD', 'HKG', 1, false, true, false), new Route('SYD', 'LON', 1, true, true, true), new Route('SYD', 'LONLHR', 1, true, true, true), new Route('SYD', 'NBO', 1, true, true, false), new Route('TAB', 'HKG', 3, true, true, false), new Route('TAB', 'JNB', 3, true, true, false), new Route('TAB', 'LOS', 3, true, true, false), new Route('TAB', 'LON', 1, false, true, true), new Route('TAB', 'LONLGW', 1, false, true, true), new Route('TAB', 'SHA', 3, true, true, false), new Route('TAB', 'SIN', 5, true, false, false), new Route('TAB', 'TYO', 3, true, true, false), new Route('TYO', 'ANU', 3, true, true, false), new Route('TYO', 'BGI', 3, true, true, false), new Route('TYO', 'BOS', 3, true, true, false), new Route('TYO', 'CPT', 3, true, true, false), new Route('TYO', 'CHI', 3, true, true, false), new Route('TYO', 'DEL', 3, true, false, false), new Route('TYO', 'GND', 3, true, true, false), new Route('TYO', 'JNB', 3, true, true, false), new Route('TYO', 'LOS', 3, true, true, false), new Route('TYO', 'LAS', 3, true, true, false), new Route('TYO', 'LON', 1, false, true, false), new Route('TYO', 'LONLHR', 1, false, true, false), new Route('TYO', 'MIA', 3, true, true, false), new Route('TYO', 'NBO', 1, true, true, false), new Route('TYO', 'NYC', 3, true, true, false), new Route('TYO', 'NYCJFK', 3, true, true, false), new Route('TYO', 'NYCEWR', 3, true, true, false), new Route('TYO', 'ORL', 3, true, true, false), new Route('TYO', 'SFO', 3, true, true, false), new Route('TYO', 'SLU', 3, true, true, false), new Route('TYO', 'TAB', 3, true, true, false), new Route('TYO', 'WAS', 3, true, true, false), new Route('WAS', 'CPT', 3, true, true, false), new Route('WAS', 'DEL', 3, true, true, false), new Route('WAS', 'DXB', 3, true, true, false), new Route('WAS', 'HKG', 3, true, true, false), new Route('WAS', 'JNB', 3, true, true, false), new Route('WAS', 'LOS', 3, true, true, false), new Route('WAS', 'LON', 1, false, true, true), new Route('WAS', 'LONLHR', 1, false, true, true), new Route('WAS', 'BOM', 3, true, true, false), new Route('WAS', 'NBO', 3, true, true, false), new Route('WAS', 'SHA', 3, true, true, false), new Route('WAS', 'SIN', 5, true, false, false), new Route('WAS', 'TYO', 3, true, true, false) ); var allCabinGroups = new Array(); allCabinGroups[1] = new Array(); allCabinGroups[1][2] = new Array(); allCabinGroups[1][2][0] = new CabinDetails(6, 'Economy (lowest)', false, false, 1); allCabinGroups[1][2][1] = new CabinDetails(5, 'Economy (flexible)', true, false, 2); allCabinGroups[1][2][2] = new CabinDetails(4, 'Premium Economy (lowest)', false, false, 3); allCabinGroups[1][2][3] = new CabinDetails(3, 'Premium Economy (flexible)', true, false, 4); allCabinGroups[1][4] = new Array(); allCabinGroups[1][4][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[1][4][1] = new CabinDetails(8, 'Business Class', false, true, 2); allCabinGroups[1][4][2] = new CabinDetails(7, 'First Class', false, true, 3); allCabinGroups[1][6] = new Array(); allCabinGroups[1][6][0] = new CabinDetails(11, 'Economy', false, true, 1); allCabinGroups[1][1] = new Array(); allCabinGroups[1][1][0] = new CabinDetails(6, 'Economy (lowest)', false, false, 1); allCabinGroups[1][1][1] = new CabinDetails(5, 'Economy (flexible)', true, false, 2); allCabinGroups[1][1][2] = new CabinDetails(4, 'Premium Economy (lowest)', false, false, 3); allCabinGroups[1][1][3] = new CabinDetails(3, 'Premium Economy (flexible)', true, false, 4); allCabinGroups[1][1][4] = new CabinDetails(2, 'Upper Class (lowest)', false, false, 5); allCabinGroups[1][1][5] = new CabinDetails(1, 'Upper Class (flexible)', true, false, 6); allCabinGroups[1][3] = new Array(); allCabinGroups[1][3][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[1][3][1] = new CabinDetails(4, 'Premium Economy', false, true, 2); allCabinGroups[1][3][2] = new CabinDetails(2, 'Upper Class', false, true, 3); allCabinGroups[1][7] = new Array(); allCabinGroups[1][7][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[1][7][1] = new CabinDetails(8, 'Business Class', false, true, 2); allCabinGroups[1][5] = new Array(); allCabinGroups[1][5][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[1][5][1] = new CabinDetails(8, 'Business Class', false, true, 2); allCabinGroups[3] = new Array(); allCabinGroups[3][2] = new Array(); allCabinGroups[3][2][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[3][2][1] = new CabinDetails(4, 'Premium Economy', false, true, 2); allCabinGroups[3][4] = new Array(); allCabinGroups[3][4][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[3][4][1] = new CabinDetails(8, 'Business Class', false, true, 2); allCabinGroups[3][4][2] = new CabinDetails(7, 'First Class', false, true, 3); allCabinGroups[3][1] = new Array(); allCabinGroups[3][1][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[3][1][1] = new CabinDetails(4, 'Premium Economy', false, true, 2); allCabinGroups[3][1][2] = new CabinDetails(2, 'Upper Class', false, true, 3); allCabinGroups[3][3] = new Array(); allCabinGroups[3][3][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[3][3][1] = new CabinDetails(4, 'Premium Economy', false, true, 2); allCabinGroups[3][3][2] = new CabinDetails(2, 'Upper Class', false, true, 3); allCabinGroups[3][5] = new Array(); allCabinGroups[3][5][0] = new CabinDetails(6, 'Economy', false, true, 1); allCabinGroups[5] = new Array(); allCabinGroups[5][2] = new Array(); allCabinGroups[5][2][0] = new CabinDetails(10, 'Economy Lowest', false, true, 1); allCabinGroups[5][2][1] = new CabinDetails(9, 'Economy', false, true, 2); allCabinGroups[5][2][2] = new CabinDetails(4, 'Premium Economy', false, true, 3); allCabinGroups[5][4] = new Array(); allCabinGroups[5][4][0] = new CabinDetails(10, 'Economy Lowest', false, true, 1); allCabinGroups[5][4][1] = new CabinDetails(9, 'Economy', false, true, 2); allCabinGroups[5][4][2] = new CabinDetails(4, 'Premium Economy', false, true, 3); allCabinGroups[5][4][3] = new CabinDetails(2, 'Upper Class', false, true, 4); allCabinGroups[5][1] = new Array(); allCabinGroups[5][1][0] = new CabinDetails(10, 'Economy Lowest', false, true, 1); allCabinGroups[5][1][1] = new CabinDetails(9, 'Economy', false, true, 2); allCabinGroups[5][1][2] = new CabinDetails(4, 'Premium Economy', false, true, 3); allCabinGroups[5][1][3] = new CabinDetails(2, 'Upper Class', false, true, 4); allCabinGroups[5][3] = new Array(); allCabinGroups[5][3][0] = new CabinDetails(10, 'Economy Lowest', false, true, 1); allCabinGroups[5][3][1] = new CabinDetails(9, 'Economy', false, true, 2); allCabinGroups[5][3][2] = new CabinDetails(4, 'Premium Economy', false, true, 3); allCabinGroups[5][3][3] = new CabinDetails(2, 'Upper Class', false, true, 4); allCabinGroups[5][5] = new Array(); allCabinGroups[5][5][0] = new CabinDetails(10, 'Economy Lowest', false, true, 1); allCabinGroups[5][5][1] = new CabinDetails(9, 'Economy', false, true, 2); var gatewayCityCode = 'LON'; setUp('LON', 'NYC', null, 'NYC', 'LON', null);