var DataContainer = Class.create(); DataContainer.prototype = { initialize : function () { this.countries = [ new Country("AR","Argentina"),new Country("AU","Australia"),new Country("AT","Austria"),new Country("BH","Bahrain"),new Country("CA","Canada"),new Country("CL","Chile"),new Country("CN","China"),new Country("DK","Denmark"),new Country("FJ","Fiji"),new Country("FR","France"),new Country("PF","French Polynesia"),new Country("DE","Germany"),new Country("HK","Hong Kong"),new Country("IN","India"),new Country("ID","Indonesia"),new Country("IT","Italy"),new Country("JP","Japan"),new Country("KR","Korea"),new Country("LB","Lebanon"),new Country("MX","Mexico"),new Country("NL","Netherlands"),new Country("NC","New Caledonia"),new Country("NZ","New Zealand"),new Country("NF","Norfolk Island"),new Country("PG","Papua New Guinea"),new Country("PH","Philippines"),new Country("PL","Poland"),new Country("SG","Singapore"),new Country("ZA","South Africa"),new Country("ES","Spain"),new Country("CH","Switzerland"),new Country("TH","Thailand"),new Country("AE","United Arab Emrts"),new Country("GB","United Kingdom"),new Country("US","United States"),new Country("VU","Vanuatu"),new Country("VN","Vietnam") ]; this.airports = [ new Airport("ABX","Albury","AU",this.countries),new Airport("ABZ","Aberdeen","GB",this.countries),new Airport("ADL","Adelaide","AU",this.countries),new Airport("AKL","Auckland","NZ",this.countries),new Airport("AMS","Amsterdam","NL",this.countries),new Airport("ARM","Armidale","AU",this.countries),new Airport("ASP","Alice Springs","AU",this.countries),new Airport("ATL","Atlanta","US",this.countries),new Airport("AUH","Abu Dhabi","AE",this.countries),new Airport("AUS","Austin","US",this.countries),new Airport("AYQ","Ayers Rock (Uluru)","AU",this.countries),new Airport("BAH","Bahrain","BH",this.countries),new Airport("BCI","Barcaldine","AU",this.countries),new Airport("BCN","Barcelona","ES",this.countries),new Airport("BDB","Bundaberg","AU",this.countries),new Airport("BEY","Beirut","LB",this.countries),new Airport("BKK","Bangkok","TH",this.countries),new Airport("BKQ","Blackall","AU",this.countries),new Airport("BLT","Blackwater","AU",this.countries),new Airport("BME","Broome","AU",this.countries),new Airport("BNA","Nashville","US",this.countries),new Airport("BNE","Brisbane","AU",this.countries),new Airport("BNK","Ballina (Byron)","AU",this.countries),new Airport("BOI","Boise","US",this.countries),new Airport("BOM","Mumbai","IN",this.countries),new Airport("BOS","Boston","US",this.countries),new Airport("CBR","Canberra","AU",this.countries),new Airport("CDG","Paris","FR",this.countries),new Airport("CFS","Coffs Harbour","AU",this.countries),new Airport("CGK","Jakarta","ID",this.countries),new Airport("CGN","Cologne","DE",this.countries),new Airport("CHC","Christchurch","NZ",this.countries),new Airport("CNS","Cairns","AU",this.countries),new Airport("CPH","Copenhagen","DK",this.countries),new Airport("CTL","Charleville","AU",this.countries),new Airport("CTU","Chengdu","CN",this.countries),new Airport("CUN","Cancun","MX",this.countries),new Airport("CVG","Cincinnati","US",this.countries),new Airport("DBO","Dubbo","AU",this.countries),new Airport("DEL","Delhi","IN",this.countries),new Airport("DEN","Denver","US",this.countries),new Airport("DFW","Dallas Fort Worth","US",this.countries),new Airport("DPO","Devonport","AU",this.countries),new Airport("DRW","Darwin","AU",this.countries),new Airport("DTW","Detroit","US",this.countries),new Airport("DUS","Dusseldorf","DE",this.countries),new Airport("EDI","Edinburgh","GB",this.countries),new Airport("EMD","Emerald","AU",this.countries),new Airport("EWR","New York (Newark)","US",this.countries),new Airport("EZE","Buenos Aires","AR",this.countries),new Airport("FAT","Fresno","US",this.countries),new Airport("FCO","Rome","IT",this.countries),new Airport("FLG","Flagstaff","US",this.countries),new Airport("FRA","Frankfurt","DE",this.countries),new Airport("GDL","Guadalajara","MX",this.countries),new Airport("GLA","Glasgow","GB",this.countries),new Airport("GLT","Gladstone","AU",this.countries),new Airport("GOV","Gove (Nhulunbuy)","AU",this.countries),new Airport("GVA","Geneva","CH",this.countries),new Airport("HAJ","Hanover","DE",this.countries),new Airport("HAM","Hamburg","DE",this.countries),new Airport("HBA","Hobart","AU",this.countries),new Airport("HID","Horn Island","AU",this.countries),new Airport("HKG","Hong Kong","HK",this.countries),new Airport("HNL","Honolulu","US",this.countries),new Airport("HTI","Hamilton Island","AU",this.countries),new Airport("IAD","Washington DC","US",this.countries),new Airport("ICN","Seoul","KR",this.countries),new Airport("IND","Indianapolis","US",this.countries),new Airport("ISA","Mount Isa","AU",this.countries),new Airport("JFK","New York (JFK)","US",this.countries),new Airport("JNB","Johannesburg","ZA",this.countries),new Airport("KGI","Kalgoorlie","AU",this.countries),new Airport("KTA","Karratha","AU",this.countries),new Airport("LAS","Las Vegas","US",this.countries),new Airport("LAX","Los Angeles","US",this.countries),new Airport("LDH","Lord Howe Island","AU",this.countries),new Airport("LHR","London (Heathrow)","GB",this.countries),new Airport("LRE","Longreach","AU",this.countries),new Airport("LST","Launceston","AU",this.countries),new Airport("LYS","Lyon","FR",this.countries),new Airport("MAD","Madrid","ES",this.countries),new Airport("MAN","Manchester","GB",this.countries),new Airport("MCO","Orlando","US",this.countries),new Airport("MEL","Melbourne","AU",this.countries),new Airport("MEM","Memphis","US",this.countries),new Airport("MEX","Mexico City","MX",this.countries),new Airport("MIA","Miami","US",this.countries),new Airport("MKY","Mackay","AU",this.countries),new Airport("MNL","Manila","PH",this.countries),new Airport("MQL","Mildura","AU",this.countries),new Airport("MRY","Monterey (US)","US",this.countries),new Airport("MRZ","Moree","AU",this.countries),new Airport("MSP","Minneapolis","US",this.countries),new Airport("MSY","New Orleans","US",this.countries),new Airport("MUC","Munich","DE",this.countries),new Airport("NAA","Narrabri","AU",this.countries),new Airport("NAN","Nadi (Fiji)","FJ",this.countries),new Airport("NCE","Nice","FR",this.countries),new Airport("NCL","Newcastle (UK)","GB",this.countries),new Airport("NLK","Norfolk Island","NF",this.countries),new Airport("NOU","Noumea","NC",this.countries),new Airport("NRT","Tokyo","JP",this.countries),new Airport("NTL","Newcastle","AU",this.countries),new Airport("NUE","Nuremburg","DE",this.countries),new Airport("OOL","Gold Coast","AU",this.countries),new Airport("ORD","Chicago","US",this.countries),new Airport("PBO","Paraburdoo","AU",this.countries),new Airport("PDX","Portland","US",this.countries),new Airport("PEK","Beijing","CN",this.countries),new Airport("PER","Perth","AU",this.countries),new Airport("PHE","Port Hedland","AU",this.countries),new Airport("POM","Port Moresby","PG",this.countries),new Airport("PPP","Proserpine","AU",this.countries),new Airport("PPT","Papeete","PF",this.countries),new Airport("PQQ","Port Macquarie","AU",this.countries),new Airport("PVG","Shanghai","CN",this.countries),new Airport("RMA","Roma","AU",this.countries),new Airport("RNO","Reno","US",this.countries),new Airport("ROK","Rockhampton","AU",this.countries),new Airport("SAN","San Diego","US",this.countries),new Airport("SBA","Santa Barbara","US",this.countries),new Airport("SCL","Santiago","CL",this.countries),new Airport("SEA","Seattle","US",this.countries),new Airport("SFO","San Francisco","US",this.countries),new Airport("SGN","Ho Chi Minh City","VN",this.countries),new Airport("SIN","Singapore","SG",this.countries),new Airport("SJC","San Jose","US",this.countries),new Airport("SJD","San Jose Del Cabo","MX",this.countries),new Airport("SNA","Santa Ana","US",this.countries),new Airport("STL","St Louis","US",this.countries),new Airport("STR","Stuttgart","DE",this.countries),new Airport("SYD","Sydney","AU",this.countries),new Airport("TMW","Tamworth","AU",this.countries),new Airport("TPA","Tampa","US",this.countries),new Airport("TSV","Townsville","AU",this.countries),new Airport("TXL","Berlin","DE",this.countries),new Airport("VIE","Vienna","AT",this.countries),new Airport("VLI","Port Vila","VU",this.countries),new Airport("WAW","Warsaw","PL",this.countries),new Airport("WEI","Weipa","AU",this.countries),new Airport("WGA","Wagga Wagga","AU",this.countries),new Airport("WLG","Wellington","NZ",this.countries),new Airport("XIY","Xi An","CN",this.countries),new Airport("YVR","Vancouver","CA",this.countries),new Airport("YYZ","Toronto","CA",this.countries),new Airport("ZNE","Newman","AU",this.countries),new Airport("ZQN","Queenstown","NZ",this.countries),new Airport("ZRH","Zurich","CH",this.countries) ]; this.classes = [ new BookingClass("Y","ECO", "Economy"), new BookingClass("P","PRM", "Premium Economy"), new BookingClass("J","BUS", "Business/First") ]; this.isSaleDate = [ true ]; this.travelDate = [ 20080401 ]; this.currentDate = [ 20091120 ]; this.fromAirports = ["AKL","CHC","NAN","NOU","PPT","VLI","ZQN","WLG"]; this.popularFromAirports = null; this.toAirports = ["ABZ","AUH","ADL","ABX","ASP","AMS","ARM","ATL","AKL","AUS","AYQ","BAH","BNK","BKK","BCI","BCN","PEK","BEY","TXL","BKQ","BLT","BOI","BOS","BNE","BME","EZE","BDB","CNS","CBR","CUN","CTL","CTU","ORD","CHC","CVG","CFS","CGN","CPH","DFW","DRW","DEL","DEN","DTW","DPO","DBO","DUS","EDI","EMD","FLG","FRA","FAT","GVA","GLT","GLA","OOL","GOV","GDL","HAM","HTI","HAJ","SGN","HBA","HKG","HNL","HID","IND","CGK","JNB","KGI","KTA","LAS","LST","LHR","LRE","LDH","LAX","LYS","MKY","MAD","MAN","MNL","MEL","MEM","MEX","MIA","MQL","MSP","MRY","MRZ","ISA","BOM","MUC","NAN","NAA","BNA","MSY","JFK","EWR","NTL","NCL","ZNE","NCE","NLK","NUE","MCO","PPT","PBO","CDG","PER","PHE","PQQ","POM","VLI","PDX","PPP","ZQN","RNO","ROK","RMA","FCO","SAN","SFO","SJD","SJC","SNA","SBA","SCL","SEA","ICN","PVG","SIN","STL","STR","SYD","TPA","TMW","NRT","YYZ","TSV","YVR","VIE","WGA","WAW","IAD","WEI","WLG","XIY","ZRH"]; this.popularToAirports = null; // This matrix contains business data to make decisions relating to city pair from/to // combinations. It is written like this to reduce the page weight and is queried by the // javascript model which in turns models it into sensible data. // The columns represent 'to' cities and must match the cities in order as specified in the // this.toCities array. // The rows represent 'from' cities and must match the cities in order as specified in the // this.fromCities array. // Each data item has a number of elements representing a boolean value for the // piece of data it is representing. The data they represent is defined in the constants // below. this.matrix = 'rrrrrrrrrrrrrvrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrvrrrrvrrrrvrrvrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrvrrrrrrrrvrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrvrrrrrrrrrrrrrrrrrrrr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is valid. this.VALID_FLIGHT_INDEX = 0; // item 1 = economy - if true then economy is to be available for this from/to combination this.CLASS_ECONOMY_INDEX = 1; // item 2 = premium - if true then premium economy is to be available for this from/to combination this.CLASS_PREMIUM_INDEX = 2; // item 3 = business - if true then business is to be available for this from/to combination this.CLASS_BUSINESS_INDEX = 3; // item 4 = first - if true then first is to be available for this from/to combination this.CLASS_FIRST_INDEX = 4; }, // below are the getters for each piece of data within this object getClasses : function () { return this.classes; }, getAirports : function () { return this.airports; }, getCountries : function () { return this.countries; }, getToAirports : function () { return this.toAirports; }, getFromAirports : function () { return this.fromAirports; }, getPopularFromAirports : function () { return this.popularFromAirports; }, getValidFlightIndex : function () { return this.VALID_FLIGHT_INDEX; }, getEconomyClassIndex : function () { return this.CLASS_ECONOMY_INDEX; }, getPremiumClassIndex : function () { return this.CLASS_PREMIUM_INDEX; }, getBusinessClassIndex : function () { return this.CLASS_BUSINESS_INDEX; }, getFirstClassIndex : function () { return this.CLASS_FIRST_INDEX; }, getMatrix : function () { return this.matrix; }, getIsSaleDate : function(){ return this.isSaleDate; }, getTravelDate : function(){ return this.travelDate; }, getCurrentDate : function(){ return this.currentDate; } }