var countries=[["AF","Afghanistan"],["AL","Albania"],["DZ","Algeria"],["AD","Andorra"],["AO","Angola"],["AI","Anguilla"],["AG","Antigua and Barbuda"],["AR","Argentina"],["AM","Armenia"],["AW","Aruba"],["AU","Australia"],["AT","Austria"],["AZ","Azerbaijan"],["BS","Bahamas"],["BH","Bahrain"],["BD","Bangladesh"],["BB","Barbados"],["BY","Belarus"],["BE","Belgium"],["BZ","Belize"],["BJ","Benin(Rep.)"],["BM","Bermuda"],["BT","Bhutan"],["BO","Bolivia"],["BQ","Bonaire, Saint Eustatius and Saba"],["BA","Bosnia and Herzegovina"],["BW","Botswana"],["BR","Brazil"],["BN","Brunei Darussalam"],["BG","Bulgaria"],["BF","Burkina Faso"],["BI","Burundi"],["KH","Cambodia"],["CM","Cameroon"],["CA","Canada"],["CV","Cape Verde Islands"],["KY","Cayman Islands"],["CF","Central African Rep."],["TD","Chad"],["CL","Chile"],["CN","China(Peoples Rep.)"],["CO","Colombia"],["KM","Comores Islands"],["CG","Congo(Brazzaville)"],["CD","Congo(Kinshasa)"],["CK","Cook Islands"],["CR","Costa Rica"],["CI","Cote d Ivoire"],["HR","Croatia"],["CU","Cuba"],["CW","Curacao"],["CY","Cyprus"],["CZ","Czech Rep."],["DK","Denmark"],["DJ","Djibouti"],["DM","Dominica"],["DO","Dominican Rep."],["EC","Ecuador"],["EG","Egypt"],["SV","El Salvador"],["GQ","Equatorial Guinea"],["ER","Eritrea"],["EE","Estonia"],["ET","Ethiopia"],["FK","Falkland Islands"],["FO","Faroe Islands"],["FJ","Fiji"],["FI","Finland"],["FR","France"],["GF","French Guiana"],["PF","French Polynesia"],["GP","French West Indies"],["MK","Fyrom"],["GA","Gabon"],["GM","Gambia"],["GE","Georgia"],["DE","Germany"],["GH","Ghana"],["GI","Gibraltar"],["GR","Greece"],["GL","Greenland"],["GD","Grenada"],["GU","Guam"],["GT","Guatemala"],["GN","Guinea"],["GW","Guinea-Bissau"],["GY","Guyana"],["HT","Haiti"],["HN","Honduras"],["HK","Hong Kong (SAR), China"],["HU","Hungary"],["IS","Iceland"],["IN","India"],["ID","Indonesia"],["IR","Iran"],["IQ","Iraq"],["IE","Ireland (Rep. of)"],["IL","Israel"],["IT","Italy"],["JM","Jamaica"],["JP","Japan"],["JO","Jordan"],["KZ","Kazakhstan"],["KE","Kenya"],["KI","Kiribati"],["KP","Korea (Peoples Rep.), North "],["KR","Korea (Rep. of), South"],["KW","Kuwait"],["KG","Kyrgyzstan"],["LA","Lao People's Dem. Rep."],["LV","Latvia"],["LB","Lebanon"],["LS","Lesotho"],["LR","Liberia"],["LY","Libya"],["LI","Liechtenstein"],["LT","Lithuania"],["LU","Luxembourg"],["MO","Macao (SAR), China"],["MG","Madagascar"],["MW","Malawi"],["MY","Malaysia"],["MV","Maldives"],["ML","Mali"],["MT","Malta"],["MH","Marshall Islands"],["MR","Mauritania"],["MU","Mauritius"],["YT","Mayotte"],["MX","Mexico"],["FM","Micronesia"],["MD","Moldova"],["MC","Monaco"],["MN","Mongolia"],["ME","Montenegro"],["MS","Montserrat"],["MA","Morocco"],["MZ","Mozambique"],["MM","Myanmar"],["NA","Namibia"],["NR","Nauru"],["NP","Nepal"],["NL","Netherlands"],["NC","New Caledonia"],["NZ","New Zealand"],["NI","Nicaragua"],["NE","Niger"],["NG","Nigeria"],["NU","Niue"],["NF","Norfolk Island"],["MP","Northern Mariana Isl."],["NO","Norway"],["OM","Oman"],["PK","Pakistan"],["PW","Palau Islands"],["PA","Panama"],["PG","Papua New Guinea"],["PY","Paraguay"],["PE","Peru"],["PH","Philippines"],["PL","Poland"],["PT","Portugal"],["PR","Puerto Rico"],["QA","Qatar"],["RE","Reunion"],["RO","Romania"],["RU","Russian Federation"],["RW","Rwanda"],["AS","Samoa(American)"],["WS","Samoa"],["SM","San Marino"],["ST","Sao Tome & Principe"],["SA","Saudi Arabia"],["SN","Senegal"],["RS","Serbia"],["SC","Seychelles"],["SL","Sierra Leone"],["SG","Singapore"],["SK","Slovakia"],["SI","Slovenia"],["SB","Solomon Islands"],["SO","Somalia"],["ZA","South Africa"],["SS","South Sudan"],["ES","Spain"],["LK","Sri Lanka"],["KN","St.Kitts-Nevis"],["LC","St.Lucia"],["SX","St. Maarten"],["VC","St.Vincent & Grenadines"],["SD","Sudan"],["SR","Suriname"],["SZ","Swaziland"],["SE","Sweden"],["CH","Switzerland"],["SY","Syria"],["TW","Taiwan"],["TJ","Tajikistan"],["TZ","Tanzania"],["TH","Thailand"],["TL","Timor-Leste"],["TG","Togo"],["TO","Tonga"],["TT","Trinidad & Tobago"],["TN","Tunisia"],["TR","Turkey"],["TM","Turkmenistan"],["TC","Turks & Caicos Isl."],["TV","Tuvalu"],["US","USA"],["UG","Uganda"],["UA","Ukraine"],["AE","United Arab Emirates"],["GB","United Kingdom"],["UY","Uruguay"],["UZ","Uzbekistan"],["VU","Vanuatu"],["VA","Vatican City"],["VE","Venezuela"],["VN","Vietnam"],["VI","Virgin Islands (U.S.A.)"],["VG","Virgin Islands (British)"],["YE","Yemen"],["ZM","Zambia"],["ZW","Zimbabwe"]];var nationalities=[["00","Select country"]].concat(countries);var alienResidence=[["00","Select, if applicable"]].concat(countries);var departureCountry=[["00","Select country"]].concat(countries);var destinationCountries=[["00","Select country"]].concat(countries);var emChanged=false;var popupWindow=null;function submitVH(){f=document.vhForm;if(isValid(f)){loc="http://www.timaticweb.com/cgi-bin/tim_website_client.cgi?SpecData=1&HEALTH=VISA=&page=both";loc+="&NA="+f.NA.options[f.NA.selectedIndex].value+"&AR="+f.AR.options[f.AR.selectedIndex].value+"&EM="+f.EM.options[f.EM.selectedIndex].value;loc+=f.hdnDest.value+f.hdnTrans.value+f.hdnVisi.value+"&user=QF&subuser=QANTAS";if(popupWindow!=null){popupWindow.close()}popupWindow=window.open(loc,null,"width=660,height=500,resizable=yes,scrollbars=yes");popupWindow.focus()}}function isValid(a){if(a.NA.selectedIndex==-1||a.NA.selectedIndex==0){alert("Please select your Nationality");return false}if(a.NA.selectedIndex==a.AR.selectedIndex){alert('"Nationality" and "Alien Resident of" cannot be the same country');return false}if(a.EM.selectedIndex==-1||a.EM.selectedIndex==0){alert("Please select your Departure country");return false}if(a.DE.selectedIndex==-1&&a.TR.selectedIndex==-1){alert("Please select at least one Departure or Transit country");return false}return true}function clearForm(){f=document.vhForm;f.NA.selectedIndex=11;f.AR.selectedIndex=0;f.EM.selectedIndex=11;f.DE.selectedIndex=-1;f.TR.selectedIndex=-1;f.VT.selectedIndex=-1;setTypeVar()}function seeList(code,sel,hdn){f=document.vhForm;fl=eval("f."+code);errDE="A maximum of 10 destination countries may be selected";errTR="A maximum of 10 transit countries may be selected";errVT="A maximum of 10 recently visited countries may be selected";result="";hdnVal="&"+code+"=00";numSel=0;for(i=0;i<fl.length&&numSel<=10;i++){if(fl.options[i].selected){numSel++;if(numSel==1){result=fl.options[i].text;hdnVal="&"+fl.name+"="+fl.options[i].value}else{if(numSel>10){alert(eval("err"+code));result="";hdnVal="&"+code+"=00";fl.selectedIndex=null;fl.options[0].selected=false}else{result+="\n"+fl.options[i].text;hdnVal+="&"+fl.name+"="+fl.options[i].value}}}}eval("f."+sel+".value=result");eval("f."+hdn+".value=hdnVal")}function setTypeVar(){seeList("DE","selDest","hdnDest");seeList("TR","selTrans","hdnTrans");seeList("VT","selVisi","hdnVisi");setEmbarkation()}function setEmbarkation(){if(!emChanged){f.EM.selectedIndex=f.NA.selectedIndex}}function setEmChanged(){emChanged=true};
