forked from SteppoFF/ita-matrix-powertools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_minified.js
1 lines (1 loc) · 143 KB
/
script_minified.js
1
var mptUsersettings=new Object;mptUsersettings.timeformat="12h",mptUsersettings.language="en",mptUsersettings.enableDeviders=1,mptUsersettings.enableInlinemode=0,mptUsersettings.enableEditormode=0,mptUsersettings.enableIMGautoload=0,mptUsersettings.enableFarerules=1,mptUsersettings.enablePricebreakdown=1,mptUsersettings.enableMilesbreakdown=1,mptUsersettings.enableMilesbreakdownautoload=0,mptUsersettings.enableMilesInlinemode=0,mptUsersettings.linkFontsize=100,mptUsersettings.enablePlanefinder=1,mptUsersettings.enableSeatguru=1,mptUsersettings.enableWheretocredit=1,mptUsersettings.enableFarefreaks=0,mptUsersettings.acEdition="us",mptUsersettings.aaEdition="en_DE",mptUsersettings.aac1Edition="US",mptUsersettings.aac1Currency="1",mptUsersettings.afEdition="US/en",mptUsersettings.azEdition="us_en",mptUsersettings.baLanguage="en",mptUsersettings.baEdition="US",mptUsersettings.czEdition="US-GB",mptUsersettings.dlEdition="www_us",mptUsersettings.ibEdition="en-US",mptUsersettings.ibCurrency="USD",mptUsersettings.klEdition="us_en",mptUsersettings.laEdition="en_us",mptUsersettings.lhEdition="US-gb",mptUsersettings.lxEdition="us_en";var mptSettings=new Object;mptSettings.itaLanguage="en",mptSettings.version="0.31",mptSettings.retrycount=1,mptSettings.laststatus="",mptSettings.scriptrunning=1,mptSettings.cabin="Auto",mptSettings.scriptEngine=0;var acEditions=["us","ca","ar","au","ch","cl","cn","co","de","dk","es","fr","gb","hk","ie","il","it","jp","mx","nl","no","pa","pe","se"],aaEditions=[{value:"en_AU",name:"Australia"},{value:"en_BE",name:"Belgium"},{value:"en_CN",name:"China"},{value:"en_DK",name:"Denmark"},{value:"en_FI",name:"Finland"},{value:"en_FR",name:"France / English"},{value:"fr_FR",name:"France / French"},{value:"en_DE",name:"Germany / English"},{value:"de_DE",name:"Germany / Deutsch"},{value:"en_GR",name:"Greece"},{value:"en_HK",name:"Hong Kong"},{value:"en_IN",name:"India"},{value:"en_IE",name:"Ireland"},{value:"en_IL",name:"Israel"},{value:"en_IT",name:"Italy"},{value:"en_JP",name:"Japan"},{value:"en_KR",name:"Korea"},{value:"en_NL",name:"Netherlands"},{value:"en_NZ",name:"New Zealand"},{value:"en_NO",name:"Norway"},{value:"en_PT",name:"Portugal"},{value:"en_RU",name:"Russia"},{value:"en_ES",name:"Spain"},{value:"en_SE",name:"Sweden"},{value:"en_CH",name:"Switzerland"}],aac1Editions=[{value:"CA",name:"Canada"},{value:"US",name:"United States"},{value:"GB",name:"United Kingdom"}],aac1Currencies=[{value:"1",name:"USD"},{value:"2",name:"GBP"},{value:"4",name:"CAD"}],afEditions=[{value:"DE/de",name:"Germany / Deutsch"},{value:"DE/en",name:"Germany / English"},{value:"FR/en",name:"France / English"},{value:"FI/en",name:"Finland / English"},{value:"FR/fr",name:"France / French"},{value:"NL/en",name:"Netherlands / English"},{value:"GB/en",name:"United Kingdom / English"},{value:"US/en",name:"US / English"}],azEditions=[{value:"de_de",name:"Germany / Deutsch"},{value:"at_de",name:"Austria / Deutsch"},{value:"ch_de",name:"Switzerland / Deutsch"},{value:"fr_fr",name:"France / French"},{value:"nl_nl",name:"Netherlands / Dutch"},{value:"it_it",name:"Italy / Italian"},{value:"ca_en",name:"Canada / Englisch"},{value:"us_en",name:"US / Englisch"},{value:"gb_en",name:"GB / Englisch"},{value:"en_en",name:"International / Englisch"}],baLanguages=[{value:"de",name:"Deutsch"},{value:"en",name:"English"},{value:"es",name:"Español"},{value:"fr",name:"Français"},{value:"it",name:"Italiano"},{value:"pl",name:"Polski"},{value:"pt",name:"Português"},{value:"sv",name:"Svenska"},{value:"zh",name:"中文"},{value:"ja",name:"日本語"},{value:"ru",name:"Русский"},{value:"ko",name:"한국어"}],baEditions=[{value:"AF",name:"Afghanistan"},{value:"AL",name:"Albania"},{value:"DZ",name:"Algeria"},{value:"AS",name:"American Samoa"},{value:"AD",name:"Andorra"},{value:"AO",name:"Angola"},{value:"AI",name:"Anguilla"},{value:"AG",name:"Antigua"},{value:"AR",name:"Argentina"},{value:"AM",name:"Armenia"},{value:"AW",name:"Aruba"},{value:"AU",name:"Australia"},{value:"AT",name:"Austria"},{value:"AZ",name:"Azerbaijan"},{value:"BS",name:"Bahamas"},{value:"BH",name:"Bahrain"},{value:"BD",name:"Bangladesh"},{value:"BB",name:"Barbados"},{value:"BY",name:"Belarus"},{value:"BE",name:"Belgium"},{value:"BZ",name:"Belize"},{value:"BJ",name:"Benin Republic"},{value:"BM",name:"Bermuda"},{value:"BT",name:"Bhutan"},{value:"BO",name:"Bolivia"},{value:"BA",name:"Bosnia-Herzegovina"},{value:"BW",name:"Botswana"},{value:"BR",name:"Brazil"},{value:"VG",name:"British Virgin Islands"},{value:"BN",name:"Brunei"},{value:"BG",name:"Bulgaria"},{value:"BF",name:"Burkina Faso"},{value:"BI",name:"Burundi"},{value:"KH",name:"Cambodia"},{value:"CA",name:"Canada"},{value:"CV",name:"Cape Verde"},{value:"KY",name:"Cayman Islands"},{value:"CF",name:"Central African Rep"},{value:"TD",name:"Chad"},{value:"CL",name:"Chile"},{value:"CN",name:"China"},{value:"CX",name:"Christmas Island"},{value:"CC",name:"Cocos Islands"},{value:"CO",name:"Colombia"},{value:"CG",name:"Congo"},{value:"CK",name:"Cook Islands"},{value:"CR",name:"Costa Rica"},{value:"HR",name:"Croatia"},{value:"CU",name:"Cuba"},{value:"CY",name:"Cyprus"},{value:"CZ",name:"Czech Republic"},{value:"DK",name:"Denmark"},{value:"DJ",name:"Djibouti"},{value:"DM",name:"Dominica"},{value:"DO",name:"Dominican Rep"},{value:"EC",name:"Ecuador"},{value:"EG",name:"Egypt"},{value:"SV",name:"El Salvador"},{value:"GQ",name:"Equatorial Guinea"},{value:"ER",name:"Eritrea"},{value:"EE",name:"Estonia"},{value:"ET",name:"Ethiopia"},{value:"FO",name:"Faeroe Is"},{value:"FK",name:"Falkland Is"},{value:"FJ",name:"Fiji"},{value:"FI",name:"Finland"},{value:"FR",name:"France"},{value:"GF",name:"French Guyana"},{value:"PF",name:"French Polynesia"},{value:"GA",name:"Gabon"},{value:"GM",name:"Gambia"},{value:"GE",name:"Georgia"},{value:"DE",name:"Germany"},{value:"GH",name:"Ghana"},{value:"GI",name:"Gibraltar (UK)"},{value:"GR",name:"Greece"},{value:"GL",name:"Greenland"},{value:"GD",name:"Grenada"},{value:"GP",name:"Guadeloupe"},{value:"GU",name:"Guam"},{value:"GT",name:"Guatemala"},{value:"GN",name:"Guinea"},{value:"GW",name:"Guinea Bissau"},{value:"GY",name:"Guyana"},{value:"HT",name:"Haiti"},{value:"HN",name:"Honduras"},{value:"HK",name:"Hong Kong"},{value:"HU",name:"Hungary"},{value:"IS",name:"Iceland"},{value:"IN",name:"India"},{value:"ID",name:"Indonesia"},{value:"IR",name:"Iran"},{value:"IQ",name:"Iraq"},{value:"IE",name:"Ireland"},{value:"IL",name:"Israel"},{value:"IT",name:"Italy"},{value:"CI",name:"Ivory Coast"},{value:"JM",name:"Jamaica"},{value:"JP",name:"Japan"},{value:"JO",name:"Jordan"},{value:"KZ",name:"Kazakhstan"},{value:"KE",name:"Kenya"},{value:"KI",name:"Kiribati"},{value:"XK",name:"Kosovo"},{value:"KW",name:"Kuwait"},{value:"KG",name:"Kyrgyzstan"},{value:"LA",name:"Laos"},{value:"LV",name:"Latvia"},{value:"LB",name:"Lebanon"},{value:"LS",name:"Lesotho"},{value:"LR",name:"Liberia"},{value:"LY",name:"Libya"},{value:"LI",name:"Liechtenstein"},{value:"LT",name:"Lithuania"},{value:"LU",name:"Luxembourg"},{value:"MO",name:"Macau"},{value:"MK",name:"Macedonia"},{value:"MG",name:"Madagascar"},{value:"MW",name:"Malawi"},{value:"MY",name:"Malaysia"},{value:"MV",name:"Maldives"},{value:"ML",name:"Mali"},{value:"MT",name:"Malta"},{value:"MP",name:"Mariana Islands"},{value:"MH",name:"Marshall Islands"},{value:"MQ",name:"Martinique"},{value:"MR",name:"Mauritania"},{value:"MU",name:"Mauritius"},{value:"MX",name:"Mexico"},{value:"FM",name:"Micronesia"},{value:"UM",name:"Minor Island"},{value:"MD",name:"Moldova"},{value:"MC",name:"Monaco"},{value:"ME",name:"Montenegro"},{value:"MS",name:"Montserrat"},{value:"MA",name:"Morocco"},{value:"MZ",name:"Mozambique"},{value:"MM",name:"Myanmar"},{value:"NA",name:"Namibia"},{value:"NR",name:"Nauru"},{value:"NP",name:"Nepal"},{value:"AN",name:"Netherland Antilles"},{value:"NL",name:"Netherlands"},{value:"NC",name:"New Caledonia"},{value:"NZ",name:"New Zealand"},{value:"NI",name:"Nicaragua"},{value:"NE",name:"Niger"},{value:"NG",name:"Nigeria"},{value:"NU",name:"Niue"},{value:"NF",name:"Norfolk Island"},{value:"NO",name:"Norway"},{value:"OM",name:"Oman"},{value:"PK",name:"Pakistan"},{value:"PA",name:"Panama"},{value:"PG",name:"Papua New Guinea"},{value:"PY",name:"Paraguay"},{value:"KP",name:"Peoples Rep Korea"},{value:"PE",name:"Peru"},{value:"PH",name:"Philippines"},{value:"PL",name:"Poland"},{value:"PT",name:"Portugal"},{value:"PR",name:"Puerto Rico"},{value:"QA",name:"Qatar"},{value:"CM",name:"Republic Cameroon"},{value:"RE",name:"Reunion"},{value:"RO",name:"Romania"},{value:"RU",name:"Russia"},{value:"RW",name:"Rwanda"},{value:"SM",name:"San Marino"},{value:"SA",name:"Saudi Arabia"},{value:"SN",name:"Senegal"},{value:"RS",name:"Serbia"},{value:"SC",name:"Seychelles"},{value:"SL",name:"Sierra Leone"},{value:"SG",name:"Singapore"},{value:"SK",name:"Slovakia"},{value:"SI",name:"Slovenia"},{value:"SB",name:"Solomon Island"},{value:"SO",name:"Somalia"},{value:"ZA",name:"South Africa"},{value:"KR",name:"South Korea"},{value:"ES",name:"Spain"},{value:"LK",name:"Sri Lanka"},{value:"KN",name:"St Kitts and Nevis"},{value:"LC",name:"St Lucia"},{value:"VC",name:"St Vincent"},{value:"SD",name:"Sudan"},{value:"SR",name:"Suriname"},{value:"SZ",name:"Swaziland"},{value:"SE",name:"Sweden"},{value:"CH",name:"Switzerland"},{value:"SY",name:"Syria"},{value:"TW",name:"Taiwan"},{value:"TJ",name:"Tajikistan"},{value:"TZ",name:"Tanzania"},{value:"TH",name:"Thailand"},{value:"TL",name:"Timor - Leste"},{value:"TG",name:"Togo"},{value:"TO",name:"Tonga"},{value:"TT",name:"Trinidad and Tobago"},{value:"TN",name:"Tunisia"},{value:"TR",name:"Turkey"},{value:"TM",name:"Turkmenistan"},{value:"TC",name:"Turks Caicos"},{value:"TV",name:"Tuvalu"},{value:"VI",name:"US Virgin Islands"},{value:"US",name:"USA"},{value:"UG",name:"Uganda"},{value:"UA",name:"Ukraine"},{value:"AE",name:"United Arab Emirates"},{value:"GB",name:"United Kingdom"},{value:"UY",name:"Uruguay"},{value:"UZ",name:"Uzbekistan"},{value:"VU",name:"Vanuatu"},{value:"VE",name:"Venezuela"},{value:"VN",name:"Vietnam"},{value:"WS",name:"Western Samoa"},{value:"YE",name:"Yemen Republic"},{value:"ZM",name:"Zambia"},{value:"ZW",name:"Zimbabwe"}],czEditions=[{value:"AR-GB",name:"Argentina / English"},{value:"AU-GB",name:"Australia / English"},{value:"AZ-GB",name:"Azerbaijan / English"},{value:"BD-GB",name:"Bangladesh / English"},{value:"BE-GB",name:"Belgium / English"},{value:"BR-GB",name:"Brazil / English"},{value:"KH-GB",name:"Cambodia / English"},{value:"CA-GB",name:"Canada / English"},{value:"CA-FR",name:"Canada / French"},{value:"CN-GB",name:"China / English"},{value:"DK-GB",name:"Denmark / English"},{value:"FI-GB",name:"Finland / English"},{value:"FR-GB",name:"France / English"},{value:"FR-FR",name:"France / French"},{value:"GE-GB",name:"Georgia / English"},{value:"DE-GB",name:"Germany / English"},{value:"DE-DE",name:"Germany / German"},{value:"GR-GB",name:"Greece / English"},{value:"HK-GB",name:"Hong Kong / English"},{value:"IN-GB",name:"India / English"},{value:"ID-GB",name:"Indonesia / English"},{value:"IR-GB",name:"Iran / English"},{value:"IE-GB",name:"Ireland / English"},{value:"IT-GB",name:"Italy / English"},{value:"JP-GB",name:"Japan / English"},{value:"JO-GB",name:"Jordan / English"},{value:"KZ-GB",name:"Kazakhstan / English"},{value:"KE-GB",name:"Kenya / English"},{value:"KG-GB",name:"Kyrgyzstan / English"},{value:"MY-GB",name:"Malaysia / English"},{value:"MV-GB",name:"Maldives / English"},{value:"MO-GB",name:"Macau / English"},{value:"MM-GB",name:"Myanmar / English"},{value:"NP-GB",name:"Nepal / English"},{value:"NL-GB",name:"Netherlands / English"},{value:"NZ-GB",name:"New Zealand / English"},{value:"NO-GB",name:"Norway / English"},{value:"PK-GB",name:"Pakistan / English"},{value:"PA-GB",name:"Panama / English"},{value:"PE-GB",name:"Peru / English"},{value:"PH-GB",name:"Philippines / English"},{value:"PT-GB",name:"Portugal / English"},{value:"RU-GB",name:"Russia / English"},{value:"SA-GB",name:"Saudi Arabia / English"},{value:"SG-GB",name:"Singapore / English"},{value:"ZA-GB",name:"South Africa / English"},{value:"KR-GB",name:"South Korea / English"},{value:"ES-GB",name:"Spain / English"},{value:"SE-GB",name:"Sweden / English"},{value:"CH-GB",name:"Switzerland / English"},{value:"TW-GB",name:"Taiwan / English"},{value:"TJ-GB",name:"Tajikistan / English"},{value:"TZ-GB",name:"Tanzania / English"},{value:"TH-GB",name:"Thailand / English"},{value:"TR-GB",name:"Turkey / English"},{value:"TM-GB",name:"Turkmenistan / English"},{value:"UA-GB",name:"Ukraine / English"},{value:"GB-GB",name:"United Kingdom / English"},{value:"AE-GB",name:"United Arab Emirates / English"},{value:"UG-GB",name:"Uganda / English"},{value:"US-GB",name:"United States / English"},{value:"UZ-GB",name:"Uzbekistan / English"},{value:"VE-GB",name:"Venezuela / English"},{value:"VN-GB",name:"Vietnam / English"}],dlEditions=[{value:"de_de",name:"Germany"},{value:"www_us",name:"US"}],ibEditions=[{value:"es-AO",name:"Angola - Español"},{value:"pt-AO",name:"Angola - Português"},{value:"es-DZ",name:"Argelia - Español"},{value:"fr-DZ",name:"Algérie - Français"},{value:"en-AR",name:"Argentina - English"},{value:"es-AR",name:"Argentina - Español"},{value:"en-BE",name:"Belgium - English"},{value:"es-BE",name:"Bélgica - Español"},{value:"fr-BE",name:"Belgique - Français"},{value:"es-BR",name:"Brasil - Español"},{value:"pt-BR",name:"Brasil - Português"},{value:"en-CL",name:"Chile - English"},{value:"es-CL",name:"Chile - Español"},{value:"en-CO",name:"Colombia - English"},{value:"es-CO",name:"Colombia - Español"},{value:"en-CR",name:"Costa Rica - English"},{value:"es-CR",name:"Costa Rica - Español"},{value:"en-HR",name:"Croatia - English"},{value:"es-HR",name:"Croacia - Español"},{value:"it-HR",name:"Croazia - Italiano"},{value:"en-CU",name:"Cuba - English"},{value:"es-CU",name:"Cuba - Español"},{value:"en-CZ",name:"Czech Republic - English"},{value:"es-CZ",name:"República Checa - Español"},{value:"en-DK",name:"Denmark - English"},{value:"es-DK",name:"Dinamarca - Español"},{value:"de-DE",name:"Deutschland - Deutsch"},{value:"es-DE",name:"Alemania - Español"},{value:"en-DO",name:"Dominican Republic - English"},{value:"es-DO",name:"República Dominicana - Español"},{value:"en-EC",name:"Ecuador - English"},{value:"es-EC",name:"Ecuador - Español"},{value:"en-SV",name:"El Salvador - English"},{value:"es-SV",name:"El Salvador - Español"},{value:"en-GQ",name:"Equatorial Guinea - English"},{value:"es-GQ",name:"Guinea Ecuatorial - Español"},{value:"ca-ES",name:"Espanya - Català"},{value:"en-ES",name:"Spain - English"},{value:"es-ES",name:"España - Español"},{value:"es-FR",name:"Francia - Español"},{value:"fr-FR",name:"France - Français"},{value:"en-GH",name:"Ghana - English"},{value:"es-GH",name:"Ghana - Español"},{value:"en-GR",name:"Greece - English"},{value:"es-GR",name:"Grecia - Español"},{value:"en-GT",name:"Guatemala - English"},{value:"es-GT",name:"Guatemala - Español"},{value:"en-HN",name:"Honduras - English"},{value:"es-HN",name:"Honduras - Español"},{value:"en-IE",name:"Ireland - English"},{value:"es-IE",name:"Irlanda - Español"},{value:"en-IL",name:"Israel - English"},{value:"es-IL",name:"Israel - Español"},{value:"en-IT",name:"Italy - English"},{value:"es-IT",name:"Italia - Español"},{value:"it-IT",name:"Italia - Italiano"},{value:"en-JP",name:"Japan - English"},{value:"es-JP",name:"Japón - Español"},{value:"ja-JP",name:"日本 - 日本語"},{value:"en-MT",name:"Malta - English"},{value:"es-MT",name:"Malta - Español"},{value:"it-MT",name:"Malta - Italiano"},{value:"es-MA",name:"Marruecos - Español"},{value:"fr-MA",name:"Maroc - Français"},{value:"es-MR",name:"Mauritania - Español"},{value:"fr-MR",name:"Mauritanie - Français"},{value:"en-MX",name:"Mexico - English"},{value:"es-MX",name:"México - Español"},{value:"en-NL",name:"Netherlands - English"},{value:"es-NL",name:"Holanda - Español"},{value:"nl-NL",name:"Nederland - Nederlands"},{value:"en-NI",name:"Nicaragua - English"},{value:"es-NI",name:"Nicaragua - Español"},{value:"en-NG",name:"Nigeria - English"},{value:"es-NG",name:"Nigeria - Español"},{value:"en-PA",name:"Panama - English"},{value:"es-PA",name:"Panamá - Español"},{value:"en-PE",name:"Peru - English"},{value:"es-PE",name:"Perú - Español"},{value:"es-PT",name:"Portugal - Español"},{value:"pt-PT",name:"Portugal - Português"},{value:"en-PR",name:"Puerto Rico - English"},{value:"es-PR",name:"Puerto Rico - Español"},{value:"en-RU",name:"Russian Federation - English"},{value:"es-RU",name:"Rusia - Español"},{value:"ru-RU",name:"Rossiya - Русский"},{value:"de-CH",name:"Schweiz - Deutsch"},{value:"es-CH",name:"Suiza - Español"},{value:"fr-CH",name:"Suisse - Français"},{value:"es-SN",name:"Senegal - Español"},{value:"fr-SN",name:"Sénégal - Français"},{value:"en-ZA",name:"South Africa - English"},{value:"es-ZA",name:"Sudáfrica - Español"},{value:"en-SE",name:"Sweden - English"},{value:"es-SE",name:"Suecia - Español"},{value:"en-TR",name:"Turkey - English"},{value:"es-TR",name:"Turquía - Español"},{value:"en-US",name:"USA - English"},{value:"es-US",name:"USA - Español"},{value:"en-GB",name:"United Kingdom - English"},{value:"es-GB",name:"Reino Unido - Español"},{value:"en-UY",name:"Uruguay - English"},{value:"es-UY",name:"Uruguay - Español"},{value:"en-VE",name:"Venezuela - English"},{value:"es-VE",name:"Venezuela - Español"}],ibCurrencies=[{value:"EUR",name:"EUR"},{value:"GBP",name:"GBP"},{value:"USD",name:"USD"}],klEditions=[{value:"de_de",name:"Germany / Deutsch"},{value:"de_en",name:"Germany / English"},{value:"fr_en",name:"France / English"},{value:"fr_fr",name:"France / French"},{value:"nl_en",name:"Netherlands / English"},{value:"gb_en",name:"United Kingdom / English"},{value:"us_en",name:"US / English"}],laEditions=[{value:"es_ar",name:"Argentina / Spanish"},{value:"pt_br",name:"Brasil / Portuguese"},{value:"es_cl",name:"Chile / Spanish"},{value:"es_co",name:"Colombia / Spanish"},{value:"es_ec",name:"Ecuador / Spanish"},{value:"es_pe",name:"Peru / Spanish"},{value:"es_uy",name:"Uruguay / Spanish"},{value:"en_us",name:"US / English"},{value:"es_mx",name:"Mexico / Spanish"},{value:"en_ca",name:"Canada / English"},{value:"de_de",name:"Germany / German"},{value:"es_es",name:"Spain / Spanish"},{value:"fr_fr",name:"France / French"},{value:"en_it",name:"Italy / English"},{value:"en_uk",name:"UK / English"},{value:"en_ue",name:"Rest of Europe / English"},{value:"en_au",name:"Australia / English"},{value:"en_nz",name:"New Zealand / English"},{value:"es_un",name:"Other Countries / Spanish"},{value:"en_un",name:"Other Countries / English"}],lhEditions=[{value:"AL-gb",name:"Albania / English"},{value:"DZ-fr",name:"Algeria / Français"},{value:"AO-gb",name:"Angola / English"},{value:"AR-es",name:"Argentina / Español"},{value:"AM-gb",name:"Armenia / English"},{value:"AU-gb",name:"Australia / English"},{value:"AT-de",name:"Austria / Deutsch"},{value:"AT-gb",name:"Austria / English"},{value:"AZ-gb",name:"Azerbaijan / English"},{value:"BH-gb",name:"Bahrain / English"},{value:"BY-gb",name:"Belarus / English"},{value:"BE-gb",name:"Belgium / English"},{value:"BA-gb",name:"Bosnia/Hercegovina / English"},{value:"BR-pt",name:"Brazil / Português"},{value:"BG-gb",name:"Bulgaria / English"},{value:"CA-gb",name:"Canada / English"},{value:"CA-fr",name:"Canada / Français"},{value:"CL-es",name:"Chile / Español"},{value:"CN-gb",name:"China / English"},{value:"CO-es",name:"Colombia / Español"},{value:"HR-gb",name:"Croatia / English"},{value:"CY-gb",name:"Cyprus / English"},{value:"CZ-gb",name:"Czech Republic / English"},{value:"DK-gb",name:"Denmark / English"},{value:"EG-gb",name:"Egypt / English"},{value:"GQ-gb",name:"Equatorial Guinea / English"},{value:"ER-gb",name:"Eritrea / English"},{value:"EE-gb",name:"Estonia / English"},{value:"ET-gb",name:"Ethiopia / English"},{value:"FI-gb",name:"Finland / English"},{value:"FR-gb",name:"France / English"},{value:"FR-fr",name:"France / Français"},{value:"GA-gb",name:"Gabon / English"},{value:"GE-gb",name:"Georgia / English"},{value:"DE-de",name:"Germany / Deutsch"},{value:"DE-gb",name:"Germany / English"},{value:"GH-gb",name:"Ghana / English"},{value:"GR-gb",name:"Greece / English"},{value:"HK-gb",name:"Hong Kong / English"},{value:"HU-gb",name:"Hungary / English"},{value:"IS-gb",name:"Iceland / English"},{value:"IN-gb",name:"India / English"},{value:"ID-gb",name:"Indonesia / English"},{value:"IR-gb",name:"Iran / English"},{value:"IQ-gb",name:"Iraq / English"},{value:"IE-gb",name:"Ireland / English"},{value:"IL-gb",name:"Israel / English"},{value:"IT-it",name:"Italy / Italiano"},{value:"IT-gb",name:"Italy / English"},{value:"JP-gb",name:"Japan / English"},{value:"JO-gb",name:"Jordan / English"},{value:"KZ-gb",name:"Kazakhstan / English"},{value:"KE-gb",name:"Kenya / English"},{value:"KR-gb",name:"Republic of Korea / English"},{value:"KW-gb",name:"Kuwait / English"},{value:"LV-gb",name:"Latvia / English"},{value:"LB-gb",name:"Lebanon / English"},{value:"LY-gb",name:"Libya / English"},{value:"LT-gb",name:"Lithuania / English"},{value:"LU-gb",name:"Luxembourg / English"},{value:"MY-gb",name:"Malaysia / English"},{value:"MV-gb",name:"Maldives / English"},{value:"MT-gb",name:"Malta / English"},{value:"MU-gb",name:"Mauritius / English"},{value:"MX-es",name:"Mexico / Español"},{value:"MD-gb",name:"Moldova / English"},{value:"MA-fr",name:"Morocco / Français"},{value:"NL-gb",name:"Netherlands / English"},{value:"NZ-gb",name:"New Zealand / English"},{value:"NG-gb",name:"Nigeria / English"},{value:"NO-gb",name:"Norway / English"},{value:"OM-gb",name:"Oman / English"},{value:"PK-gb",name:"Pakistan / English"},{value:"PA-es",name:"Panama / Español"},{value:"PH-gb",name:"Philippines / English"},{value:"PL-gb",name:"Poland / English"},{value:"PL-pl",name:"Poland / Polski"},{value:"PT-gb",name:"Portugal / English"},{value:"PT-pt",name:"Portugal / Português"},{value:"QA-gb",name:"Qatar / English"},{value:"CD-gb",name:"Republic of the Congo / English"},{value:"RO-gb",name:"Romania / English"},{value:"RU-gb",name:"Russia / English"},{value:"RU-ru",name:"Russia / Русский"},{value:"SA-gb",name:"Saudi Arabia / English"},{value:"RS-gb",name:"Serbia / English"},{value:"SG-gb",name:"Singapore / English"},{value:"SK-gb",name:"Slovakia / English"},{value:"SI-gb",name:"Slovenia / English"},{value:"ZA-gb",name:"South Africa / English"},{value:"ES-gb",name:"Spain / English"},{value:"ES-es",name:"Spain / Español"},{value:"SD-gb",name:"Sudan / English"},{value:"SE-gb",name:"Sweden / English"},{value:"CH-de",name:"Switzerland / Deutsch"},{value:"CH-gb",name:"Switzerland / English"},{value:"CH-fr",name:"Switzerland / Français"},{value:"TW-gb",name:"Taiwan / English "},{value:"TH-gb",name:"Thailand / English"},{value:"TN-fr",name:"Tunisia / Français"},{value:"TR-gb",name:"Turkey / English"},{value:"TM-gb",name:"Turkmenistan / English"},{value:"UA-gb",name:"Ukraine / English"},{value:"AE-gb",name:"United Arab Emirates / English"},{value:"UK-gb",name:"United Kingdom / English"},{value:"US-gb",name:"United States / English"},{value:"VE-es",name:"Venezuela / Español"},{value:"VN-gb",name:"Vietnam / English"},{value:"XX-gb",name:"Other countries / English"}],lxEditions=[{value:"de_de",name:"Germany"},{value:"us_en",name:"US"}],classSettings=new Object;classSettings.startpage=new Object,classSettings.startpage.maindiv="IR6M2QD-w-d",classSettings.resultpage=new Object,classSettings.resultpage.itin="IR6M2QD-v-d",classSettings.resultpage.itinRow="IR6M2QD-j-i",classSettings.resultpage.milagecontainer="IR6M2QD-v-e",classSettings.resultpage.rulescontainer="IR6M2QD-k-d",classSettings.resultpage.htbContainer="IR6M2QD-k-k",classSettings.resultpage.htbLeft="IR6M2QD-k-g",classSettings.resultpage.htbRight="IR6M2QD-k-f",classSettings.resultpage.htbGreyBorder="IR6M2QD-k-l",classSettings.resultpage.mcDiv="IR6M2QD-y-d",classSettings.resultpage.mcHeader="IR6M2QD-y-b",classSettings.resultpage.mcLinkList="IR6M2QD-y-c";var matrixCurrencies=[{p:/US\$/,c:"USD"},{p:/\€/,c:"EUR"},{p:/\£/,c:"GBP"},{p:/CA\$/,c:"CAD"},{p:/RS\./,c:"INR"}],translations=new Object;translations.de=new Object,translations.de.use="Öffne ",translations.de.resultpage=new Object,translations.de.resultpage["Dep:"]="Abflug:",translations.de.resultpage["Arr:"]="Ankunft:",translations.de.resultpage["Layover in"]="Umst. in",translations.de.resultpage[" to "]=" nach ",translations.de.resultpage["Mon,"]="Mo.,",translations.de.resultpage["Tue,"]="Di.,",translations.de.resultpage["Wed,"]="Mi.,",translations.de.resultpage["Thu,"]="Do.,",translations.de.resultpage["Fri,"]="Fr.,",translations.de.resultpage["Sat,"]="Sa.,",translations.de.resultpage["Sun,"]="So.,",translations.de.resultpage[" Jan "]=" Januar ",translations.de.resultpage[" Feb "]=" Februar ",translations.de.resultpage[" Mar "]=" März ",translations.de.resultpage[" Apr "]=" April ",translations.de.resultpage[" May "]=" Mai ",translations.de.resultpage[" Jun "]=" Juni ",translations.de.resultpage[" Jul "]=" Juli ",translations.de.resultpage[" Aug "]=" August ",translations.de.resultpage[" Sep "]=" September ",translations.de.resultpage[" Oct "]=" Oktober ",translations.de.resultpage[" Nov "]=" November ",translations.de.resultpage[" Dec "]=" Dezember ",translations.de.resultpage["OPERATED BY "]="Durchgeführt von ";var distances=new Object,currentItin=new Object,mtpPassengerConfig={adults:1,infantsLap:0,infantsSeat:0,cAges:new Array};function startScript(){null===document.getElementById("mptSettingsContainer")&&(injectCss(),createUsersettings()),window.location.href!==mptSettings.laststatus&&(setTimeout(function(){getPageLang()},100),mptSettings.laststatus=window.location.href),1===mptSettings.scriptrunning&&setTimeout(function(){startScript()},500)}function createUsersettings(){var e="",n=document.createElement("div");n.setAttribute("id","mptSettingsContainer"),n.setAttribute("style","border-bottom: 1px dashed grey;"),n.innerHTML='<div style="display:inline-block;float:left;cursor:pointer;" id="passengervistoogler">Passengers (<label id="mtpPaxCount">1a</label>)</div><div id="mptStartparse" class="invis" style="margin-left:20px;display:none;cursor:pointer">Editor-Mode:Parse!</div><div id="mtpNotification" style="margin-left:50px;display:inline-block;"></div><div style="display:inline-block;float:right;"><div id="settingsvistoggler" style="display:inline-block;cursor:pointer;">Settings</div> (v'+mptSettings.version+') <div id="mptCabintoggler" style="display:inline-block;">(Cabin: <label id="mptCabinMode" style="width:30px;text-align:center;cursor:pointer;display:inline-block">Auto</label>)</div></div><div id="mptSettings" class="invis" style="display:none;border-top: 1px dotted grey;"></div><div id="mptPassengers" class="invis" style="display:none;border-top: 1px dotted grey;"></div>';var t=document.getElementById("contentwrapper");t.parentNode.insertBefore(n,t),document.getElementById("settingsvistoggler").onclick=function(){toggleVis(document.getElementById("mptSettings"))},document.getElementById("passengervistoogler").onclick=function(){toggleVis(document.getElementById("mptPassengers"))},t=document.getElementById("mptSettings"),e='<div style="text-align:center;font-weight:bold">**** Display Settings: ****</div>',e+='<div style="margin:5px 0;"><div style="float:left;width:25%">',e+='<div id="mpttimeformat">Timeformat:<label style="cursor:pointer;">'+printSettingsvalue("timeformat")+"</label></div>",e+='<div id="mptlanguage">Language:<label style="cursor:pointer;">'+printSettingsvalue("language")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptenableDeviders">Enable deviders:<label style="cursor:pointer;">'+printSettingsvalue("enableDeviders")+"</label></div>",e+='<div id="mptenableInlinemode">Inlinemode:<label style="cursor:pointer;">'+printSettingsvalue("enableInlinemode")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptenableFarerules">Open fare-rules in new window:<label style="cursor:pointer;">'+printSettingsvalue("enableFarerules")+"</label></div>",e+='<div id="mptenablePricebreakdown">Price breakdown:<label style="cursor:pointer;">'+printSettingsvalue("enablePricebreakdown")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptlinkFontsize">Link font size:<label style="cursor:pointer;">'+printSettingsvalue("linkFontsize")+"</label>%</div>",e+='</div><div style="clear:both"></div></div>',e+='<div style="text-align:center;font-weight:bold">**** Feature Settings: ****</div>',e+='<div style="margin:5px 0"><div style="float:left;width:25%">',e+='<div id="mptenableEditormode">Editor mode:<label style="cursor:pointer;">'+printSettingsvalue("enableEditormode")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptenableMilesbreakdown">Miles breakdown:<label style="cursor:pointer;">'+printSettingsvalue("enableMilesbreakdown")+"</label></div>",e+='<div id="mptenableMilesbreakdownautoload">Miles breakdown autoload:<label style="cursor:pointer;">'+printSettingsvalue("enableMilesbreakdownautoload")+"</label></div>",e+='<div id="mptenableMilesInlinemode">Print miles breakdown inline:<label style="cursor:pointer;">'+printSettingsvalue("enableMilesInlinemode")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptenableIMGautoload">Images autoload:<label style="cursor:pointer;">'+printSettingsvalue("enableIMGautoload")+"</label></div>",e+='<div id="mptenableWheretocredit">Enable WhereToCredit:<label style="cursor:pointer;">'+printSettingsvalue("enableWheretocredit")+"</label></div>",e+='<div id="mptenableFarefreaks">Enable FareFreaks:<label style="cursor:pointer;">'+printSettingsvalue("enableFarefreaks")+"</label></div>",e+='</div><div style="float:left;width:25%">',e+='<div id="mptenablePlanefinder">Enable Planefinder:<label style="cursor:pointer;">'+printSettingsvalue("enablePlanefinder")+"</label></div>",e+='<div id="mptenableSeatguru">Enable Seatguru:<label style="cursor:pointer;">'+printSettingsvalue("enableSeatguru")+"</label></div>",e+='</div><div style="clear:both"></div></div>',e+='<div style="text-align:center;font-weight:bold">**** Provider Editions: ****</div>',e+='<div style="margin:5px 0">',e+='<div id="mptaaEdition" style="width:33%;float:left;">American Edition (Europe/Asia/Pacific):<label style="cursor:pointer;">'+printSettingsvalue("aaEdition")+"</label></div>",e+='<div id="mptaac1Edition" style="width:33%;float:left;">American Edition (America & UK):<label style="cursor:pointer;">'+printSettingsvalue("aac1Edition")+"</label></div>",e+='<div id="mptaac1Currency" style="width:33%;float:left;">American Currency (America & UK):<label style="cursor:pointer;">'+printSettingsvalue("aac1Currency")+"</label></div>",e+='<div id="mptacEdition" style="width:33%;float:left;">Air Canada Edition:<label style="cursor:pointer;">'+printSettingsvalue("acEdition")+"</label></div>",e+='<div id="mptafEdition" style="width:33%;float:left;">Air France Edition:<label style="cursor:pointer;">'+printSettingsvalue("afEdition")+"</label></div>",e+='<div id="mptazEdition" style="width:33%;float:left;">Alitalia Edition:<label style="cursor:pointer;">'+printSettingsvalue("azEdition")+"</label></div>",e+='<div id="mptbaLanguage" style="width:33%;float:left;">British Airways Language:<label style="cursor:pointer;">'+printSettingsvalue("baLanguage")+"</label></div>",e+='<div id="mptbaEdition" style="width:33%;float:left;">British Airways Edition:<label style="cursor:pointer;">'+printSettingsvalue("baEdition")+"</label></div>",e+='<div id="mptczEdition" style="width:33%;float:left;">China Southern Edition:<label style="cursor:pointer;">'+printSettingsvalue("czEdition")+"</label></div>",e+='<div id="mptdlEdition" style="width:33%;float:left;">Delta Edition:<label style="cursor:pointer;">'+printSettingsvalue("dlEdition")+"</label></div>",e+='<div id="mptibEdition" style="width:33%;float:left;">Iberia Edition:<label style="cursor:pointer;">'+printSettingsvalue("ibEdition")+"</label></div>",e+='<div id="mptklEdition" style="width:33%;float:left;">KLM Edition:<label style="cursor:pointer;">'+printSettingsvalue("klEdition")+"</label></div>",e+='<div id="mptlaEdition" style="width:33%;float:left;">LAN Edition:<label style="cursor:pointer;">'+printSettingsvalue("laEdition")+"</label></div>",e+='<div id="mptlhEdition" style="width:33%;float:left;">Lufthansa Edition:<label style="cursor:pointer;">'+printSettingsvalue("lhEdition")+"</label></div>",e+='<div id="mptlxEdition" style="width:33%;float:left;">Swiss Edition:<label style="cursor:pointer;">'+printSettingsvalue("lxEdition")+"</label></div>",e+='<div style="clear:both"></div></div>',e+='<div style="text-align:center;font-weight:bold"><label id="configcloser" style="cursor:pointer;">Close</label><div>',t.innerHTML=e,document.getElementById("mpttimeformat").onclick=function(){toggleSettings("timeformat")},document.getElementById("mptlanguage").onclick=function(){toggleSettings("language")},document.getElementById("mptenableDeviders").onclick=function(){toggleSettings("enableDeviders")},document.getElementById("mptenableInlinemode").onclick=function(){toggleSettings("enableInlinemode")},document.getElementById("mptenableEditormode").onclick=function(){toggleSettings("enableEditormode")},document.getElementById("mptenableIMGautoload").onclick=function(){toggleSettings("enableIMGautoload")},document.getElementById("mptenableFarerules").onclick=function(){toggleSettings("enableFarerules")},document.getElementById("mptenablePricebreakdown").onclick=function(){toggleSettings("enablePricebreakdown")},document.getElementById("mptenableMilesbreakdown").onclick=function(){toggleSettings("enableMilesbreakdown")},document.getElementById("mptlinkFontsize").onclick=function(){toggleSettings("linkFontsize")},document.getElementById("mptenableMilesbreakdownautoload").onclick=function(){toggleSettings("enableMilesbreakdownautoload")},document.getElementById("mptenableMilesInlinemode").onclick=function(){toggleSettings("enableMilesInlinemode")},document.getElementById("mptenablePlanefinder").onclick=function(){toggleSettings("enablePlanefinder")},document.getElementById("mptenableSeatguru").onclick=function(){toggleSettings("enableSeatguru")},document.getElementById("mptenableWheretocredit").onclick=function(){toggleSettings("enableWheretocredit")},document.getElementById("mptenableFarefreaks").onclick=function(){toggleSettings("enableFarefreaks")},document.getElementById("mptaaEdition").onclick=function(){toggleSettings("aaEdition")},document.getElementById("mptaac1Edition").onclick=function(){toggleSettings("aac1Edition")},document.getElementById("mptaac1Currency").onclick=function(){toggleSettings("aac1Currency")},document.getElementById("mptacEdition").onclick=function(){toggleSettings("acEdition")},document.getElementById("mptafEdition").onclick=function(){toggleSettings("afEdition")},document.getElementById("mptazEdition").onclick=function(){toggleSettings("azEdition")},document.getElementById("mptbaLanguage").onclick=function(){toggleSettings("baLanguage")},document.getElementById("mptbaEdition").onclick=function(){toggleSettings("baEdition")},document.getElementById("mptczEdition").onclick=function(){toggleSettings("czEdition")},document.getElementById("mptdlEdition").onclick=function(){toggleSettings("dlEdition")},document.getElementById("mptibEdition").onclick=function(){toggleSettings("ibEdition")},document.getElementById("mptklEdition").onclick=function(){toggleSettings("klEdition")},document.getElementById("mptlaEdition").onclick=function(){toggleSettings("laEdition")},document.getElementById("mptlhEdition").onclick=function(){toggleSettings("lhEdition")},document.getElementById("mptlxEdition").onclick=function(){toggleSettings("lxEdition")},document.getElementById("mptCabintoggler").onclick=function(){toggleSettings("cabin")},document.getElementById("configcloser").onclick=function(){toggleVis(document.getElementById("mptSettings"))},document.getElementById("mptStartparse").onclick=function(){document.getElementById("mptStartparse").style.display="none",setTimeout(function(){fePS()},50)},t=document.getElementById("mptPassengers"),e='<div style="float:left;width:25%">',e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Adults:</label> <select name="numAdults" id="numAdults" style="width:50px">';for(var i=1;i<=9;i++)e+="<option>"+i+"</option>";e+="</select></div>",e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Infants (Lap):</label> <select name="numInfantsLap" id="numInfantsLap" style="width:50px">';for(i=0;i<=9;i++)e+="<option>"+i+"</option>";e+="</select></div>",e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Infants (Seat):</label> <select name="numInfantsSeat" id="numInfantsSeat" style="width:50px">';for(i=0;i<=9;i++)e+="<option>"+i+"</option>";e+="</select></div>",e+='</div><div style="float:left;width:25%">';for(var a=1;a<=3;a++){e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Child '+a+' - Age:</label> <select name="child'+a+'age" id="child'+a+'age" style="width:50px">',e+='<option value="-1">-</option>';for(i=2;i<=17;i++)e+='<option value="'+i+'">'+i+"</option>";e+="</select></div>"}e+='</div><div style="float:left;width:25%">';for(a=4;a<=6;a++){e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Child '+a+' - Age:</label> <select name="child'+a+'age" id="child'+a+'age" style="width:50px">',e+='<option value="-1">-</option>';for(i=2;i<=17;i++)e+='<option value="'+i+'">'+i+"</option>";e+="</select></div>"}e+='</div><div style="float:left;width:25%">';for(a=7;a<=8;a++){e+='<div style="margin:2px 0"><label style="width:100px;display:inline-block">Child '+a+' - Age:</label> <select name="child'+a+'age" id="child'+a+'age" style="width:50px">',e+='<option value="-1">-</option>';for(i=2;i<=17;i++)e+='<option value="'+i+'">'+i+"</option>";e+="</select></div>"}e+='<div style="width:150px;margin:2px 0"><div id="mtpConfirmPax" style="float:left;width:50%;text-align:center;cursor:pointer;font-weight:bold">Confirm</div><div id="mtpCancelPax" style="float:left;width:50%;text-align:center;cursor:pointer;font-weight:bold">Cancel</div></div>',e+='</div><div style="clear:both;"></div>',t.innerHTML=e,document.getElementById("mtpCancelPax").onclick=function(){toggleVis(document.getElementById("mptPassengers"))},document.getElementById("mtpConfirmPax").onclick=function(){processPassengers()}}function toggleVis(e){hasClass(e,"vis")?(e.setAttribute("class","invis"),e.style.display="none"):(e.setAttribute("class","vis"),e.style.display="block")}function toggleSettings(e){switch(e){case"timeformat":"12h"==mptUsersettings.timeformat?mptUsersettings.timeformat="24h":mptUsersettings.timeformat="12h";break;case"language":"de"==mptUsersettings.language?mptUsersettings.language="en":mptUsersettings.language="de";break;case"linkFontsize":mptUsersettings.linkFontsize<=190&&mptUsersettings.linkFontsize>=50?mptUsersettings.linkFontsize+=10:mptUsersettings.linkFontsize=50;break;case"acEdition":acEditions.indexOf(mptUsersettings.acEdition)==acEditions.length-1?mptUsersettings.acEdition=acEditions[0]:mptUsersettings.acEdition=acEditions[acEditions.indexOf(mptUsersettings.acEdition)+1];break;case"aaEdition":(n=findPositionForValue(mptUsersettings.aaEdition,aaEditions))>=aaEditions.length-1||-1===n?mptUsersettings.aaEdition=aaEditions[0].value:(n++,mptUsersettings.aaEdition=aaEditions[n].value);break;case"aac1Edition":(n=findPositionForValue(mptUsersettings.aac1Edition,aac1Editions))>=aac1Editions.length-1||-1===n?mptUsersettings.aac1Edition=aac1Editions[0].value:(n++,mptUsersettings.aac1Edition=aac1Editions[n].value);break;case"aac1Currency":(n=findPositionForValue(mptUsersettings.aac1Currency,aac1Currencies))>=aac1Currencies.length-1||-1===n?mptUsersettings.aac1Currency=aac1Currencies[0].value:(n++,mptUsersettings.aac1Currency=aac1Currencies[n].value);break;case"afEdition":(n=findPositionForValue(mptUsersettings.afEdition,afEditions))>=afEditions.length-1||-1===n?mptUsersettings.afEdition=afEditions[0].value:(n++,mptUsersettings.afEdition=afEditions[n].value);break;case"azEdition":(n=findPositionForValue(mptUsersettings.azEdition,azEditions))>=azEditions.length-1||-1===n?mptUsersettings.azEdition=azEditions[0].value:(n++,mptUsersettings.azEdition=azEditions[n].value);break;case"baLanguage":(n=findPositionForValue(mptUsersettings.baLanguage,baLanguages))>=baLanguages.length-1||-1===n?mptUsersettings.baLanguage=baLanguages[0].value:(n++,mptUsersettings.baLanguage=baLanguages[n].value);break;case"baEdition":(n=findPositionForValue(mptUsersettings.baEdition,baEditions))>=baEditions.length-1||-1===n?mptUsersettings.baEdition=baEditions[0].value:(n++,mptUsersettings.baEdition=baEditions[n].value);break;case"czEdition":(n=findPositionForValue(mptUsersettings.czEdition,czEditions))>=czEditions.length-1||-1===n?mptUsersettings.czEdition=czEditions[0].value:(n++,mptUsersettings.czEdition=czEditions[n].value);break;case"dlEdition":(n=findPositionForValue(mptUsersettings.dlEdition,dlEditions))>=dlEditions.length-1||-1===n?mptUsersettings.dlEdition=dlEditions[0].value:(n++,mptUsersettings.dlEdition=dlEditions[n].value);break;case"ibEdition":(n=findPositionForValue(mptUsersettings.ibEdition,ibEditions))>=ibEditions.length-1||-1===n?mptUsersettings.ibEdition=ibEditions[0].value:(n++,mptUsersettings.ibEdition=ibEditions[n].value);break;case"ibCurrency":(n=findPositionForValue(mptUsersettings.ibCurrency,ibCurrencies))>=ibCurrencies.length-1||-1===n?mptUsersettings.ibCurrency=ibCurrencies[0].value:(n++,mptUsersettings.ibCurrency=ibCurrencies[n].value);break;case"klEdition":(n=findPositionForValue(mptUsersettings.klEdition,klEditions))>=klEditions.length-1||-1===n?mptUsersettings.klEdition=klEditions[0].value:(n++,mptUsersettings.klEdition=klEditions[n].value);break;case"laEdition":(n=findPositionForValue(mptUsersettings.laEdition,laEditions))>=laEditions.length-1||-1===n?mptUsersettings.laEdition=laEditions[0].value:(n++,mptUsersettings.laEdition=laEditions[n].value);break;case"lhEdition":(n=findPositionForValue(mptUsersettings.lhEdition,lhEditions))>=lhEditions.length-1||-1===n?mptUsersettings.lhEdition=lhEditions[0].value:(n++,mptUsersettings.lhEdition=lhEditions[n].value);break;case"lxEdition":var n;(n=findPositionForValue(mptUsersettings.lxEdition,lxEditions))>=lxEditions.length-1||-1===n?mptUsersettings.lxEdition=lxEditions[0].value:(n++,mptUsersettings.lxEdition=lxEditions[n].value);break;case"cabin":return"Auto"===mptSettings.cabin?mptSettings.cabin="Y":"Y"===mptSettings.cabin?mptSettings.cabin="Y+":"Y+"===mptSettings.cabin?mptSettings.cabin="C":"C"===mptSettings.cabin?mptSettings.cabin="F":"F"===mptSettings.cabin&&(mptSettings.cabin="Auto"),document.getElementById("mptCabinMode").innerHTML=mptSettings.cabin,printLinksContainer(),!1;default:1==mptUsersettings[e]?mptUsersettings[e]=0:mptUsersettings[e]=1}document.getElementById("mpt"+e).firstChild.nextSibling.innerHTML=printSettingsvalue(e),1===mptSettings.scriptEngine&&GM.setValue("mptUsersettings",JSON.stringify(mptUsersettings))}function processPassengers(){var e,n=!1;n=document.getElementById("numAdults"),mtpPassengerConfig.adults=Number(n.options[n.selectedIndex].value),n=document.getElementById("numInfantsLap"),mtpPassengerConfig.infantsLap=Number(n.options[n.selectedIndex].value),n=document.getElementById("numInfantsSeat"),mtpPassengerConfig.infantsSeat=Number(n.options[n.selectedIndex].value),mtpPassengerConfig.cAges=new Array;for(var t=1;t<=8;t++)processChild("child"+t+"age");e=mtpPassengerConfig.adults+"a"+(mtpPassengerConfig.cAges.length>0?" "+mtpPassengerConfig.cAges.length+"c":"")+(mtpPassengerConfig.infantsLap+mtpPassengerConfig.infantsSeat>0?" "+(mtpPassengerConfig.infantsLap+mtpPassengerConfig.infantsSeat)+"i":""),document.getElementById("mtpPaxCount").innerHTML=e,toggleVis(document.getElementById("mptPassengers")),printLinksContainer()}function processChild(e){var n,t=document.getElementById(e);(n=Number(t.options[t.selectedIndex].value))>=2&&mtpPassengerConfig.cAges.push(n)}function printSettingsvalue(e){var n="";switch(e){case"timeformat":n=mptUsersettings.timeformat;break;case"language":n=mptUsersettings.language;break;case"linkFontsize":n=mptUsersettings.linkFontsize;break;case"acEdition":n=mptUsersettings.acEdition;break;case"aaEdition":n=findNameForValue(mptUsersettings.aaEdition,aaEditions);break;case"aac1Edition":n=findNameForValue(mptUsersettings.aac1Edition,aac1Editions);break;case"aac1Currency":n=findNameForValue(mptUsersettings.aac1Currency,aac1Currencies);break;case"afEdition":n=findNameForValue(mptUsersettings.afEdition,afEditions);break;case"azEdition":n=findNameForValue(mptUsersettings.azEdition,azEditions);break;case"baLanguage":n=findNameForValue(mptUsersettings.baLanguage,baLanguages);break;case"baEdition":n=findNameForValue(mptUsersettings.baEdition,baEditions);break;case"czEdition":n=findNameForValue(mptUsersettings.czEdition,czEditions);break;case"dlEdition":n=findNameForValue(mptUsersettings.dlEdition,dlEditions);break;case"ibEdition":n=findNameForValue(mptUsersettings.ibEdition,ibEditions);break;case"ibCurrency":n=findNameForValue(mptUsersettings.ibCurrency,ibCurrencies);break;case"klEdition":n=findNameForValue(mptUsersettings.klEdition,klEditions);break;case"laEdition":n=findNameForValue(mptUsersettings.laEdition,laEditions);break;case"lhEdition":n=findNameForValue(mptUsersettings.lhEdition,lhEditions);break;case"lxEdition":n=findNameForValue(mptUsersettings.lxEdition,lxEditions);break;default:n=boolToEnabled(mptUsersettings[e])}return n}function findNameForValue(e,n){var t="Unknown";for(var i in n)if(n[i].value==e){t=n[i].name;break}return t}function findPositionForValue(e,n){var t=-1;for(var i in n)if(n[i].value==e){t=[i];break}return t}function printNotification(e){var n=document.getElementById("mtpNotification");if(null===n)alert("mtp Error: Notification container not Found");else if("empty"==e)n.innerHTML="";else{var t=document.createElement("div");t.appendChild(document.createTextNode(e)),n.appendChild(t)}}function getPageLang(){printNotification("empty"),document.getElementById("mptStartparse").setAttribute("class","invis"),document.getElementById("mptStartparse").style.display="none",mptSettings.itaLanguage="en",mptSettings.retrycount=1,-1!=window.location.href.indexOf("view-details")?setTimeout(function(){fePS()},200):-1==window.location.href.indexOf("#search:")&&"https://matrix.itasoftware.com/"!=window.location.href&&"https://matrix.itasoftware.com/"!=window.location.href||setTimeout(function(){startPage()},200)}function exRE(e,n){for(var t,i=new Array,a=0;null!=(t=n.exec(e));)for(t.index===n.lastIndex&&n.lastIndex++,k=1;k<t.length;k++)i[a++]=t[k];return i}function inArray(e,n){for(var t=n.length,i=0;i<t;i++)if(n[i]==e)return!0;return!1}function monthnameToNumber(e){return["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"].indexOf(e.toUpperCase())+1}function monthnumberToName(e){return["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"][e-1]}function getFlightYear(e,n){var t=new Date,i=t.getMonth(),a=t.getDate(),r=t.getFullYear();return(i>n-1||i==n-1&&e<a)&&(r+=1),r}function return12htime(e){var n=0;return(e=/([01]?\d)(:\d{2})(AM|PM|am|pm| AM| PM| am| pm)/g.exec(e))[3]=trimStr(e[3]),"AM"!=e[3]&&"am"!=e[3]||"12"!=e[1]?"PM"!=e[3]&&"pm"!=e[3]||"12"==e[1]||(n=12):n=-12,+e[1]+n+e[2]}function trimStr(e){return e.replace(/^\s+|\s+$/gm,"")}function boolToEnabled(e){return 1==e?"enabled":"disabled"}function getcabincode(e){switch(e){case"E":e=0;break;case"P":e=1;break;case"B":e=2;break;case"F":e=3;break;default:e=0}return e}function findtarget(e,n){var t,i=document.getElementsByTagName("*");j=0;for(t in i)if((" "+i[t].className+" ").indexOf(" "+e+" ")>-1&&(j++,j==n))return i[t]}function findtargets(e){var n,t=document.getElementsByTagName("*"),i=new Array;for(n in t)(" "+t[n].className+" ").indexOf(" "+e+" ")>-1&&i.push(t[n]);return i}function hasClass(e,n){return(" "+e.className+" ").indexOf(" "+n+" ")>-1}function doHttpRequest(e,n,t){if("function"!=typeof t)return printNotification("Error: Invalid callback in doHttpRequest -> not a function"),!1;var i=!1;if("undefined"!=typeof XMLHttpRequest&&(i=new XMLHttpRequest),!i)return printNotification("Error: Failed to initialize http request"),!1;if(i.onreadystatechange=function(){if(4==i.readyState&&200==i.status)t(i);else if(4==i.readyState&&200!=i.status)return printNotification("Error: Failed to complete http request"),!1},"get"==n.mode)i.open("GET",e,!0),i.send();else if("post"==n.mode){i.open("POST",e,!0);for(var a=0;a<n.headers.length;a++)i.setRequestHeader(n.headers[a].name,n.headers[a].val);i.send(n.data)}}function findItinTarget(e,n,t){var a;if(!1===(a=findtarget(classSettings.resultpage.itin,1)))return printNotification("Error: Itin not found in findItinTarget-function"),!1;if(void 0===(a=(a=a.nextSibling.nextSibling).children[e-1]))return printNotification("Error: Leg not found in findItinTarget-function"),!1;if((a=a.children[1].children).length>=2){var r=0,s=0;for(i=0;i<a.length;i++)if(1==hasClass(a[i],classSettings.resultpage.itinRow)&&++s>=n){r=i,2!==a.length&&3!==a.length||r--;break}if(i==a.length)return printNotification("Error: Call to unreachable Segment in Leg "+e+" in findItinTarget-function"),!1;var l=0,o=0;switch(t){case"headline":l=-1*r,o=1;break;case"logo":l=0,o=0;break;case"airportsdate":l=0,o=1;break;case"flight":l=1,o=0;break;case"deptime":l=1,o=1;break;case"arrtime":case"duration":l=1,o=2;break;case"plane":l=1,o=4;break;case"cabin":l=1,o=5;break;default:return printNotification("Error: Unknown Target in findItinTarget-function"),!1}return a[r+l].children[o]}return printNotification("Error: Unknown error in findItinTarget-function"),!1}function validatePaxcount(e){for(var n=new Array,t=0;t<mtpPassengerConfig.cAges.length;t++)n.push(mtpPassengerConfig.cAges[t]);var i={adults:mtpPassengerConfig.adults,children:new Array,infLap:mtpPassengerConfig.infantsLap,infSeat:0};if(!0===e.sepInfSeat)i.infSeat=mtpPassengerConfig.infantsSeat;else for(t=0;t<mtpPassengerConfig.infantsSeat;t++)n.push(e.childMinAge);for(t=0;t<n.length;t++)n[t]<e.childAsAdult?i.children.push(n[t]):i.adults++;if(!0===e.countInf){if(e.maxPaxcount<i.adults+i.infLap+i.infSeat+i.children.length)return console.log("Too many passengers"),!1}else if(e.maxPaxcount<i.adults+i.infSeat+i.children.length)return console.log("Too many passengers"),!1;return 0===i.adults+i.infSeat+i.children.length?(console.log("No passengers"),!1):i}function startPage(){if(void 0===findtarget(classSettings.startpage.maindiv,1))return printNotification("Error: Unable to find content on start page."),!1;target=findtarget(classSettings.startpage.maindiv,1),target.children[0].children[0].children[0].children[0].setAttribute("valign","top")}function bindEditorMode(e){for(var n=0;n<currentItin.itin.length;n++)for(var t=0;t<currentItin.itin[n].seg.length;t++){var i=findItinTarget(n+1,t+1,"cabin").firstChild;if("create"===e){for(var a=(s=i.innerHTML).substr(s.length-2,1),r=s.substr(0,s.length-4),s=[["Economy","Y"],["Premium Economy","Y+"],["Business","C"],["First","F"]],l='<select style="width:40px" class="editoritem">',o=0;o<s.length;o++)l+='<option value="'+s[o][0]+'"'+(s[o][0]===r?' selected="selected"':"")+">"+s[o][1]+"</option>";l+="</select>",l+=' (<input type="text" class="editoritem" value="'+a+'" style="width:20px;text-align:center">)'}else l=(r=i.firstChild.options[i.firstChild.selectedIndex].value)+" ("+(a=i.firstChild.nextSibling.nextSibling.value)+")";i.innerHTML=l}}function fePS(){if(void 0===findtarget(classSettings.resultpage.itin,1))return printNotification("Error: Unable to find Content on result page."),!1;if("none"!=findtarget(classSettings.resultpage.itin,1).parentNode.previousSibling.previousSibling.style.display)return mptSettings.retrycount++,mptSettings.retrycount>50?(printNotification("Error: Timeout on result page. Content not found after 10s."),!1):(setTimeout(function(){fePS()},200),!1);for(t in classSettings.resultpage)if(void 0===findtarget(classSettings.resultpage[t],1))return printNotification("Error: Unable to find class "+classSettings.resultpage[t]+" for "+t+"."),!1;var e;void 0!=document.getElementById("powertoolslinkcontainer")&&(document.getElementById("powertoolslinkcontainer").innerHTML="");for(var n=findtargets("powertoolsitem"),t=n.length-1;t>=0;t--)n[t].parentNode.removeChild(n[t]);if(void 0!=(e=findtarget("pricebreakdown",1))&&e.parentNode.removeChild(e),void 0!=(e=findtarget("ff-links",1))&&e.parentNode.removeChild(e),void 0!=(e=findtarget("ff-plancontainer",1))&&e.parentNode.removeChild(e),void 0!=(e=document.getElementById("ff-routingcodescontainer"))&&e.parentNode.removeChild(e),1==mptUsersettings.enableEditormode&&0===findtargets("editoritem").length)return toggleVis(document.getElementById("mptStartparse")),document.getElementById("mptStartparse").style.display="inline-block",readItinerary(!1),bindEditorMode("create"),!1;findtargets("editoritem").length>0&&(bindEditorMode("remove"),toggleVis(document.getElementById("mptStartparse"))),1==mptUsersettings.enableFarerules&&bindRulelinks(),1==mptUsersettings.enableInlinemode?findtarget(classSettings.resultpage.milagecontainer,1).setAttribute("rowspan",10):0==mptUsersettings.enableInlinemode&&1==mptUsersettings.enablePricebreakdown?findtarget(classSettings.resultpage.milagecontainer,1).setAttribute("rowspan",3):findtarget(classSettings.resultpage.milagecontainer,1).setAttribute("rowspan",2),readItinerary(!0),"en"!==mptUsersettings.language&&void 0!==translations[mptUsersettings.language].resultpage&&translate("resultpage",mptUsersettings.language,findtarget(classSettings.resultpage.itin,1).nextSibling.nextSibling),1==mptUsersettings.enablePricebreakdown&&rearrangeprices(currentItin.dist),1==mptUsersettings.enableInlinemode&&printCPM(),printLinksContainer(),1==mptUsersettings.enableSeatguru&&bindSeatguru(),1==mptUsersettings.enablePlanefinder&&bindPlanefinder(),1==mptUsersettings.enableMilesbreakdown&&"undefined"!=typeof JSON&&printMilesbreakdown(),1==mptUsersettings.enableWheretocredit&&bindWheretocredit(),1==mptUsersettings.enableFarefreaks&&"undefined"!=typeof JSON&&createFareFreaksContainer()}function printLinksContainer(){if(findtargets("editoritem").length>0)return!1;void 0!=document.getElementById("powertoolslinkcontainer")&&(document.getElementById("powertoolslinkcontainer").innerHTML="");for(var e=findtargets("powertoolsitem"),n=e.length-1;n>=1;n--)e[n].parentNode.removeChild(e[n]);void 0===currentItin.itin[0].dep.offset&&printTimezones(),printAAc1(),printAA(),printAC(),2==currentItin.itin.length&¤tItin.itin[0].orig==currentItin.itin[1].dest&¤tItin.itin[0].dest==currentItin.itin[1].orig&&printAF(),inArray(currentItin.carriers[0],["AS","VX"])&&(1===currentItin.carriers.length||2===currentItin.carriers.length&&inArray(currentItin.carriers[1],["AS","VX"]))&&printAS(),(inArray("IB",currentItin.carriers)||inArray("BA",currentItin.carriers))&&printBA(),currentItin.itin.length>=3&&inArray("CZ",currentItin.carriers)&&printCZ(),1==currentItin.carriers.length&&"AZ"==currentItin.carriers[0]&&printAZ(),printDL(),(inArray("IB",currentItin.carriers)||inArray("BA",currentItin.carriers))&&printIB(),printKL(),(inArray("LH",currentItin.carriers)||inArray("OS",currentItin.carriers))&&printLH(),currentItin.itin.length<=2&&inArray("LX",currentItin.carriers)&&printLX(),inArray("TK",currentItin.carriers)&&printTK(),1==mptUsersettings.enableDeviders&&printSeperator(),printCheapOair(),printPriceline(),printEtraveli(),1==mptUsersettings.enableDeviders&&printSeperator(),printHipmunk(),printMomondo(),printKayak(0),printKayak(1),printSkyscanner(),1==mptUsersettings.enableDeviders&&printSeperator(),printFarefreaks(0),printFarefreaks(1),printGCM(),printWheretocredit(),bindLinkClicks()}function bindRulelinks(){var e=0,n=0,t=1,i=findtarget(classSettings.resultpage.rulescontainer,t);if(void 0!=i)do{e>Number(i.firstChild.innerHTML.replace(/[^\d]/gi,""))&&(n++,e=0),i=i.nextSibling.nextSibling.nextSibling;var a=window.location.href.replace(/view-details/,"view-rules")+";fare-key="+n+"/"+e,r=document.createElement("a");r.setAttribute("class","gwt-Anchor"),r.setAttribute("href",a),r.setAttribute("target","_blank");var s=document.createTextNode("rules");r.appendChild(s),i.parentNode.replaceChild(r,i),e++,t++,i=findtarget(classSettings.resultpage.rulescontainer,t)}while(void 0!=i)}function rearrangeprices(){var e=0,n=0,t=0,i=0,a="",r=new RegExp("((YQ|YR))"),s=1,l=findtarget(classSettings.resultpage.htbLeft,s);if(0==mptUsersettings.enableInlinemode)var o="",u=0;if(void 0!=l)do{var g=l.firstChild.firstChild.nodeType;if(1==g){i=1;var c=Number(l.nextSibling.firstChild.innerHTML.replace(/[^\d]/gi,""));""==a&&(a=l.nextSibling.firstChild.innerHTML.replace(/[\d,.]/g,"")),e+=c}else if(1==i&&3==g){var d=l.firstChild.innerHTML;c=Number(l.nextSibling.firstChild.innerHTML.replace(/[^\d]/gi,""));if(1==hasClass(l.nextSibling,classSettings.resultpage.htbGreyBorder)){var m=e+n+t;if(1==mptUsersettings.enableInlinemode)(p=document.createElement("tr")).innerHTML='<td class="'+classSettings.resultpage.htbLeft+'"><div class="gwt-Label">Basefare per passenger ('+(e/m*100).toFixed(2).toString()+'%)</div></td><td class="'+classSettings.resultpage.htbGreyBorder+'"><div class="gwt-Label">'+a+(e/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</div></td>",l.parentNode.parentNode.insertBefore(p,l.parentNode),(p=document.createElement("tr")).innerHTML='<td class="'+classSettings.resultpage.htbLeft+'"><div class="gwt-Label">Taxes per passenger ('+(n/m*100).toFixed(2).toString()+'%)</div></td><td class="'+classSettings.resultpage.htbRight+'"><div class="gwt-Label">'+a+(n/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</div></td>",l.parentNode.parentNode.insertBefore(p,l.parentNode),(p=document.createElement("tr")).innerHTML='<td class="'+classSettings.resultpage.htbLeft+'"><div class="gwt-Label">Surcharges per passenger ('+(t/m*100).toFixed(2).toString()+'%)</div></td><td class="'+classSettings.resultpage.htbRight+'"><div class="gwt-Label">'+a+(t/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</div></td>",l.parentNode.parentNode.insertBefore(p,l.parentNode),(p=document.createElement("tr")).innerHTML='<td class="'+classSettings.resultpage.htbLeft+'"><div class="gwt-Label">Basefare + Taxes per passenger ('+((e+n)/m*100).toFixed(2).toString()+'%)</div></td><td class="'+classSettings.resultpage.htbGreyBorder+'"><div class="gwt-Label">'+a+((e+n)/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</div></td>",l.parentNode.parentNode.insertBefore(p,l.parentNode);else o+='<table style="float:left; margin-right:15px;"><tbody>',o+='<tr><td colspan=3 style="text-align:center;">Price breakdown '+ ++u+":</td></tr>",o+="<tr><td>"+a+' per mile</td><td colspan=2 style="text-align:center;">'+(m/currentItin.dist/100).toFixed(4).toString()+"</td></tr>",o+='<tr><td>Basefare</td><td style="padding:0px 3px;text-align:right;">'+(e/m*100).toFixed(1).toString()+'%</td><td style="text-align:right;">'+a+(e/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</td></tr>",o+='<tr><td>Tax</td><td style="padding:0px 3px;text-align:right;">'+(n/m*100).toFixed(1).toString()+'%</td><td style="text-align:right;">'+a+(n/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</td></tr>",o+='<tr><td>Surcharges</td><td style="padding:0px 3px;text-align:right;">'+(t/m*100).toFixed(1).toString()+'%</td><td style="text-align:right;">'+a+(t/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</td></tr>",o+='<tr><td style="border-top: 1px solid #878787;padding:2px 0">Bf+Tax</td><td style="border-top: 1px solid #878787;padding:2px 3px;text-align:right;">'+((e+n)/m*100).toFixed(1).toString()+'%</td><td style="border-top: 1px solid #878787;padding:2px 0; text-align:right;">'+a+((e+n)/100).toFixed(2).toString().replace(/\d(?=(\d{3})+\.)/g,"$&,")+"</td></tr>",o+="</tbody></table>";currentItin.basefares=+(e/100).toFixed(2),currentItin.taxes=+(n/100).toFixed(2),currentItin.surcharges=+(t/100).toFixed(2),i=0,e=0,n=0,t=0}else!0===r.test(d)?t+=c:n+=c}s++,l=findtarget(classSettings.resultpage.htbLeft,s)}while(void 0!=l);if(0==mptUsersettings.enableInlinemode){var p,h=findtarget(classSettings.resultpage.htbContainer,1).parentNode.parentNode.parentNode;(p=document.createElement("tr")).setAttribute("class","pricebreakdown"),p.innerHTML="<td><div>"+o+"</div></td>",h.parentNode.insertBefore(p,h)}}function printMilesbreakdown(){1==mptUsersettings.enableMilesbreakdownautoload?retrieveMileages():(target=findItinTarget(1,1,"headline"),target.innerHTML=target.innerHTML.replace(target.firstChild.className,target.firstChild.className+'" style="display:inline-block')+'<div id="loadmileage" class="'+target.firstChild.className+'" style="display:inline-block;cursor:pointer;float:right;">Load mileage</div>',document.getElementById("loadmileage").onclick=function(){document.getElementById("loadmileage").parentNode.removeChild(document.getElementById("loadmileage")),retrieveMileages()})}function retrieveMileages(){for(var e=new Object,n="",t=0;t<currentItin.itin.length;t++)for(var i=0;i<currentItin.itin[t].seg.length;i++)void 0===distances[currentItin.itin[t].seg[i].orig+currentItin.itin[t].seg[i].dest]&&void 0===distances[currentItin.itin[t].seg[i].dest+currentItin.itin[t].seg[i].orig]&&void 0===e[currentItin.itin[t].seg[i].orig+currentItin.itin[t].seg[i].dest]&&void 0===e[currentItin.itin[t].seg[i].dest+currentItin.itin[t].seg[i].orig]&&(e[currentItin.itin[t].seg[i].orig+currentItin.itin[t].seg[i].dest]=currentItin.itin[t].seg[i].orig+"-"+currentItin.itin[t].seg[i].dest);for(t in e)n+=(""===n?"":"&")+"r[]="+e[t];if(""===n)return printMileages(),!1;doHttpRequest("https://www.farefreaks.com/ajax/calcroutedist.php?"+n,{mode:"get"},function(e){var n=!1;if("undefined"==typeof JSON)return printNotification("Error: Failed parsing route data - Browser not supporting JSON"),!1;try{n=JSON.parse(e.responseText)}catch(e){n=!1}if("object"!=typeof n)return printNotification("Error: Failed parsing route data"),!1;if(void 0===n.success||void 0===n.error||void 0===n.data)return printNotification("Error: wrong route data format"),!1;if("1"!==n.success)return printNotification("Error: "+n.error+" in retrieveMileages function"),!1;for(t in n.data)distances[t]=parseFloat(n.data[t]);printMileages()})}function printMileages(){for(var e=0,n=0;n<currentItin.itin.length;n++){for(var t=0;t<currentItin.itin[n].seg.length;t++){if(void 0===distances[currentItin.itin[n].seg[t].orig+currentItin.itin[n].seg[t].dest]&&void 0===distances[currentItin.itin[n].seg[t].dest+currentItin.itin[n].seg[t].orig])return printNotification("Error: Missing route data for "+currentItin.itin[n].seg[t].orig+" => "+currentItin.itin[n].seg[t].dest),!1;void 0!==distances[currentItin.itin[n].seg[t].orig+currentItin.itin[n].seg[t].dest]&&void 0===distances[currentItin.itin[n].seg[t].dest+currentItin.itin[n].seg[t].orig]?currentItin.itin[n].seg[t].dist=distances[currentItin.itin[n].seg[t].orig+currentItin.itin[n].seg[t].dest]:currentItin.itin[n].seg[t].dist=distances[currentItin.itin[n].seg[t].dest+currentItin.itin[n].seg[t].orig],e+=currentItin.itin[n].seg[t].dist,currentItin.itin[n].seg[t].dist=Math.floor(currentItin.itin[n].seg[t].dist)}currentItin.itin[n].dist=Math.floor(e),e=0}if(1===mptUsersettings.enableInlinemode||1===mptUsersettings.enableMilesInlinemode){var i="";for(n=0;n<currentItin.itin.length;n++){(i=findItinTarget(n+1,1,"headline")).innerHTML=i.innerHTML.replace(i.firstChild.className,i.firstChild.className+'" style="display:inline-block')+'<div style="display:inline-block;float:right;"> '+currentItin.itin[n].dist+" miles</div>";for(t=0;t<currentItin.itin[n].seg.length;t++)currentItin.itin[n].seg.length>1&&((i=findItinTarget(n+1,t+1,"airportsdate")).innerHTML=i.innerHTML.replace(i.firstChild.className,i.firstChild.className+'" style="display:inline-block')+'<div style="display:inline-block;float:right;margin-right:110px;"> '+currentItin.itin[n].seg[t].dist+" miles</div>")}}else{var a="";a+="<tbody>",a+='<tr><td colspan="4" style="text-align:center;">Mileage breakdown:</td></tr>';for(n=0;n<currentItin.itin.length;n++){a+='<tr><td style="border-bottom: 1px solid #878787;padding:2px 2px">Leg '+(n+1)+'</td><td style="border-bottom: 1px solid #878787;padding:2px 0">'+currentItin.itin[n].orig+'</td><td style="border-bottom: 1px solid #878787;padding:2px 0">'+currentItin.itin[n].dest+'</td><td style="border-bottom: 1px solid #878787;padding:2px 0;text-align:right;">'+currentItin.itin[n].dist+"</td></tr>";for(t=0;t<currentItin.itin[n].seg.length;t++)currentItin.itin[n].seg.length>1&&(a+="<tr><td></td><td>"+currentItin.itin[n].seg[t].orig+"</td><td>"+currentItin.itin[n].seg[t].dest+'</td><td style="text-align:right;">'+currentItin.itin[n].seg[t].dist+"</td></tr>")}if(a+="</tbody>",void 0===findtarget("pricebreakdown",1)){var r=findtarget(classSettings.resultpage.htbContainer,1).parentNode.parentNode.parentNode,s=document.createElement("tr");s.setAttribute("class","pricebreakdown"),s.innerHTML='<td><div><table style="float:left; margin-right:15px;">'+a+"</table></div></td>",r.parentNode.insertBefore(s,r)}else{r=findtarget("pricebreakdown",1).firstChild.firstChild.firstChild;var l=document.createElement("table");l.setAttribute("style","float:left; margin-right:15px;"),l.innerHTML=a,r.parentNode.insertBefore(l,r)}}}function parseAddInfo(e){var n={codeshare:0,layoverduration:0,airportchange:0,arrDate:""};!0===/contains\s*airport\s*changes/g.test(e)&&(n.airportchange=1),!0===/OPERATED\s*BY/g.test(e)&&(n.codeshare=1);var t=new Array;2==(t=exRE(e,/\,\s*([a-zA-Z]{3})\s*([0-9]{1,2})/g)).length&&(n.arrDate={},n.arrDate.month=monthnameToNumber(t[0]),n.arrDate.day=parseInt(t[1]),n.arrDate.year=getFlightYear(n.arrDate.day,n.arrDate.month));t=new Array;return 2==(t=exRE(e,/([0-9]{1,2})h\s([0-9]{1,2})m/g)).length&&(n.layoverduration=60*parseInt(t[0])+parseInt(t[1])),n}function readItinerary(e){var n=new Array,t=new Array,i=new Array,a=new Array,r=new Array,s=new Array,l=new Array,o=new Array,u="",g=document.getElementById("contentwrapper").innerHTML,c=exRE(g,b=/colspan\=\"5\"[^\(]+\(([\w]{3})[^\(]+\(([\w]{3})/g);for(A=0;A<c.length;A+=2){var d={arr:{},dep:{}};d.orig=c[A],d.dest=c[A+1],d.seg=new Array,i.push(d)}for(l=exRE(g,b=/Carrier\s([\w]{2})\s([\w]+).*?Covers\s([\w\(\)\s\-,]+)/g),o={c:"",f:"",l:new Array},A=0;A<l.length;A+=3)for(o.c=l[A],o.f=l[A+1],r.push(o.f),o.l=exRE(l[A+2],/(\w\w\w\-\w\w\w)/g),f=0;f<o.l.length;f++)s.push(o.l[f]+"-"+o.f+"-"+o.c);var m=new Array;m=exRE(g,b=/35px\/(\w{2}).png[^\(]+\(([A-Z]{3})[^\(]+\(([A-Z]{3})[^\,]*\,\s*([a-zA-Z]{3})\s*([0-9]{1,2}).*?gwt-Label.*?([0-9]*)\<.*?Dep:[^0-9]+(.*?)\<.*?Arr:[^0-9]+(.*?)\<.*?([0-9]{1,2})h\s([0-9]{1,2})m.*?gwt-Label.*?\>(.*?)\<.*?gwt-Label\"\>(\w).*?\((\w)\).*?\<.*?tr(.*?)(table|airline_logos)/g);var p=0,h=0;for(A=0;A<m.length;A+=15){(l={}).carrier=m[A],l.orig=m[A+1],l.dest=m[A+2],l.dep={},l.arr={},l.dep.month=monthnameToNumber(m[A+3]),l.dep.day=parseInt(m[A+4]),l.dep.year=getFlightYear(l.dep.day,l.dep.month),l.fnr=m[A+5],"24h"==mptUsersettings.timeformat&&(n.push(m[A+6]),n.push(m[A+7])),m[A+6]=return12htime(m[A+6]),m[A+7]=return12htime(m[A+7]),"24h"==mptUsersettings.timeformat&&(t.push((4==m[A+6].length?"0":"")+m[A+6]),t.push((4==m[A+7].length?"0":"")+m[A+7])),l.dep.time=m[A+6],l.arr.time=m[A+7],l.duration=60*parseInt(m[A+8])+parseInt(m[A+9]),l.aircraft=m[A+10],l.cabin=getcabincode(m[A+11]),l.bookingclass=m[A+12];var v=parseAddInfo(m[A+13]);""!=v.arrDate?(l.arr.day=v.arrDate.day,l.arr.month=v.arrDate.month,l.arr.year=v.arrDate.year):(l.arr.day=l.dep.day,l.arr.month=l.dep.month,l.arr.year=l.dep.year),l.codeshare=v.codeshare,l.layoverduration=v.layoverduration,l.airportchange=v.airportchange,l.farebase="",l.farecarrier="";for(var f=0;f<s.length;f++)if(-1!=s[f].indexOf(l.orig+"-"+l.dest+"-")){o=s[f].split("-");l.farebase=o[2],l.farecarrier=o[3],s[f]=l.farebase,f=s.length}void 0===i[p]&&(i[p]=new Object),void 0===i[p].seg&&(i[p].seg=new Array),i[p].seg.push(l),inArray(l.carrier,a)||a.push(l.carrier),0==h&&(void 0===i[p].dep&&(i[p].dep=new Object),i[p].dep.day=l.dep.day,i[p].dep.month=l.dep.month,i[p].dep.year=l.dep.year,i[p].dep.time=l.dep.time),void 0===i[p].arr&&(i[p].arr=new Object),i[p].arr.day=l.arr.day,i[p].arr.month=l.arr.month,i[p].arr.year=l.arr.year,i[p].arr.time=l.arr.time,h++,"table"==m[A+14]&&(p++,h=0)}for(var A=0;A<s.length;A++){var E=s[A].split("-");if(E.length>1){for(o=0,p=0;p<i.length;p++){for(h=0;h<i[p].seg.length;h++)if(i[p].seg[h].orig==E[0]&&i[p].seg[h].dest==E[1]&&""==i[p].seg[h].farebase)i[p].seg[h].farebase=E[2],i[p].seg[h].farecarrier=E[3],s[A]=E[2],h=i[p].seg.length,o=1;else if(i[p].seg[h].orig==E[0]&&i[p].seg[h].dest!=E[1]&&""==i[p].seg[h].farebase)for(f=h+1;f<i[p].seg.length;f++)if(i[p].seg[f].dest==E[1]&&""==i[p].seg[f].farebase){for(var I=h;I<=f;I++)i[p].seg[I].farebase=E[2],i[p].seg[I].farecarrier=E[3],s[A]=E[2];f=i[p].seg.length,h=i[p].seg.length,o=1}else""!=i[p].seg[h+f].farebase&&(f=i[p].seg.length);1==o&&(p=i.length)}0==o&&printNotification("Unused fare:"+s[A])}}var b,y=new Array;for(y=exRE(g,b=/Mileage.*?([0-9,]+)\stotal\smiles.*?Total\scost\sfor\s([0-9])\spassenger.*?<div.*?>(.*?([1-9][0-9,.]+)[^\<]*)/g),A=0;A<matrixCurrencies.length;A++)!0===matrixCurrencies[A].p.test(y[2])&&(u=matrixCurrencies[A].c,A=matrixCurrencies.length);if(currentItin={itin:i,price:Number(y[3].replace(/\,/,"")),numPax:Number(y[1]),carriers:a,cur:u,farebases:r,dist:Number(y[0].replace(/\,/,""))},n.length>0&&!0===e)for(target=findtarget(classSettings.resultpage.itin,1).nextSibling.nextSibling,A=0;A<n.length;A++)b=new RegExp(n[A],"g"),target.innerHTML=target.innerHTML.replace(b,t[A])}function translate(e,n,t){if(void 0===translations[n])return printNotification("Error: Translation "+n+" not found"),!1;if(void 0===translations[n][e])return printNotification("Error: Translation "+n+" not found for page "+e),!1;for(i in translations[n][e])re=new RegExp(i,"g"),t.innerHTML=t.innerHTML.replace(re,translations[n][e][i])}function printCPM(){printItemInline((Number(currentItin.price)/Number(currentItin.dist)).toFixed(4)+" cpm","",1)}function getAmadeusUrl(e){null===e&&"object"!=typeof e&&((e=new Object).sepcabin=1,e.detailed=0,e.inctimes=1,e.enablesegskip=1,e.allowpremium=1),e.sepcabin=void 0===e.sepcabin?1:e.sepcabin,e.detailed=void 0===e.detailed?0:e.detailed,e.inctimes=void 0===e.inctimes?1:e.inctimes,e.enablesegskip=void 0===e.enablesegskip?1:e.enablesegskip,e.allowpremium=void 0===e.allowpremium?1:e.allowpremium;var n=0,t=0,i=0,a="",r=0,s="",l="",o=["E","N","B","F"];o[1]=1!=e.allowpremium?o[0]:o[1];for(var u=0;u<currentItin.itin.length;u++){i=3,t=currentItin.itin[u].seg[0].cabin;for(var g=0;g<currentItin.itin[u].seg.length;g++){for(var c=0;g+c<currentItin.itin[u].seg.length-1&&!(currentItin.itin[u].seg[g+c].fnr!=currentItin.itin[u].seg[g+c+1].fnr||currentItin.itin[u].seg[g+c].layoverduration>=1440||0==e.enablesegskip);)c++;(++i>3||currentItin.itin[u].seg[g].cabin!=t&&1==e.sepcabin)&&(""!=a&&(s+="&E_LOCATION_"+n+"="+a,s+="&E_DATE_"+n+"="+l),i=1,s+="&B_LOCATION_"+ ++n+"="+currentItin.itin[u].seg[g].orig,s+="&B_ANY_TIME_"+n+"=FALSE",s+="&B_DATE_"+n+"="+currentItin.itin[u].seg[g].dep.year+("0"+currentItin.itin[u].seg[g].dep.month).slice(-2)+("0"+currentItin.itin[u].seg[g].dep.day).slice(-2)+(1==e.inctimes?("0"+currentItin.itin[u].seg[g].dep.time.replace(":","")).slice(-4):"0000"),s+="&CABIN_"+n+"="+o[currentItin.itin[u].seg[g].cabin],s+="&ALLOW_ALTERNATE_AVAILABILITY_"+n+"=FALSE",s+="&DATE_RANGE_VALUE_"+n+"=0"),l=currentItin.itin[u].seg[g+c].arr.year+("0"+currentItin.itin[u].seg[g+c].arr.month).slice(-2)+("0"+currentItin.itin[u].seg[g+c].arr.day).slice(-2)+(1==e.inctimes?("0"+currentItin.itin[u].seg[g+c].arr.time.replace(":","")).slice(-4):"0000"),1===e.detailed&&(s+="&B_LOCATION_"+n+"_"+i+"="+currentItin.itin[u].seg[g].orig,s+="&B_LOCATION_CITY_"+n+"_"+i+"="+currentItin.itin[u].seg[g].orig,s+="&B_DATE_"+n+"_"+i+"="+currentItin.itin[u].seg[g].dep.year+("0"+currentItin.itin[u].seg[g].dep.month).slice(-2)+("0"+currentItin.itin[u].seg[g].dep.day).slice(-2)+(1==e.inctimes?("0"+currentItin.itin[u].seg[g].dep.time.replace(":","")).slice(-4):"0000"),s+="&E_LOCATION_"+n+"_"+i+"="+currentItin.itin[u].seg[g+c].dest,s+="&E_LOCATION_CITY_"+n+"_"+i+"="+currentItin.itin[u].seg[g+c].dest,s+="&E_DATE_"+n+"_"+i+"="+l),s+="&AIRLINE_"+n+"_"+i+"="+currentItin.itin[u].seg[g].carrier,s+="&FLIGHT_NUMBER_"+n+"_"+i+"="+currentItin.itin[u].seg[g].fnr,s+="&RBD_"+n+"_"+i+"="+currentItin.itin[u].seg[g].bookingclass,a=currentItin.itin[u].seg[g+c].dest,t=currentItin.itin[u].seg[g].cabin,currentItin.itin[u].seg[g].cabin>r&&(r=currentItin.itin[u].seg[g].cabin),g+=c}}return s+="&E_LOCATION_"+n+"="+a,s+="&E_DATE_"+n+"="+l,s+="&CABIN="+o["Auto"===mptSettings.cabin?r:getForcedCabin()]}function getAmadeusPax(e,n){null===n&&"object"!=typeof n&&((n=new Object).allowinf=1,n.youthage=0),n.allowinf=void 0===n.allowinf?1:n.allowinf,n.youthage=void 0===n.sepyouth?0:n.sepyouth;var t={c:0,y:0},a=1,r="&IS_PRIMARY_TRAVELLER_1=True";for(i=0;i<e.children.length;i++)e.children[i]>=n.youthage&&n.youthage>0?t.y++:e.children[i]>=12?e.adults++:t.c++;for(i=0;i<e.adults;i++)r+="&TRAVELER_TYPE_"+a+"=ADT",r+="&HAS_INFANT_"+a+"="+(i<e.infLap&&1==n.allowinf?"True":"False"),r+="&IS_YOUTH_"+a+"=False",a++;for(i=0;i<t.y;i++)r+="&TRAVELER_TYPE_"+a+"=ADT",r+="&HAS_INFANT_"+a+"=False",r+="&IS_YOUTH_"+a+"=True",a++;for(i=0;i<t.c;i++)r+="&TRAVELER_TYPE_"+a+"=CHD",r+="&HAS_INFANT_"+a+"=False",r+="&IS_YOUTH_"+a+"=False",a++;return{url:r,adults:e.adults,youth:t.y,children:t.c,infants:e.infLap}}function getAmadeusTriptype(){return currentItin.itin.length>1?2==currentItin.itin.length&¤tItin.itin[0].orig==currentItin.itin[1].dest&¤tItin.itin[0].dest==currentItin.itin[1].orig?"R":"M":"O"}function printAA(){var e=function(e){for(var n="http://i11l-services.aa.com/xaa/mseGateway/entryPoint.php?PARAM=",t="1,,USD0.00,"+currentItin.itin.length+",",i=new Array,a="",r=new Array,s="",l=0;l<currentItin.itin.length;l++){r=new Array;for(var o=0;o<currentItin.itin[l].seg.length;o++){for(var u=0;o+u<currentItin.itin[l].seg.length-1&&!(currentItin.itin[l].seg[o+u].fnr!=currentItin.itin[l].seg[o+u+1].fnr||currentItin.itin[l].seg[o+u].layoverduration>=1440);)u++;s=currentItin.itin[l].seg[o+u].arr.year+"-"+("0"+currentItin.itin[l].seg[o+u].arr.month).slice(-2)+"-"+("0"+currentItin.itin[l].seg[o+u].arr.day).slice(-2)+"T"+("0"+currentItin.itin[l].seg[o+u].arr.time).slice(-5)+(void 0===currentItin.itin[l].seg[o+u].arr.offset?"+00:00":currentItin.itin[l].seg[o+u].arr.offset)+",",s+=currentItin.itin[l].seg[o].bookingclass+",",s+=currentItin.itin[l].seg[o].dep.year+"-"+("0"+currentItin.itin[l].seg[o].dep.month).slice(-2)+"-"+("0"+currentItin.itin[l].seg[o].dep.day).slice(-2)+"T"+("0"+currentItin.itin[l].seg[o].dep.time).slice(-5)+(void 0===currentItin.itin[l].seg[o].dep.offset?"+00:00":currentItin.itin[l].seg[o].dep.offset)+",",s+=currentItin.itin[l].seg[o+u].dest+",",s+=currentItin.itin[l].seg[o].carrier+currentItin.itin[l].seg[o].fnr+",",s+=currentItin.itin[l].seg[o].orig,r.push(s),o+=u}t+=r.length+","+r.join()+",",a=currentItin.itin[l].dep.year+"-"+("0"+currentItin.itin[l].dep.month).slice(-2)+"-"+("0"+currentItin.itin[l].dep.day).slice(-2)+",",a+=currentItin.itin[l].dest+",,",a+=currentItin.itin[l].orig+",",i.push(a)}t+="DIRECT,",t+=e[0].toUpperCase()+",",t+="3,";var g=validatePaxcount({maxPaxcount:7,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});return!1===g?(printNotification("Error: Failed to validate Passengers in printAA"),!1):(t+=g.adults+",",t+=g.children.length+",",t+=g.infLap+",",t+="0,",t+=e[1].toUpperCase()+",",t+=currentItin.itin.length+","+i.join(),n+=encodeURIComponent(t))},n=mptUsersettings.aaEdition.split("_");if(2!=n.length)return printNotification("Error:Invalid AA-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=aaEditions.map(function(n,t){return'<a href="'+e(n.value.split("_"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"American","Europe/Asia/Pacific",null,i):printUrl(t,"American","Europe/Asia/Pacific",i)}function printAAc1(){var e=function(e,n,t){var i=e+"-"+("0"+n).slice(-2)+"-"+("0"+t).slice(-2)+"T00:00:00-06:00";return Date.parse(i)},n=function(n){var t=validatePaxcount({maxPaxcount:6,countInf:!0,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===t)return printNotification("Error: Failed to validate Passengers in printAAc1"),!1;var i="https://www.aa.com/goto/metasearch?ITEN=GOOGLE,,US,";1===currentItin.itin.length?i+="oneWay":i+="multi",i+=",4,A"+t.adults+"S0C"+t.children.length+"I"+t.infLap+"Y0L0,0,",i+=currentItin.itin[0].orig+",0,"+currentItin.itin[0].dest,i+=",0";for(var a=0;a<currentItin.itin.length;a++)i+=",false,"+e(currentItin.itin[a].seg[0].dep.year,currentItin.itin[a].seg[0].dep.month,currentItin.itin[a].seg[0].dep.day);if(currentItin.itin.length>1&&(i+=",0,0"),i+=","+currentItin.price+",1,",currentItin.itin.length>1){var r="";for(a=0;a<currentItin.itin.length;a++)r+="#"+currentItin.itin[a].orig+"|"+currentItin.itin[a].dest+"|0|0|",r+=e(currentItin.itin[a].seg[0].dep.year,currentItin.itin[a].seg[0].dep.month,currentItin.itin[a].seg[0].dep.day);i+=encodeURIComponent(r)+","}var s=new Array;for(a=0;a<currentItin.itin.length;a++)for(var l=0;l<currentItin.itin[a].seg.length;l++){for(var o=0;l+o<currentItin.itin[a].seg.length-1&&!(currentItin.itin[a].seg[l+o].fnr!==currentItin.itin[a].seg[l+o+1].fnr||currentItin.itin[a].seg[l+o].layoverduration>=1440);)o++;var u="#"+currentItin.itin[a].seg[l].carrier+"|"+currentItin.itin[a].seg[l].fnr+"|"+currentItin.itin[a].seg[l].bookingclass;u+="|"+currentItin.itin[a].seg[l].orig,u+="|"+currentItin.itin[a].seg[l+o].dest,u+="|"+Date.parse(currentItin.itin[a].seg[l].dep.year+"-"+("0"+currentItin.itin[a].seg[l].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].seg[l].dep.day).slice(-2)+"T"+("0"+currentItin.itin[a].seg[l].dep.time).slice(-5)+":00"+(void 0===currentItin.itin[a].seg[l].dep.offset?"+00:00":currentItin.itin[a].seg[l].dep.offset)),u+="|"+a,s.push(u),l+=o}return i+=encodeURIComponent(s.join(""))},t=n(mptUsersettings.aac1Edition.toUpperCase());if(!1===t)return!1;aac1Editions.map(function(e,t){return'<a href="'+n(e.value.toUpperCase())+'" target="_blank">'+e.name+"</a>"}).join("<br/>"),1===mptUsersettings.enableInlinemode?printUrlInline(t,"American","America & UK",""):printUrl(t,"American","America & UK","")}function printAC(){var e=function(e){var n="https://book.aircanada.com/pl/AConline/en/RedirectionServlet?FareRequest=YES&PRICING_MODE=0&fromThirdParty=YES";n+="&country="+e+"&countryOfResidence="+e+("de"==mptSettings.itaLanguage||"de"==mptUsersettings.language?"&language=de":"&language=en");var t=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:16,sepInfSeat:!1,childMinAge:2});if(!1===t)return printNotification("Error: Failed to validate Passengers in printAC"),!1;var i=getAmadeusPax(t,{allowinf:0,youthage:12});n+=i.url,n+="&numberOfAdults="+i.adults,n+="&numberOfInfants="+i.infants,n+="&numberOfYouth="+i.youth,n+="&numberOfChildren="+i.children,n+="&tripType="+getAmadeusTriptype();for(var a=0;a<currentItin.itin.length;a++)n+="&departure"+(a+1)+"="+("0"+currentItin.itin[a].dep.day).slice(-2)+"/"+("0"+currentItin.itin[a].dep.month).slice(-2)+"/"+currentItin.itin[a].dep.year+"&org"+(a+1)+"="+currentItin.itin[a].orig+"&dest"+(a+1)+"="+currentItin.itin[a].dest;return n+=getAmadeusUrl({sepcabin:1,detailed:1,allowpremium:1})},n=e(mptUsersettings.acEdition.toUpperCase());if(!1===n)return!1;var t=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';t+=acEditions.map(function(n,t){return'<a href="'+e(n.toUpperCase())+'" target="_blank">'+n+"</a>"}).join("<br/>"),t+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(n,"Air Canada","",null,t):printUrl(n,"Air Canada","",t)}function printAF(){var e=function(e){for(var n=3,t="https://www.airfrance.com/"+e+"/local/process/standardbooking/DisplayUpsellAction.do?calendarSearch=1&subCabin=MCHER&typeTrip=2",i=0;i<currentItin.itin.length;i++)if(0==i){t+="&from="+currentItin.itin[i].orig,t+="&to="+currentItin.itin[i].dest,t+="&outboundDate="+currentItin.itin[i].dep.year+"-"+("0"+currentItin.itin[i].dep.month).slice(-2)+"-"+("0"+currentItin.itin[i].dep.day).slice(-2),t+="&firstOutboundHour="+("0"+currentItin.itin[i].dep.time).slice(-5),flights="";for(var a=0;a<currentItin.itin[i].seg.length;a++)a>0&&(flights+="|"),flights+=currentItin.itin[i].seg[a].carrier+("000"+currentItin.itin[i].seg[a].fnr).slice(-4);t+="&flightOutbound="+flights}else if(1==i){t+="&inboundDate="+currentItin.itin[i].dep.year+"-"+("0"+currentItin.itin[i].dep.month).slice(-2)+"-"+("0"+currentItin.itin[i].dep.day).slice(-2),t+="&firstInboundHour="+("0"+currentItin.itin[i].dep.time).slice(-5),flights="";for(a=0;a<currentItin.itin[i].seg.length;a++)a>0&&(flights+="|"),flights+=currentItin.itin[i].seg[a].carrier+("000"+currentItin.itin[i].seg[a].fnr).slice(-4),currentItin.itin[i].seg[a].cabin<n&&(n=currentItin.itin[i].seg[a].cabin);t+="&flightInbound="+flights}t+="&cabin="+["Y","W","C","F"]["Auto"===mptSettings.cabin?n:getForcedCabin()];var r=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:18,sepInfSeat:!1,childMinAge:2});if(!1===r)return printNotification("Error: Failed to validate Passengers in printAF"),!1;var s={c:0,y:0};for(i=0;i<r.children.length;i++)r.children[i]>11?s.y++:s.c++;var l=0;for(t+="&nbAdults="+r.adults,i=0;i<r.adults;i++)t+="&paxTypoList=ADT",l++;for(t+="&nbEnfants="+s.y,i=0;i<s.y;i++)t+="&paxTypoList=YTH_MIN",l++;for(t+="&nbChildren="+s.c,i=0;i<s.y;i++)t+="&paxTypoList=CHD",l++;for(t+="&nbBebes="+r.infLap,i=0;i<r.infLap;i++)t+="&paxTypoList=INF",l++;return t+="&nbPassenger="+l+"&nbPax="+l},n=mptUsersettings.afEdition,t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=afEditions.map(function(n,t){return'<a href="'+e(n.value)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Air France","",null,i):printUrl(t,"Air France","",i)}function printAS(){var e=function(){var e=validatePaxcount({maxPaxcount:6,countInf:!0,childAsAdult:6,sepInfSeat:!1,childMinAge:2});if(!1===e)return printNotification("Error: Failed to validate Passengers in printAAc1"),!1;var n="https://www.alaskaair.com/planbook/shoppingstart?";n+="A="+e.adults+"&C="+e.children.length+"&FT=",1==currentItin.itin.length?n+="ow":n+="rt";for(var t=0,i=0;i<currentItin.itin.length;i++)for(var a=0;a<currentItin.itin[i].seg.length;a++){var r=currentItin.itin[i].seg[a].orig+"|"+currentItin.itin[i].seg[a].dest;r+="|"+("0"+currentItin.itin[i].seg[a].dep.month).slice(-2)+"/"+("0"+currentItin.itin[i].seg[a].dep.day).slice(-2),r+="/"+currentItin.itin[i].seg[a].dep.year,r+="|"+currentItin.itin[i].seg[a].fnr+"|",r+=currentItin.itin[i].seg[a].cabin?"f":"c",n+="&F"+ ++t+"="+encodeURIComponent(r)}return n+="&DEST="+currentItin.itin[0].seg[currentItin.itin[0].seg.length-1].dest,n+="&FARE="+currentItin.price+"&frm=cart&META=GOO_CS"}();if(!1===e)return!1;1==mptUsersettings.enableInlinemode?printUrlInline(e,"Alaska",""):printUrl(e,"Alaska","")}function printAZ(){var e=function(e){for(var n="https://www.alitalia.com/"+e+"/home-page.metasearch.json?SearchType=BrandMetasearch",t=["Economy","Economy","Business","First"],i=0,a=0;a<currentItin.itin.length;a++)for(var r=0;r<currentItin.itin[a].seg.length;r++)n+="&MetaSearchDestinations["+i+"].From="+currentItin.itin[a].seg[r].orig,n+="&MetaSearchDestinations["+i+"].To="+currentItin.itin[a].seg[r].dest,n+="&MetaSearchDestinations["+i+"].DepartureDate="+currentItin.itin[a].seg[r].dep.year+"-"+("0"+currentItin.itin[a].seg[r].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].seg[r].dep.day).slice(-2)+":"+("0"+currentItin.itin[a].seg[r].dep.time).slice(-5),n+="&MetaSearchDestinations["+i+"].ArrivalDate="+currentItin.itin[a].seg[r].arr.year+"-"+("0"+currentItin.itin[a].seg[r].arr.month).slice(-2)+"-"+("0"+currentItin.itin[a].seg[r].arr.day).slice(-2)+":"+("0"+currentItin.itin[a].seg[r].arr.time).slice(-5),n+="&MetaSearchDestinations["+i+"].Flight="+currentItin.itin[a].seg[r].fnr,n+="&MetaSearchDestinations["+i+"].code="+currentItin.itin[a].seg[r].farebase,n+="&MetaSearchDestinations["+i+"].MseType=",n+="&MetaSearchDestinations["+i+"].bookingClass="+currentItin.itin[a].seg[r].bookingclass,n+="&MetaSearchDestinations["+i+"].cabinClass="+t[currentItin.itin[a].seg[r].cabin],n+="&MetaSearchDestinations["+i+"].slices="+a,i++;var s=validatePaxcount({maxPaxcount:7,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});return!1===s?(printNotification("Error: Failed to validate Passengers in printAZ"),!1):n+="&children_number="+s.children.length+"&newborn_number="+s.infLap+"&adult_number="+s.adults},n=mptUsersettings.azEdition,t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=azEditions.map(function(n,t){return'<a href="'+e(n.value)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Alitalia","",null,i):printUrl(t,"Alitalia","",i)}function printBA(){var e=function(e,n){var t=["M","W","C","F"],i=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:16,sepInfSeat:!1,childMinAge:2});if(!1===i)return printNotification("Error: Failed to validate Passengers in printBA"),!1;var a={c:0,y:0};for(l=0;l<i.children.length;l++)i.children[l]>11?a.y++:a.c++;for(var r="https://www.britishairways.com/travel/fx/public/"+n+"_"+e+"?eId=111054&data=F"+i.adults+a.y+a.c+i.infLap+"LF",s=3,l=0;l<currentItin.itin.length;l++)for(var o=0;o<currentItin.itin[l].seg.length;o++){for(var u=0;o+u<currentItin.itin[l].seg.length-1&&!(currentItin.itin[l].seg[o+u].fnr!=currentItin.itin[l].seg[o+u+1].fnr||currentItin.itin[l].seg[o+u].layoverduration>=1440);)u++;r+=("0"+currentItin.itin[l].seg[o].dep.day).slice(-2)+("0"+currentItin.itin[l].seg[o].dep.month).slice(-2)+currentItin.itin[l].seg[o].dep.year+("0"+currentItin.itin[l].seg[o].dep.time.replace(":","")).slice(-4),r+=currentItin.itin[l].seg[o].carrier+("000"+currentItin.itin[l].seg[o].fnr).slice(-4),r+=t[currentItin.itin[l].seg[o].cabin],r+=currentItin.itin[l].seg[o].orig+currentItin.itin[l].seg[o+u].dest,2==currentItin.itin.length&&1==l?r+="F":r+="T",currentItin.itin[l].seg[o].cabin<s&&(s=currentItin.itin[l].seg[o].cabin),o+=u}return r+="&p=EUR6666.66&e=FP&c="+t["Auto"===mptSettings.cabin?s:getForcedCabin()]+"&source=FareQuoteEmail&isEmailHBOFareQuote=false"},n=e(mptUsersettings.baEdition,mptUsersettings.baLanguage);if(!1===n)return!1;var t=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';t+=baEditions.map(function(n,t){return'<a href="'+e(n.value,mptUsersettings.baLanguage)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),t+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(n,"British Airways","",null,t):printUrl(n,"British Airways","",t)}function printCZ(){var e=function(e){var n=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===n)return printNotification("Error: Failed to validate Passengers in printCZ"),!1;var t="http://global.csair.com/CZPortal/dyn/portal/doEnc?SITE=J00YJ00Y&BOOKING_FLOW=REVENUE&IS_FLEXIBLE=FALSE&LANGUAGE="+e[1]+"&PRICING_TYPE=O&COUNTRY_SITE="+e[0]+"&DISPLAY_TYPE=1",i=getAmadeusPax(n,{allowinf:1,youthage:0});return t+=i.url,t+="&NB_ADT="+i.adults,t+="&NB_INF="+i.infants,t+="&NB_CHD="+i.children,t+="&TRIP_TYPE=M",t+=getAmadeusUrl({sepcabin:0,detailed:0,allowpremium:0,inctimes:0})},n=mptUsersettings.czEdition.split("-");if(2!=n.length)return printNotification("Error:Invalid CZ-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=czEditions.map(function(n,t){return'<a href="'+e(n.value.split("-"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"China Southern","",null,i):printUrl(t,"China Southern","",i)}function printDL(){var e=function(e){var n=["MAIN","DPPS","BU","FIRST"],t=3,i=new Array,a=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===a)return printNotification("Error: Failed to validate Passengers in printDL"),!1;var r="http://"+e[0]+".delta.com/air-shopping/priceTripAction.action?tripType=multiCity";r+="¤cyCd="+("EUR"==currentItin.cur?"EUR":"USD"),r+="&exitCountry="+e[1];for(var s=0,l=0;l<currentItin.itin.length;l++)for(var o=0;o<currentItin.itin[l].seg.length;o++){switch(r+="&itinSegment["+s.toString()+"]="+l.toString()+":"+currentItin.itin[l].seg[o].bookingclass,r+=":"+currentItin.itin[l].seg[o].orig+":"+currentItin.itin[l].seg[o].dest+":"+currentItin.itin[l].seg[o].carrier+":"+currentItin.itin[l].seg[o].fnr,r+=":"+monthnumberToName(currentItin.itin[l].seg[o].dep.month)+":"+(currentItin.itin[l].seg[o].dep.day<10?"0":"")+currentItin.itin[l].seg[o].dep.day+":"+currentItin.itin[l].seg[o].dep.year+":0",i.push(currentItin.itin[l].seg[o].farebase),currentItin.itin[l].seg[o].cabin<t&&(t=currentItin.itin[l].seg[o].cabin),currentItin.itin[l].seg[o].bookingclass){case"E":n[0]="BASIC-ECONOMY";break;case"W":n[1]="DCP"}s++}return r+="&cabin="+n["Auto"===mptSettings.cabin?t:getForcedCabin()],r+="&fareBasis="+i.join(":"),r+="&numOfSegments="+s.toString()+"&paxCount="+(a.adults+a.children.length+a.infLap),r+="&vendorRedirectFlag=true&vendorID=Google"},n=mptUsersettings.dlEdition.split("_");if(2!=n.length)return printNotification("Error:Invalid Delta-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=dlEditions.map(function(n,t){return'<a href="'+e(n.value.split("_"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Delta","",null,i):printUrl(t,"Delta","",i)}function printIB(){var e=function(e,n){var t=["Economy","Economy","Business","First"],i=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===i)return printNotification("Error: Failed to validate Passengers in printIB"),!1;var a="http://www.iberia.com/web/partnerLink.do?Adult="+i.adults+"&Child="+i.children.length+"&Infant=0&InfantLap="+i.infLap+"&PointOfSaleCountry="+e[1]+"&UserCurrency="+n+"&UserLanguage="+e[0]+"&TripType=";1==currentItin.itin.length?a+="OneWay":2==currentItin.itin.length&¤tItin.itin[0].orig==currentItin.itin[1].dest&¤tItin.itin[0].dest==currentItin.itin[1].orig?a+="RoundTrip":a+="MultiCity";for(var r=0,s=1,l="",o=0;o<currentItin.itin.length;o++){for(var u=0;u<currentItin.itin[o].seg.length;u++){r++;for(var g=0;u+g<currentItin.itin[o].seg.length-1&&!(currentItin.itin[o].seg[u+g].fnr!=currentItin.itin[o].seg[u+g+1].fnr||currentItin.itin[o].seg[u+g].layoverduration>=1440);)g++;a+="&Origin"+r+"="+currentItin.itin[o].seg[u].orig,a+="&Destination"+r+"="+currentItin.itin[o].seg[u+g].dest,a+="&Carrier"+r+"="+currentItin.itin[o].seg[u].carrier,a+="&DepartureDate"+r+"="+currentItin.itin[o].seg[u].dep.year+"-"+("0"+currentItin.itin[o].seg[u].dep.month).slice(-2)+"-"+("0"+currentItin.itin[o].seg[u].dep.day).slice(-2),a+="&FlightNumber"+r+"="+currentItin.itin[o].seg[u].fnr,a+="&BookingCode"+r+"="+currentItin.itin[o].seg[u].bookingclass,a+="&Cabin"+r+"="+t[currentItin.itin[o].seg[u].cabin],l+=(""===l?"":"%2C")+r,u+=g}a+="&Slice"+s+"="+l,s++,l=""}return a},n=mptUsersettings.ibEdition.split("-"),t=e(n,mptUsersettings.ibCurrency);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=ibEditions.map(function(n,t){return'<a href="'+e(n.value.split("-"),mptUsersettings.ibCurrency)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Iberia","",null,i):printUrl(t,"Iberia","",i)}function printKL(){var e=function(e){var n="https://www.klm.com/travel/";n+=e[0]+"_"+e[1]+"/apps/ebt/ebt_home.htm?lang="+e[1].toUpperCase(),n+="&dev=5&cffcc=ECONOMY";var t=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===t)return printNotification("Error: Failed to validate Passengers in printKL"),!1;n+="&adtQty="+t.adults+"&chdQty="+t.children.length+"&infQty="+t.infLap;for(var i="",a=0;a<currentItin.itin.length;a++){n+="&c["+a+"].os="+currentItin.itin[a].orig,n+="&c["+a+"].ds="+currentItin.itin[a].dest,n+="&c["+a+"].dd="+currentItin.itin[a].dep.year+"-"+("0"+currentItin.itin[a].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].dep.day).slice(-2),a>0&&"..";for(var r=0;r<currentItin.itin[a].seg.length;r++)n+="&c["+a+"].s["+r+"].os="+currentItin.itin[a].seg[r].orig,n+="&c["+a+"].s["+r+"].ds="+currentItin.itin[a].seg[r].dest,n+="&c["+a+"].s["+r+"].dd="+currentItin.itin[a].seg[r].dep.year+"-"+("0"+currentItin.itin[a].seg[r].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].seg[r].dep.day).slice(-2),n+="&c["+a+"].s["+r+"].dt="+("0"+currentItin.itin[a].seg[r].dep.time.replace(":","")).slice(-4),n+="&c["+a+"].s["+r+"].mc="+currentItin.itin[a].seg[r].carrier,n+="&c["+a+"].s["+r+"].fn="+("000"+currentItin.itin[a].seg[r].fnr).slice(-4),r>0&&".",currentItin.itin[a].seg[r].carrier}for(a=0;a<currentItin.farebases.length;a++)a>0&&(i+=","),i+=currentItin.farebases[a];return n+="&ref=fb="+i},n=mptUsersettings.klEdition.split("_");if(2!=n.length)return printNotification("Error:Invalid KLM-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=klEditions.map(function(n,t){return'<a href="'+e(n.value.split("_"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"KLM","",null,i):printUrl(t,"KLM","",i)}function printLA(){var e=function(e){var n=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===n)return printNotification("Error: Failed to validate Passengers in printLA"),!1;for(var t='{"apikey":null,"trip":{"flights":[',i=0;i<currentItin.itin.length;i++){var a=3;t+='{"segments":[';for(var r=0;r<currentItin.itin[i].seg.length;r++){for(var s=0;r+s<currentItin.itin[i].seg.length-1&&!(currentItin.itin[i].seg[r+s].fnr!=currentItin.itin[i].seg[r+s+1].fnr||currentItin.itin[i].seg[r+s].layoverduration>=1440);)s++;t+='{"marketing_airline":"'+currentItin.itin[i].seg[r].carrier+'","flight_number":"'+currentItin.itin[i].seg[r].fnr+'","departure_date":"'+currentItin.itin[i].seg[r].dep.year.toString()+"-"+("0"+currentItin.itin[i].seg[r].dep.month.toString()).slice(-2)+"-"+("0"+currentItin.itin[i].seg[r].dep.day.toString()).slice(-2)+'","departure_airport":"'+currentItin.itin[i].seg[r].orig+'","arrival_airport":"'+currentItin.itin[i].seg[r+s].dest+'","class":"'+currentItin.itin[i].seg[r].bookingclass+'"},',currentItin.itin[i].seg[r].cabin<a&&(a=currentItin.itin[i].seg[r].cabin),r+=s}t=t.substring(0,t.length-1)+"]},"}return t="https://ssl.lan.com/cgi-bin/compra/paso3.cgi?forced_home="+e[0]+"%2F"+e[1]+"&sessionParameters="+encodeURIComponent(t.substring(0,t.length-1)+']},"passengers":{"numberAdults":'+n.adults+',"numberInfants":'+n.infLap+',"numberChildren":'+n.children.length+"}}")},n=mptUsersettings.laEdition.split("_");if(2!=n.length)return printNotification("Error:Invalid LAN-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=laEditions.map(function(n,t){return'<a href="'+e(n.value.split("_"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",desc="Create Session First",1==mptUsersettings.enableInlinemode?printUrlInline(t,"LAN",desc,null,i):printUrl(t,"LAN",desc,i)}function printLH(){var e=function(e){var n=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===n)return printNotification("Error: Failed to validate Passengers in printLH"),!1;var t="https://book.lufthansa.com/lh/dyn/air-lh/revenue/availThenFare?";t+="WDS_MSE_PRICE_CURRENCY=EUR&WDS_MSE_TOTAL_PRICE=1.00&",t+="PORTAL=LH&COUNTRY_SITE="+e[0].toUpperCase()+"&POS="+e[0].toUpperCase()+"&LANGUAGE="+e[1].toUpperCase()+"&SECURE=TRUE&SITE=LUFTLUFT&SO_SITE_LH_FRONTEND_URL=www.lufthansa.com&WDS_WR_CHANNEL=LHCOM";var i=getAmadeusPax(n,{allowinf:1,youthage:0});return t+=i.url,t+="&NB_ADT="+i.adults,t+="&NB_INF="+i.infants,t+="&NB_CHD="+i.children,t+="&TRIP_TYPE="+getAmadeusTriptype(),t+=getAmadeusUrl({sepcabin:0,detailed:0,allowpremium:1,inctimes:0})},n=mptUsersettings.lhEdition.split("-");if(2!=n.length)return printNotification("Error:Invalid Lufthansa-Edition"),!1;var t=e(n);if(!1===t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=lhEditions.map(function(n,t){return'<a href="'+e(n.value.split("-"))+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Lufthansa","",null,i):printUrl(t,"Lufthansa","",i)}function printLX(){var e=["","","/class-business","/class-first"],n=3,t=function(t){var i="https://www.swiss.com/"+t[0]+"/"+t[1]+"/Book/Combined",a=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===a)return printNotification("Error: Failed to validate Passengers in printLX"),!1;for(var r=0;r<currentItin.itin.length;r++){i+="/"+currentItin.itin[r].orig+"-"+currentItin.itin[r].dest+"/";for(var s=0;s<currentItin.itin[r].seg.length;s++){for(var l=0;s+l<currentItin.itin[r].seg.length-1&&!(currentItin.itin[r].seg[s+l].fnr!=currentItin.itin[r].seg[s+l+1].fnr||currentItin.itin[r].seg[s+l].layoverduration>=1440);)l++;i+=currentItin.itin[r].seg[s].carrier+currentItin.itin[r].seg[s].fnr+"-",currentItin.itin[r].seg[s].cabin<n&&(n=currentItin.itin[r].seg[s].cabin),s+=l}i=i.substring(0,i.length-1),i+="/"+(r>0?"to":"from")+"-"+currentItin.itin[r].dep.year+"-"+("0"+currentItin.itin[r].dep.month).slice(-2)+"-"+("0"+currentItin.itin[r].dep.day).slice(-2)}return i+="/adults-"+a.adults+"/children-"+a.children.length+"/infants-"+a.infLap,i+=e["Auto"===mptSettings.cabin?n:getForcedCabin()]},i=mptUsersettings.lxEdition.split("_");if(2!=i.length)return printNotification("Error:Invalid Swiss-Edition"),!1;var a=t(i);if(!1===a)return!1;var r=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';r+=lxEditions.map(function(e,n){return'<a href="'+t(e.value.split("_"))+'" target="_blank">'+e.name+"</a>"}).join("<br/>"),r+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(a,"Swiss","",null,r):printUrl(a,"Swiss","",r)}function printTK(){var e="https://book.eu2.amadeus.com/plnext/turkishairlines/Override.action?",n=validatePaxcount({maxPaxcount:9,countInf:!1,childAsAdult:12,sepInfSeat:!1,childMinAge:2});if(!1===n)return printNotification("Error: Failed to validate Passengers in printTK"),!1;var t=getAmadeusPax(n,{allowinf:1,youthage:0});e+="TRIP_TYPE="+getAmadeusTriptype(),e+=t.url,e+=getAmadeusUrl({sepcabin:0,detailed:0,allowpremium:1,inctimes:1}),e+="&PORT_TSC=FALSE&SO_SITE_ALLOW_SERVICE_FEE=0&SO_SITE_SERVICE_FEE_MODE=AIR&SITE=BBAHBBAH",e+="&LANGUAGE="+("tk"==mptUsersettings.language||"de"==mptUsersettings.language?mptUsersettings.language.toUpperCase():"GB"),e+="&EMBEDDED_TRANSACTION=AirComplexAvailability&TRIPFLOW=YES",e+="SO_LANG_TRIPFLOW_ENTRY_ADDRE=online.turkishairlines.com%2Finternet-booking%2Famadeus.tk&ARRANGE_BY=N&DIRECT_NON_STOP=false&REFRESH=0&SO_SITE_TAX_BREAKDOWN_DISP=TRUE&SO_LANG_DISABLE_X_XSS_PROTEC=TRUE&SO_SITE_REDIRECT_MODE=AUTOMATIC&SO_LANG_URL_AIR_NFS_SRCH=http%3A%2F%2Fonline.turkishairlines.com%2Finternet-booking%2Fstart.tk",1==mptUsersettings.enableInlinemode?printUrlInline(e,"Turkish Airlines",""):printUrl(e,"Turkish Airlines","")}function printCheapOair(){var e=["Economy","PREMIUMECONOMY","Business","First"],n="http://www.cheapoair.com/default.aspx?tabid=1832&ulang=en",t=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:12,sepInfSeat:!0,childMinAge:2});if(!1===t)return printNotification("Error: Failed to validate Passengers in printCheapOair"),!1;n+="&ad="+t.adults+"&ch="+t.children.length+"&il="+t.infLap+"&is="+t.infSeat;for(var i=0,a={},r=0;r<currentItin.itin.length;r++){a[r]="";for(var s=0;s<currentItin.itin[r].seg.length;s++)i++,a[r]&&(a[r]+=","),a[r]+=i,n+="&cbn"+i+"="+e[currentItin.itin[r].seg[s].cabin],n+="&carr"+i+"="+currentItin.itin[r].seg[s].carrier,n+="&dd"+i+"="+currentItin.itin[r].seg[s].dep.year+("0"+currentItin.itin[r].seg[s].dep.month).slice(-2)+("0"+currentItin.itin[r].seg[s].dep.day).slice(-2),n+="&og"+i+"="+currentItin.itin[r].seg[s].orig,n+="&dt"+i+"="+currentItin.itin[r].seg[s].dest,n+="&fbc"+i+"="+currentItin.itin[r].seg[s].bookingclass,n+="&fnum"+i+"="+currentItin.itin[r].seg[s].fnr;n+="&Slice"+(r+1)+"="+a[r]}1==currentItin.itin.length?n+="&tt=OneWay":2==currentItin.itin.length&¤tItin.itin[0].orig==currentItin.itin[1].dest&¤tItin.itin[0].dest==currentItin.itin[1].orig?n+="&tt=RoundTrip":n+="&tt=MultiCity",1==mptUsersettings.enableInlinemode?printUrlInline(n,"CheapOair",""):printUrl(n,"CheapOair","")}function printPriceline(){for(var e="https://www.priceline.com/m/fly/search",n="~",t=0;t<currentItin.itin.length;t++){n=n.substring(0,n.length-1)+"-",e+="/"+currentItin.itin[t].orig,e+="-"+currentItin.itin[t].dest,e+="-"+currentItin.itin[t].arr.year.toString()+("0"+currentItin.itin[t].dep.month).slice(-2)+("0"+currentItin.itin[t].dep.day).slice(-2);for(var i=0;i<currentItin.itin[t].seg.length;i++){for(var a=0;i+a<currentItin.itin[t].seg.length-1&&!(currentItin.itin[t].seg[i+a].fnr!=currentItin.itin[t].seg[i+a+1].fnr||currentItin.itin[t].seg[i+a].layoverduration>=1440);)a++;n+=currentItin.itin[t].seg[i].orig,n+=currentItin.itin[t].seg[i].dep.year.toString()+("0"+currentItin.itin[t].seg[i].dep.month).slice(-2)+("0"+currentItin.itin[t].seg[i].dep.day).slice(-2)+("0"+currentItin.itin[t].seg[i].dep.time.replace(":","")).slice(-4),n+=currentItin.itin[t].seg[i+a].dest,n+=currentItin.itin[t].seg[i+a].arr.year.toString()+("0"+currentItin.itin[t].seg[i+a].arr.month).slice(-2)+("0"+currentItin.itin[t].seg[i+a].arr.day).slice(-2)+("0"+currentItin.itin[t].seg[i+a].arr.time.replace(":","")).slice(-4),n+=currentItin.itin[t].seg[i].bookingclass+currentItin.itin[t].seg[i].carrier+currentItin.itin[t].seg[i].fnr,n+="~",i+=a}}n=n.substring(1,n.length-1);var r=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:18,sepInfSeat:!1,childMinAge:2});if(!1===r)return printNotification("Error: Failed to validate Passengers in printPriceline"),!1;e+="/desktop/details/R_"+n+"_"+(r.adults+r.children.length+r.infLap)+"_USD0.00_1-1-1?num-adults="+r.adults+"&num-children="+r.children.length+"&num-infants="+r.infLap+"&num-youths=0",1==mptUsersettings.enableInlinemode?printUrlInline(e,"Priceline",""):printUrl(e,"Priceline","")}function printEtraveli(){if(!(currentItin.itin.length>2)&&(2!=currentItin.itin.length||currentItin.itin[0].orig==currentItin.itin[1].dest&¤tItin.itin[0].dest==currentItin.itin[1].orig)){var e=function(e,n){return("0"+e.day).slice(-2)+monthnumberToName(e.month)+(n?e.year.toString().slice(-2):"")},n=function(n){var t="http://"+n+"/air/";return t+=currentItin.itin[0].orig+currentItin.itin[0].dest+e(currentItin.itin[0].dep,!1),currentItin.itin.length>1&&(t+=e(currentItin.itin[1].dep,!1)),t+="/"+currentItin.numPax,t+="?selectionKey="+currentItin.itin.map(function(n){return n.seg.map(function(n){return n.carrier+n.fnr+"-"+e(n.dep,!0)+"-"+n.bookingclass}).join("_")}).join("_")},t=n("www.seat24.de"),i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=[{name:"Seat24.se",host:"www.seat24.se"},{name:"Seat24.de",host:"www.seat24.de"},{name:"Seat24.dk",host:"www.seat24.dk"},{name:"Seat24.fi",host:"www.seat24.fi"},{name:"Seat24.no",host:"www.seat24.no"},{name:"Flygvaruhuset.se",host:"www.flygvaruhuset.se"},{name:"Travelpartner.se",host:"www.travelpartner.se"},{name:"Travelpartner.fi",host:"www.travelpartner.fi"},{name:"Travelpartner.no",host:"www.travelpartner.no"},{name:"Budjet.se",host:"www.budjet.se"},{name:"Budjet.fi",host:"www.budjet.fi"},{name:"Budjet.no",host:"www.budjet.no"},{name:"Budjet.dk",host:"www.budjet.dk"},{name:"Goleif.dk",host:"www.goleif.dk"},{name:"Travelfinder.se",host:"www.travelfinder.se"},{name:"Gotogate.no",host:"www.gotogate.no"},{name:"Gotogate.at",host:"www.gotogate.at"},{name:"Gotogate.be",host:"be.gotogate.com"},{name:"Gotogate.bg",host:"bg.gotogate.com"},{name:"Gotogate.ch",host:"www.gotogate.ch"},{name:"Gotogate.cz",host:"cz.gotogate.com"},{name:"Gotogate.es",host:"www.gotogate.es"},{name:"Gotogate.fr",host:"www.gotogate.fr"},{name:"Gotogate.gr",host:"www.gotogate.gr"},{name:"Gotogate.hu",host:"hu.gotogate.com"},{name:"Gotogate.ie",host:"ie.gotogate.com"},{name:"Gotogate.it",host:"www.gotogate.it"},{name:"Gotogate.pl",host:"www.gotogate.pl"},{name:"Gotogate.pt",host:"www.gotogate.pt"},{name:"Gotogate.ro",host:"ro.gotogate.com"},{name:"Gotogate.sk",host:"www.gotogate.sk"},{name:"Gotogate.tr",host:"tr.gotogate.com"},{name:"Gotogate.com.ua",host:"www.gotogate.com.ua"},{name:"Gotogate.co.uk",host:"www.gotogate.co.uk"},{name:"Flybillet.dk",host:"www.flybillet.dk"},{name:"Travelstart.se",host:"www.travelstart.se"},{name:"Travelstart.de",host:"www.travelstart.de"},{name:"Travelstart.dk",host:"www.travelstart.dk"},{name:"Travelstart.fi",host:"www.travelstart.fi"},{name:"Travelstart.no",host:"www.travelstart.no"},{name:"Supersaver.se",host:"www.supersavertravel.se"},{name:"Supersaver.dk",host:"www.supersaver.dk"},{name:"Supersaver.fi",host:"www.supersaver.fi"},{name:"Supersaver.nl",host:"www.supersaver.nl"},{name:"Supersaver.no",host:"www.supersaver.no"},{name:"Supersaver.ru",host:"www.supersaver.ru"}].map(function(e,t){return'<a href="'+n(e.host)+'" target="_blank">'+e.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Seat24.de","",null,i):printUrl(t,"Seat24.de","",i)}}function printHipmunk(){var e="https://www.hipmunk.com/search/flights?",n=3,t=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:18,sepInfSeat:!0,childMinAge:2});if(!1===t)return printNotification("Error: Failed to validate Passengers in printHipmunk"),!1;for(var i=0;i<currentItin.itin.length;i++){e+="&from"+i+"="+currentItin.itin[i].orig;for(var a=0;a<currentItin.itin[i].seg.length;a++){for(var r=0;a+r<currentItin.itin[i].seg.length-1&&!(currentItin.itin[i].seg[a+r].fnr!=currentItin.itin[i].seg[a+r+1].fnr||currentItin.itin[i].seg[a+r].layoverduration>=1440);)r++;e+=(a>0?"%20"+currentItin.itin[i].seg[a].orig+"%20":"%3A%3A")+currentItin.itin[i].seg[a].carrier+currentItin.itin[i].seg[a].fnr,currentItin.itin[i].seg[a].cabin<n&&(n=currentItin.itin[i].seg[a].cabin),a+=r}e+="&date"+i+"="+currentItin.itin[i].dep.year+"-"+(Number(currentItin.itin[i].dep.month)<=9?"0":"")+currentItin.itin[i].dep.month.toString()+"-"+(Number(currentItin.itin[i].dep.day)<=9?"0":"")+currentItin.itin[i].dep.day.toString(),e+="&to"+i+"="+currentItin.itin[i].dest}e+="&pax="+t.adults+"&cabin="+["Coach","Coach","Business","First"]["Auto"===mptSettings.cabin?n:getForcedCabin()]+"&infant_lap="+t.infLap+"&infant_seat="+t.infSeat+"&seniors=0&children="+t.children.length,1==mptUsersettings.enableInlinemode?printUrlInline(e,"Hipmunk",""):printUrl(e,"Hipmunk","")}function printMomondo(){var e=function(e){var n="http://www."+e+"/flightsearch/?Search=true&TripType=4",t=0;n+="&SegNo="+currentItin.itin.length;for(var i=0;i<currentItin.itin.length;i++)n+="&SO"+t+"="+currentItin.itin[i].orig,n+="&SD"+t+"="+currentItin.itin[i].dest,n+="&SDP"+t+"="+("0"+currentItin.itin[i].dep.day).slice(-2)+"-"+("0"+currentItin.itin[i].dep.month).slice(-2)+"-"+currentItin.itin[i].dep.year,t++;return n+="&AD="+currentItin.numPax+"&TK="+getMomondoCabin(currentItin.itin.cabin)},n=e("Momondo.com"),t=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';t+=[{name:"Momondo.com",host:"Momondo.com"},{name:"Momondo.de",host:"Momondo.de"},{name:"Momondo.it",host:"Momondo.it"},{name:"Momondo.es",host:"Momondo.es"},{name:"Momondo.co.uk",host:"Momondo.co.uk"},{name:"Momondo.dk",host:"Momondo.dk"},{name:"Momondo.mx",host:"Momondo.mx"},{name:"Momondo.fi",host:"Momondo.fi"},{name:"Momondo.fr",host:"Momondo.fr"},{name:"Momondo.no",host:"Momondo.no"},{name:"Momondo.nl",host:"Momondo.nl"},{name:"Momondo.pt",host:"Momondo.pt"},{name:"Momondo.se",host:"Momondo.se"},{name:"Momondo.ru",host:"Momondo.ru"}].map(function(n,t){return'<a href="'+e(n.host)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),t+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(n,"Momondo","",null,t):printUrl(n,"Momondo","",t)}function getMomondoCabin(e){switch(e){case 0:e="ECO";break;case 1:e="FLX";break;case 2:e="BIZ";break;case 3:e="FST";break;default:e="ECO"}return e}function printKayak(e){var n=function(n){for(var t="https://www."+n+"/flights",i=0,a=0;a<currentItin.itin.length;a++){1!=e&&(t+="/"+currentItin.itin[a].orig,t+="-"+currentItin.itin[a].dest,t+="/"+currentItin.itin[a].dep.year+"-"+("0"+currentItin.itin[a].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].dep.day).slice(-2),i++);for(var r=0;r<currentItin.itin[a].seg.length;r++)if(1==e){for(var s=0;r+s<currentItin.itin[a].seg.length-1&&!(currentItin.itin[a].seg[r+s].fnr!=currentItin.itin[a].seg[r+s+1].fnr||currentItin.itin[a].seg[r+s].layoverduration>=1440);)s++;t+="/"+currentItin.itin[a].seg[r].orig,t+="-"+currentItin.itin[a].seg[r+s].dest,t+="/"+currentItin.itin[a].seg[r].dep.year+"-"+("0"+currentItin.itin[a].seg[r].dep.month).slice(-2)+"-"+("0"+currentItin.itin[a].seg[r].dep.day).slice(-2),r+=s,i++}}if(currentItin.numPax>1&&(t+="/"+currentItin.numPax+"adults"),1==e)"de"==mptUsersettings.language?desc="Benutze "+i+" Segment(e)":desc="Based on "+i+" segment(s)";else{if(1==i)return!1;"de"==mptUsersettings.language?desc="Benutze "+i+" Abschnitt(e)":desc="Based on "+i+" segment(s)"}return t},t=n("Kayak.com");if(!t)return!1;var i=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';i+=[{name:"Kayak.com",host:"Kayak.com"},{name:"Kayak.de",host:"Kayak.de"},{name:"Kayak.it",host:"Kayak.it"},{name:"Kayak.es",host:"Kayak.es"},{name:"Kayak.co.uk",host:"Kayak.co.uk"},{name:"Kayak.dk",host:"Kayak.dk"},{name:"Kayak.mx",host:"Kayak.mx"},{name:"Kayak.fi",host:"Kayak.fi"},{name:"Kayak.fr",host:"Kayak.fr"},{name:"Kayak.no",host:"Kayak.no"},{name:"Kayak.nl",host:"Kayak.nl"},{name:"Kayak.pt",host:"Kayak.pt"},{name:"Kayak.se",host:"Kayak.se"},{name:"Kayak.ru",host:"Kayak.ru"}].map(function(e,t){return'<a href="'+n(e.host)+'" target="_blank">'+e.name+"</a>"}).join("<br/>"),i+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(t,"Kayak",desc,null,i):printUrl(t,"Kayak",desc,i)}function printSkyscanner(){var e=function(e){for(var n="http://www."+e+"/transport/d/",t=0;t<currentItin.itin.length;t++)n+="/"+currentItin.itin[t].orig,n+="/"+("0"+currentItin.itin[t].dep.day).slice(-2)+"-"+("0"+currentItin.itin[t].dep.month).slice(-2)+"-"+currentItin.itin[t].dep.year,n+="/"+currentItin.itin[t].dest,0;return n+="?adults="+currentItin.numPax+"&ref=day-view#results"},n=e("Skyscanner.com"),t=' <span class="pt-hover-container">[+]<span class="pt-hover-menu">';t+=[{name:"Skyscanner.com",host:"Skyscanner.com"},{name:"Skyscanner.de",host:"Skyscanner.de"},{name:"Skyscanner.it",host:"Skyscanner.it"},{name:"Skyscanner.es",host:"Skyscanner.es"},{name:"Skyscanner.co.uk",host:"Skyscanner.co.uk"},{name:"Skyscanner.dk",host:"Skyscanner.dk"},{name:"Skyscanner.mx",host:"Skyscanner.mx"},{name:"Skyscanner.fi",host:"Skyscanner.fi"},{name:"Skyscanner.fr",host:"Skyscanner.fr"},{name:"Skyscanner.no",host:"Skyscanner.no"},{name:"Skyscanner.nl",host:"Skyscanner.nl"},{name:"Skyscanner.pt",host:"Skyscanner.pt"},{name:"Skyscanner.se",host:"Skyscanner.se"},{name:"Skyscanner.ru",host:"Skyscanner.ru"}].map(function(n,t){return'<a href="'+e(n.host)+'" target="_blank">'+n.name+"</a>"}).join("<br/>"),t+="</span></span>",1==mptUsersettings.enableInlinemode?printUrlInline(n,"Skyscanner","",null,t):printUrl(n,"Skyscanner","",t)}function printFarefreaks(e){var n=new Array,t=3,i=0,a="https://www.farefreaks.com/landing/landing.php?";"de"==mptSettings.itaLanguage||"de"==mptUsersettings.language?a+="lang=de":a+="lang=en",a+="&target=flightsearch&referrer=matrix";for(var r=0;r<currentItin.itin.length;r++){1!=e&&(a+="&orig["+i+"]="+currentItin.itin[r].orig,a+="&dest["+i+"]="+currentItin.itin[r].dest,a+="&date["+i+"]="+currentItin.itin[r].dep.year.toString()+"-"+currentItin.itin[r].dep.month+"-"+currentItin.itin[r].dep.day+"_"+currentItin.itin[r].dep.time+":00",a+="&validtime["+i+"]=1",i++);for(var s=0;s<currentItin.itin[r].seg.length;s++){if(1==e){for(var l=0;s+l<currentItin.itin[r].seg.length-1&&!(currentItin.itin[r].seg[s+l].fnr!=currentItin.itin[r].seg[s+l+1].fnr||currentItin.itin[r].seg[s+l].layoverduration>=1440);)l++;a+="&orig["+i+"]="+currentItin.itin[r].seg[s].orig,a+="&dest["+i+"]="+currentItin.itin[r].seg[s+l].dest,a+="&date["+i+"]="+currentItin.itin[r].seg[s].dep.year.toString()+"-"+currentItin.itin[r].seg[s].dep.month+"-"+currentItin.itin[r].seg[s].dep.day+"_"+currentItin.itin[r].seg[s].dep.time+":00",a+="&validtime["+i+"]=1",i++,s+=l}currentItin.itin[r].seg[s].cabin<t&&(t=currentItin.itin[r].seg[s].cabin),inArray(currentItin.itin[r].seg[s].carrier,n)||n.push(currentItin.itin[r].seg[s].carrier)}}var o=validatePaxcount({maxPaxcount:9,countInf:!0,childAsAdult:18,sepInfSeat:!0,childMinAge:2});if(!1===o)return printNotification("Error: Failed to validate Passengers in printFareFreaks"),!1;for(a+="&adult="+o.adults,a+="&cabin="+("Auto"===mptSettings.cabin?t:getForcedCabin()),a+="&flexible=0",a+="&child="+(o.infLap+o.infSeat+o.children.length),r=0;r<o.infLap;r++)a+="&childage[]=0";for(r=0;r<o.infSeat;r++)a+="&childage[]=1";for(r=0;r<o.children.length;r++)a+="&childage[]="+o.children[r];if(1==e)a+="&nonstop=1","de"==mptUsersettings.language?desc="Benutze "+i+" Segment(e)":desc="Based on "+i+" segment(s)";else{if(1==i)return!1;a+="&nonstop=0","de"==mptUsersettings.language?desc="Benutze "+i+" Abschnitt(e)":desc="Based on "+i+" segment(s)"}n.length<=3&&(a+="&carrier="+n.toString()),1==mptUsersettings.enableInlinemode&&i<=6?printUrlInline(a,"Farefreaks",desc):i<=6&&printUrl(a,"Farefreaks",desc)}function printGCM(){for(var e="",n=0;n<currentItin.itin.length;n++)for(var t=0;t<currentItin.itin[n].seg.length;t++)e+=currentItin.itin[n].seg[t].orig+"-",t+1<currentItin.itin[n].seg.length?currentItin.itin[n].seg[t].dest!=currentItin.itin[n].seg[t+1].orig&&(e+=currentItin.itin[n].seg[t].dest+";"):e+=currentItin.itin[n].seg[t].dest+";";1==mptUsersettings.enableInlinemode?printImageInline("http://www.gcmap.com/map?MR=900&MX=182x182&PM=*&P="+e,"http://www.gcmap.com/mapui?P="+e):printUrl("http://www.gcmap.com/mapui?P="+e,"GCM","")}function getForcedCabin(){switch(mptSettings.cabin){case"Y":return 0;case"Y+":return 1;case"C":return 2;case"F":return 3;default:return 0}}function bindSeatguru(){for(var e=0;e<currentItin.itin.length;e++)for(var n=0;n<currentItin.itin[e].seg.length;n++){for(var t=0;n+t<currentItin.itin[e].seg.length-1&&!(currentItin.itin[e].seg[n+t].fnr!=currentItin.itin[e].seg[n+t+1].fnr||currentItin.itin[e].seg[n+t].layoverduration>=1440);)t++;var i=findItinTarget(e+1,n+1,"plane");if(!1===i)return printNotification("Error: Could not find target in bindSeatguru"),!1;var a="http://www.seatguru.com/findseatmap/findseatmap.php?carrier="+currentItin.itin[e].seg[n].carrier+"&flightno="+currentItin.itin[e].seg[n].fnr+"&date="+("0"+currentItin.itin[e].seg[n].dep.month).slice(-2)+"%2F"+("0"+currentItin.itin[e].seg[n].dep.day).slice(-2)+"%2F"+currentItin.itin[e].seg[n].dep.year+"&to=&from="+currentItin.itin[e].seg[n].orig;i.children[0].innerHTML='<a href="'+a+'" target="_blank" style="text-decoration:none;color:black">'+i.children[0].innerHTML+"</a>",n+=t}}function bindPlanefinder(){for(var e=0;e<currentItin.itin.length;e++)for(var n=0;n<currentItin.itin[e].seg.length;n++){for(var t=0;n+t<currentItin.itin[e].seg.length-1&&!(currentItin.itin[e].seg[n+t].fnr!=currentItin.itin[e].seg[n+t+1].fnr||currentItin.itin[e].seg[n+t].layoverduration>=1440);)t++;var i=findItinTarget(e+1,n+1,"flight");if(!1===i)return printNotification("Error: Could not find target in bindPlanefinder"),!1;var a="http://www.planefinder.net/data/flight/"+currentItin.itin[e].seg[n].carrier+currentItin.itin[e].seg[n].fnr;i.children[0].innerHTML='<a href="'+a+'" target="_blank" style="text-decoration:none;color:black">'+i.children[0].innerHTML+"</a>",n+=t}}function createFareFreaksContainer(){var e="<div>Itinerary";e+='<div style="display:inline-block;margin-left:20px;color: #000;font-size: smaller;" class="ff-links">',e+='<div style="display:inline-block;"><label id="ff-createroutingcodes" style="cursor:pointer;">Routing Codes</label></div>',e+='<div style="display:inline-block;margin-left:20px"><label id="ff-createflightplan" style="cursor:pointer;">Flight Manager</label></div>',e+="</div>",e+='<div style="color: #000;font-size: smaller;" class="ff-plancontainer">',e+='<div id="ff-flightplanoutput" class="invis" style="display: none;margin-top:2px"><input id="ff-flightplanlinkinput" type="text" style="width:600px"> <a id="ff-flightplanlinklink" href="" target="_blank" style="margin-left:20px">Open</a> <label id="ff-closeflightplancontainer" style="cursor:pointer;margin-left:15px">Close</label></div></td>',e+="</div>",findtarget(classSettings.resultpage.itin,1).innerHTML=e;var n=document.createElement("div");n.setAttribute("id","ff-routingcodescontainer"),n.setAttribute("class","invis"),n.setAttribute("style","display: none;border-bottom: 1px dashed grey;"),e='<div style="display:inline-block; width:85%" id="ff-routingcodesoutput"></div>',e+='<div style="display:inline-block; width:14%;text-align:center;"><label id="ff-closeroutingcodescontainer" style="cursor:pointer">Close</label></div>',n.innerHTML=e,document.getElementById("contentwrapper").parentNode.insertBefore(n,document.getElementById("contentwrapper")),document.getElementById("ff-createflightplan").onclick=function(){""==document.getElementById("ff-flightplanlinkinput").value&&(document.getElementById("ff-flightplanlinkinput").value="Loading... Please wait..",createFareFreaksPlanlink()),toggleVis(document.getElementById("ff-flightplanoutput"))},document.getElementById("ff-closeflightplancontainer").onclick=function(){toggleVis(document.getElementById("ff-flightplanoutput"))},document.getElementById("ff-createroutingcodes").onclick=function(){""==document.getElementById("ff-routingcodesoutput").innerHTML&&(document.getElementById("ff-routingcodesoutput").innerHTML="Loading... Please wait..",getFareFreaksRoutingcodes()),toggleVis(document.getElementById("ff-routingcodescontainer"))},document.getElementById("ff-closeroutingcodescontainer").onclick=function(){toggleVis(document.getElementById("ff-routingcodescontainer"))}}function getFareFreaksPlan(){function e(e){var n=Math.floor(e/60);return n+"h "+Math.floor(e-60*n)+"m"}for(var n=new Array,t=["Economy","Premium Economy","Business","First"],i=0;i<currentItin.itin.length;i++){for(var a=new Array,r=0;r<currentItin.itin[i].seg.length;r++){for(var s=new Object,l=0;r+l<currentItin.itin[i].seg.length-1&&!(currentItin.itin[i].seg[r+l].fnr!=currentItin.itin[i].seg[r+l+1].fnr||currentItin.itin[i].seg[r+l].layoverduration>=1440);)l++;if(s.aircraft=currentItin.itin[i].seg[r].aircraft.replace(/\s*\(.*?\)s*/g,""),s.airline=currentItin.itin[i].seg[r].carrier,s.arrdate=currentItin.itin[i].seg[r+l].arr.year+"-"+("0"+currentItin.itin[i].seg[r+l].arr.month).slice(-2)+"-"+("0"+currentItin.itin[i].seg[r+l].arr.day).slice(-2),s.arrtime=("00"+currentItin.itin[i].seg[r+l].arr.time).slice(-5),s.bc=currentItin.itin[i].seg[r].bookingclass,s.cabinReal=t[currentItin.itin[i].seg[r].cabin],s.cabin=currentItin.itin[i].seg[r].cabin,s.codeshare=currentItin.itin[i].seg[r].codeshare,s.depdate=currentItin.itin[i].seg[r].dep.year+"-"+("0"+currentItin.itin[i].seg[r].dep.month).slice(-2)+"-"+("0"+currentItin.itin[i].seg[r].dep.day).slice(-2),s.deptime=("00"+currentItin.itin[i].seg[r].dep.time).slice(-5),s.dest=currentItin.itin[i].seg[r+l].dest,s.orig=currentItin.itin[i].seg[r].orig,s.duration=e(currentItin.itin[i].seg[r].duration),s.farebase=currentItin.itin[i].seg[r].farebase,s.farecarrier=currentItin.itin[i].seg[r].farecarrier,s.fnr=currentItin.itin[i].seg[r].fnr,l>0){s.stops=new Array;var o=currentItin.itin[i].seg[r].duration}for(var u=0;u<l;u++){var g=new Object;g.apt=currentItin.itin[i].seg[r+u].dest,g.arrdate=currentItin.itin[i].seg[r+u].arr.year+"-"+("0"+currentItin.itin[i].seg[r+u].arr.month).slice(-2)+"-"+("0"+currentItin.itin[i].seg[r+u].arr.day).slice(-2),g.arrtime=("00"+currentItin.itin[i].seg[r+u].arr.time).slice(-5),g.depdate=currentItin.itin[i].seg[r+u+1].dep.year+"-"+("0"+currentItin.itin[i].seg[r+u+1].dep.month).slice(-2)+"-"+("0"+currentItin.itin[i].seg[r+u+1].dep.day).slice(-2),g.deptime=("00"+currentItin.itin[i].seg[r+u+1].dep.time).slice(-5),g.duration=e(currentItin.itin[i].seg[r+u].layoverduration),o+=currentItin.itin[i].seg[r+u].layoverduration,o+=currentItin.itin[i].seg[r+u+1].duration,s.stops.push(g)}l>0&&(s.duration=e(o)),r+=l,a.push(s)}n.push({segs:a})}return n}function getFareFreaksRoutingcodes(){var e={mode:"post",headers:[{name:"Accept",val:"application/json;charset=UTF-8"},{name:"Content-Type",val:"application/x-www-form-urlencoded"}]};e.data="data="+JSON.stringify({action:"creatematrix",plan:getFareFreaksPlan(),type:"matrix",mci_autofocus:1,mci_bcfromfare:1,mci_carriersleg:1,mci_carriersseg:1,mci_fnr:1,mci_inclbc:1,mci_inclcontime:1,mci_inclfare:1}),doHttpRequest("https://www.farefreaks.com/flightmanager/ajax/planhandler.php",e,function(e){var n=!1;if("undefined"==typeof JSON)return printNotification("Error: Failed saving plan - Browser not supporting JSON"),!1;try{n=JSON.parse(e.responseText)}catch(e){n=!1}if("object"!=typeof n)return printNotification("Error: Failed getting routing codes"),!1;if(void 0===n.success||void 0===n.type||void 0===n.data)return printNotification("Error: routing codes data format"),!1;if("1"!==n.success)return printNotification("Error: "+n.error+" while retrieving routing codes"),!1;for(var t=document.createElement("div"),i=0;i<n.data.length;i++){var a=document.createElement("input");a.setAttribute("type","text"),a.setAttribute("style","width:100%;margin: 2px"),a.setAttribute("value",n.data[i]),t.appendChild(a)}document.getElementById("ff-routingcodesoutput").innerHTML="",document.getElementById("ff-routingcodesoutput").appendChild(t)})}function createFareFreaksPlanlink(){var e={mode:"post",headers:[{name:"Accept",val:"application/json;charset=UTF-8"},{name:"Content-Type",val:"application/x-www-form-urlencoded"}]};e.data="data="+JSON.stringify({action:"createplan",plan:getFareFreaksPlan(),type:"matrix"}),doHttpRequest("https://www.farefreaks.com/flightmanager/ajax/planhandler.php",e,function(e){var n=!1;if("undefined"==typeof JSON)return printNotification("Error: Failed saving plan - Browser not supporting JSON"),!1;try{n=JSON.parse(e.responseText)}catch(e){n=!1}return"object"!=typeof n?(printNotification("Error: Failed saving plan"),!1):void 0===n.success||void 0===n.id||void 0===n.url?(printNotification("Error: wrong plan data format"),!1):"1"!==n.success?(printNotification("Error: "+n.error+" while retrieving flight plan"),!1):(document.getElementById("ff-flightplanlinkinput").value=n.url,void(document.getElementById("ff-flightplanlinklink").href=n.url))})}function resolveTimezones(){var e={};document.getElementById("timezone-container").style.display="inline",e.mode="post",e.headers=[{name:"Accept",val:"application/json;charset=UTF-8"},{name:"Content-Type",val:"application/x-www-form-urlencoded"}],e.data="data="+JSON.stringify({action:"resolvetimezones",plan:getTimezoneData("small"),type:"matrix"}),doHttpRequest("https://www.farefreaks.com/ajax/timezone.php",e,function(e){var n=!1;if(document.getElementById("timezone-container").style.display="none","undefined"==typeof JSON)return printNotification("Error: Failed retrieving timezones - Browser not supporting JSON"),!1;try{n=JSON.parse(e.responseText)}catch(e){n=!1}if("object"!=typeof n)return printNotification("Error: Failed retrieving timezones"),!1;if(void 0===n.success||void 0===n.data)return printNotification("Error: Failed retrieving timezones - wrong plan data format"),!1;if("1"!==n.success)return printNotification("Error: "+n.error+" while retrieving timezone data"),!1;for(var t=0;t<currentItin.itin.length;t++){currentItin.itin[t].dep.offset=n.data[t][0].depoffset;for(var i=0;i<currentItin.itin[t].seg.length;i++){if(null===n.data[t][i].depoffset.match(/^([\+\-]{1}[0-9]{2}:[0-9]{2})$/))return printNotification("Error: Failed retrieving timezones - invalid response"),!1;if(currentItin.itin[t].seg[i].dep.offset=n.data[t][i].depoffset,void 0!==n.data[t][i].arroffset){if(null===n.data[t][i].arroffset.match(/^([\+\-]{1}[0-9]{2}:[0-9]{2})$/))return printNotification("Error: Failed retrieving timezones - invalid response"),!1;currentItin.itin[t].seg[i].arr.offset=n.data[t][i].arroffset}}void 0!==n.data[t][i-1].arroffset&&(currentItin.itin[t].arr.offset=n.data[t][i-1].arroffset)}printLinksContainer()})}function printTimezones(){var e,n='<span id="timezone-container" style="display: none;"> <img src="data:image/gif;base64,R0lGODlhIAAgAMQAAKurq/Hx8f39/e3t7enp6Xh4eOHh4d3d3eXl5dXV1Wtra5GRkYqKitHR0bm5ucnJydnZ2bS0tKGhofb29sHBwZmZmZWVlbGxsb29vcXFxfr6+s3NzZ2dnaampmZmZv///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgAAACwAAAAAIAAgAAAF/+AnjiR5ecxQrmwrnp6CuTSpHRRQeDyq1qxJA7Ao7noxhwBIMkSK0CMSRVgCEx1odMpjEDRWV0Ji0RqnCodGM5mEV4aOpVy0RBodpHf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BYcv9MkGuXmCLIBAJ0WEgTv8AgH5gZQpFpQgR0CfiX8HfiHQkOEChArHEAoQoOBAxD+ydJAISKHDZneBYBAEoKBZ28iuwJI9s5AgpcJ9okgAKACB4gJEAaA+TLAiAkUOHCQUEHfuwkQGihtcCCcAAIShkqwcEGLlAkJHmzYoFSaiwdFJXSQECEmyx4EHlB4wPbBgZAxIkiVIAEABabkECR1YCMD2wQ+YQxwMLaD4Q4XIkSgEAHD4hoZMmzw2oYABbEdAGgGcCGxAwcYMNTYEBhMgAYRMmvurPgz3ww7KCLY4CAx5wgXMDh4EJOiiBUDDijV2iABNpa+K/o4hQKuixAAOw==" style="width: 1em; height: 1em;"></span>';1==mptUsersettings.enableInlinemode?(printUrlInline("javascript: void(0);","Resolve Timezones","",1,n),e=getSidebarContainer(1)):(printUrl("javascript: void(0);","Resolve Timezones","",n),e=document.getElementById("powertoolslinkcontainer"));var t=e.getElementsByTagName("a")[0];t.innerHTML="Resolve Timezones",t.target="_self",t.style="color:black"}function getTimezoneData(e){for(var n=new Array,t=0;t<currentItin.itin.length;t++){for(var i=new Array,a=0;a<currentItin.itin[t].seg.length;a++){var r=new Object;r.orig=currentItin.itin[t].seg[a].orig,r.depdatetime=currentItin.itin[t].seg[a].dep.year+"-"+("0"+currentItin.itin[t].seg[a].dep.month).slice(-2)+"-"+("0"+currentItin.itin[t].seg[a].dep.day).slice(-2)+"T"+("00"+currentItin.itin[t].seg[a].dep.time).slice(-5),"full"===e&&(r.dest=currentItin.itin[t].seg[a].dest,r.arrdatetime=currentItin.itin[t].seg[a].arr.year+"-"+("0"+currentItin.itin[t].seg[a].arr.month).slice(-2)+"-"+("0"+currentItin.itin[t].seg[a].arr.day).slice(-2)+"T"+("00"+currentItin.itin[t].seg[a].arr.time).slice(-5)),i.push(r)}n.push({segs:i})}return n}function openWheretocredit(e){var n=document.getElementById("wheretocredit-container");n.style.display="inline";for(var t={ticketingCarrier:1==currentItin.carriers.length?currentItin.carriers[0]:null,baseFareUSD:currentItin.basefares+currentItin.surcharges,segments:[]},i=0;i<currentItin.itin.length;i++)for(var a=0;a<currentItin.itin[i].seg.length;a++)t.segments.push({origin:currentItin.itin[i].seg[a].orig,destination:currentItin.itin[i].seg[a].dest,departure:new Date(currentItin.itin[i].seg[a].dep.year,currentItin.itin[i].seg[a].dep.month,currentItin.itin[i].seg[a].dep.day),carrier:currentItin.itin[i].seg[a].carrier,bookingClass:currentItin.itin[i].seg[a].bookingclass,codeshare:currentItin.itin[i].seg[a].codeshare,flightNumber:currentItin.itin[i].seg[a].fnr});var r=new XMLHttpRequest;r.open("POST","//www.wheretocredit.com/api/beta/calculate"),r.setRequestHeader("Accept","application/json;charset=UTF-8"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.onreadystatechange=function(){if(4===r.readyState){var t,i,a;e.href="//www.wheretocredit.com",e.target="_blank",e.innerHTML="Data provided by wheretocredit.com";try{t=JSON.parse(r.responseText)}catch(e){t=r.responseText}if(200===r.status&&t&&t.success&&t.value&&t.value.length&&t.value[0].success){t.value[0].value.totals.sort(function(e,n){return e.value===n.value?+(e.name>n.name)||+(e.name===n.name)-1:n.value-e.value}),i=document.createElement("div"),a=t.value[0].value.totals.map(function(e,n){return parseInt(e.value).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" "+e.name+" miles"});for(var s=0;s<a.length;s++)i.appendChild(document.createTextNode(a[s])),i.appendChild(document.createElement("br"));i.removeChild(i.lastChild)}else i=t.errorMessage||t||"API quota exceeded :-/",i=document.createTextNode(i);n.style.display="block",n.innerHTML="",n.appendChild(i)}},r.send(JSON.stringify([t]))}function printWheretocredit(){var e,n='<span id="wheretocredit-container" style="display: none;"> <img src="data:image/gif;base64,R0lGODlhIAAgAMQAAKurq/Hx8f39/e3t7enp6Xh4eOHh4d3d3eXl5dXV1Wtra5GRkYqKitHR0bm5ucnJydnZ2bS0tKGhofb29sHBwZmZmZWVlbGxsb29vcXFxfr6+s3NzZ2dnaampmZmZv///yH/C05FVFNDQ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5WBWsqdRN4A4goLhMXDAsLRGQdLiuGiJdsIw2PC35wSRBtE5cEBAGZEwCOjxEQHQoFGlIBBAOlA7IiBxWcFgYfBgsAYAK2pQSKHw8WnBcmAg8DYB8BCNYGA88OFswWDSO5YBMECAYGBLKM3BYcv9MkGuXmCLIBAJ0WEgTv8AgH5gZQpFpQgR0CfiX8HfiHQkOEChArHEAoQoOBAxD+ydJAISKHDZneBYBAEoKBZ28iuwJI9s5AgpcJ9okgAKACB4gJEAaA+TLAiAkUOHCQUEHfuwkQGihtcCCcAAIShkqwcEGLlAkJHmzYoFSaiwdFJXSQECEmyx4EHlB4wPbBgZAxIkiVIAEABabkECR1YCMD2wQ+YQxwMLaD4Q4XIkSgEAHD4hoZMmzw2oYABbEdAGgGcCGxAwcYMNTYEBhMgAYRMmvurPgz3ww7KCLY4CAx5wgXMDh4EJOiiBUDDijV2iABNpa+K/o4hQKuixAAOw==" style="width: 1em; height: 1em;"></span>';1==mptUsersettings.enableInlinemode?(printUrlInline("javascript: void(0);","wheretocredit.com","",1,n),e=getSidebarContainer(1)):(printUrl("javascript: void(0);","wheretocredit.com","",n),e=document.getElementById("powertoolslinkcontainer"));var t=e.getElementsByTagName("a"),i=t[t.length-1];i.target="_self",i.innerHTML="Calculate miles with wheretocredit.com"}function bindWheretocredit(){for(var e=0;e<currentItin.itin.length;e++)for(var n=0;n<currentItin.itin[e].seg.length;n++){var t=findItinTarget(e+1,n+1,"cabin");if(!1===t)return printNotification("Error: Could not find target in bindWheretocredit"),!1;var i="http://www.wheretocredit.com/"+currentItin.itin[e].seg[n].carrier.toLowerCase()+"/"+currentItin.itin[e].seg[n].bookingclass.toLowerCase();t.children[0].innerHTML=t.children[0].innerHTML.replace(/<a.*?\/a>/,"("+currentItin.itin[e].seg[n].bookingclass+")").replace("("+currentItin.itin[e].seg[n].bookingclass+")",'<a href="'+i+'" target="_blank" style="text-decoration:none;color:black">('+currentItin.itin[e].seg[n].bookingclass+")</a>")}}function bindLinkClicks(){var e=0,n=(1==mptUsersettings.enableInlinemode?getSidebarContainer(1):document.getElementById("powertoolslinkcontainer")).getElementsByTagName("a");void 0===currentItin.itin[0].dep.offset&&(n[e].onclick=function(){resolveTimezones()},e++),1!=mptUsersettings.enableInlinemode&&(e=n.length-1),n[e].onclick=function(){n[e].onclick=null,openWheretocredit(n[e])}}function printUrlInline(e,n,t,i,a){var r='<a href="'+e+'" target="_blank">',s=!1;void 0!==translations[mptUsersettings.language]&&void 0!==translations[mptUsersettings.language].openwith&&(r+=translations[mptUsersettings.language].openwith,s=!0),r+=!1===s?"Open with":"",printItemInline(r+=" "+n+"</a>"+(a||""),t,i)}function printItemInline(e,n,t){div=getSidebarContainer(t),div.innerHTML=div.innerHTML+'<li class="powertoolsitem">'+e+(n?"<br/><small>("+n+")</small>":"")+"</li>"}function printImageInline(e,n,t){if(div=getSidebarContainer(t).parentNode,1==mptUsersettings.enableIMGautoload)div.innerHTML=div.innerHTML+(n?'<a href="'+n+'" target="_blank" class="powertoolsitem">':"")+'<img src="'+e+'" style="margin-top:10px;"'+(n?"":' class="powertoolsitem"')+"/>"+(n?"</a>":"");else{var i=Math.random();div.innerHTML=div.innerHTML+'<div id="'+i+'" class="powertoolsitem" style="width:184px;height:100px;background-color:white;cursor:pointer;text-align:center;margin-top:10px;padding-top:84px;"><span>Click</span></div>',document.getElementById(i).onclick=function(){var t=document.createElement("div");t.setAttribute("class","powertoolsitem"),t.innerHTML=(n?'<a href="'+n+'" target="_blank">':"")+'<img src="'+e+'" style="margin-top:10px;"'+(n?"":' class="powertoolsitem"')+"/>"+(n?"</a>":""),document.getElementById(i).parentNode.replaceChild(t,document.getElementById(i))}}}function getSidebarContainer(e){return(!e||e>=4?document.getElementById("powertoolslinkinlinecontainer"):findtarget(classSettings.resultpage.mcHeader,e).nextElementSibling)||createUrlContainerInline()}function createUrlContainerInline(){var e=document.createElement("div");return e.setAttribute("class",classSettings.resultpage.mcDiv),e.innerHTML='<div class="'+classSettings.resultpage.mcHeader+'">Powertools</div><ul id="powertoolslinkinlinecontainer" class="'+classSettings.resultpage.mcLinkList+'"></ul>',findtarget(classSettings.resultpage.mcDiv,1).parentNode.appendChild(e),document.getElementById("powertoolslinkinlinecontainer")}function printUrl(e,n,t,i){void 0==document.getElementById("powertoolslinkcontainer")&&createUrlContainer();var a='<div style="margin:5px 0px 10px 0px"><label style="font-size:'+Number(mptUsersettings.linkFontsize)+'%;font-weight:600"><a href="'+e+'" target=_blank>',r=!1;void 0!==translations[mptUsersettings.language]&&void 0!==translations[mptUsersettings.language].use&&(a+=translations[mptUsersettings.language].use,r=!0),a+=!1===r?"Use ":"",a+=" "+n+"</a></label>"+(i||"")+(t?'<br><label style="font-size:'+(Number(mptUsersettings.linkFontsize)-15)+'%">('+t+")</label>":"")+"</div>";var s=document.getElementById("powertoolslinkcontainer");s.innerHTML=s.innerHTML+a}function createUrlContainer(){var e=document.createElement("div");e.setAttribute("id","powertoolslinkcontainer"),e.setAttribute("style","margin:15px 0px 0px 10px"),findtarget(classSettings.resultpage.htbContainer,1).parentNode.parentNode.parentNode.appendChild(e)}function printSeperator(){var e=document.getElementById("powertoolslinkcontainer")||getSidebarContainer();e&&(e.innerHTML=e.innerHTML+(mptUsersettings.enableInlinemode?'<hr class="powertoolsitem"/>':"<hr/>"))}function injectCss(){var e="",n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",e+=".pt-hover-menu { position:absolute; padding: 8px; background-color: #FFF; border: 1px solid #808080; display:none; }",e+=".pt-hover-container:hover .pt-hover-menu { display:inline; }",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),n.appendChild(t)}0===mptSettings.scriptEngine&&window.top===window.self?startScript():window.top===window.self&&(void 0!==window.addEventListener?window.addEventListener("load",startScript(),!1):void 0!==window.attachEvent?window.attachEvent("onload",startScript()):window.onload=startScript());