function City(cityname,numbers){ this.cityname = cityname; this.numbers = numbers; } function Country(countryname, numbers, local, isocode, cities){ this.countryname = countryname; this.numbers = numbers; this.local = local; this.isocode = isocode; this.cities = cities; } var CtrData = new Array(); CtrData.push(new Country("Argentina",new Array("01152388186 ","01152465959 ","01152465958 ","01152391353 "),"1","32",new Array(0))); CtrData.push(new Country("Australia",new Array("0871232364 ","0390011041 ","0290378475 ","0290378474 ","0390015793 "),"1","36",new Array(0))); CtrData.push(new Country("Austria",new Array("012323204 ","012323207 ","012323208 ","012323205 ","012323206 ","012323289 ","012323280 ","012323281 ","012323282 ","012323283 ","012323284 ","012323285 ","012323286 ","012323287 ","012323288 ","012323800 "),"1","40",new Array(0))); CtrData.push(new Country("Belgium",new Array("028080281 ","022901890 ","022901891 ","022901892 ","022901893 ","022901894 ","022901895 ","022901896 ","022901897 ","022901898 "),"1","56",new Array(0))); CtrData.push(new Country("Brazil",new Array("01133015426 ","06137175145 ","06137175144 ","02130020480 "),"1","76",new Array(0))); CtrData.push(new Country("Canada",new Array(),"1","124",new Array(0,new City("Alberta",new Array("4037756654 ")),new City("British Columbia",new Array("6044841960 ")),new City("Manitoba",new Array("2044809844 ")),new City("Ontario",new Array("4168000270 ","6134820907 ","6477245249 ")),new City("Quebec",new Array("5146673586 ","5149073186 ","5149075888"))))); CtrData.push(new Country("Croatia",new Array("017776167"),"1","191",new Array(0))); CtrData.push(new Country("Denmark",new Array("32713070 ","32713075 ","32713071 ","32713072 ","32713073 ","32713077 ","32713076 "),"1","208",new Array(0))); CtrData.push(new Country("Finland",new Array("0942599126 ","0942599129 ","0942599128 ","0942599127 ","0942419278 "),"1","246",new Array(0))); CtrData.push(new Country("France",new Array("0170818770 ","0170909670 ","0170909595 ","0170909550 ","0170909535 ","0170818081 ","0170818108 ","0170818180 ","0170818181 ","0170818202 ","0170818280 ","0170818400 ","0170818606 ","0170818668 ","0170818688 ","0170819920 "),"1","250",new Array(0))); CtrData.push(new Country("Germany",new Array(),"1","276",new Array(0,new City("Berlin",new Array("03031190303 ","03031190404 ")),new City("Hamburg",new Array("04040109090 ","04040109010 ")),new City("München",new Array("08942107421 ","08942107107 "))))); CtrData.push(new Country("Hungary",new Array("019994938 ","019990373 ","019990372 ","019990371 "),"1","348",new Array(0))); CtrData.push(new Country("Ireland",new Array("016850123 ","016850101 ","016850202 ","016850303 ","016850404 ","014829010 ","014829020 ","014829030 ","014829040 ","014829050 ","014829060 ","014829070 ","014829080 ","014829009 ","014829002 ","014829200 "),"1","372",new Array(0))); CtrData.push(new Country("Italy",new Array("0699268062 ","0232164453 ","0232164454 ","0232164452 ","0232164456 "),"1","380",new Array(0))); CtrData.push(new Country("Japan",new Array("0345801683 ","0345801686 ","0345801685 ","0345801684 "),"1","392",new Array(0))); CtrData.push(new Country("Mexico",new Array("05511638862 ","05546240198 ","05546240197 ","05511689852 "),"1","484",new Array(0))); CtrData.push(new Country("Netherlands",new Array(),"1","528",new Array(0,new City("Amsterdam",new Array("0202222020 ","0202223939 ")),new City("Eindhoven",new Array("0408413030 ","0408412020 ")),new City("Rotterdam",new Array("0107448686 ","0107448888 ","0107448383 ","0107448484 ","0107448585 ","0107448787 ","0107440500 ","0107440700 ","0107440800 ","0107440900 ","0107440990 ","0107442121 ","0107442515 ","0107442600 ","0107443200 ","0107442606 ","0107447070 ")),new City("Utrecht",new Array("0306552020 ","0306553030 "))))); CtrData.push(new Country("Norway",new Array("21548227 ","21554618 ","21554617 ","21554602 ","21547855"),"1","578",new Array(0))); CtrData.push(new Country("Peru",new Array("017085369"),"1","604",new Array(0))); CtrData.push(new Country("Romania",new Array("0318107937 ","0318107957 ","0318107956 ","0318107942 "),"1","642",new Array(0))); CtrData.push(new Country("Spain",new Array("911322525 ","911322626 ","911322727 ","911322828 ","911322929 ","911320020 ","911320030 ","911320040 ","911320050 ","911320060 ","911320070 ","911320080 ","911320090 ","911329090 ","911328008 ","911320233 "),"1","724",new Array(0))); CtrData.push(new Country("Sweden",new Array("0852507092 ","0852500600 "),"1","752",new Array(0))); CtrData.push(new Country("Switzerland",new Array("0435269901 ","0435269191 ","0435269292 ","0435269393 ","0435269494 ","0315260060 ","0315260065 ","0315260100 ","0315261106 ","0315261160 ","0315262006 ","0315263006 ","0315263020 ","0315267060 ","0315267097 ","0415260026 "),"1","756",new Array(0))); CtrData.push(new Country("United Kingdom",new Array("02081802020 ","02081802727 ","02081807979 ","02081809293 "),"1","826",new Array(0,new City("Glasgow",new Array("01418882020 ","01418883030 ")),new City("Manchester",new Array("01617002525 ","01617002626 ","01617002727 ","01617002828 ")),new City("Nottingham",new Array("01158180030 ","01158180050 ","01158180060 ","01158180070 ","01158180080 ","01158180202 ","01158180220 ","01158180480 ","01158180500 ","01158180550 "))))); CtrData.push(new Country("United States",new Array("6466520455 ","6462894296 "),"1","840",new Array(0))); function changeCountry(i) { if (i==undefined) { i = document.getElementById("selectedCountry").selectedIndex; } document.getElementById("display_country").innerHTML = CtrData[i].countryname; if (CtrData[i].cities.length>0) { document.getElementById("display_country_nr").innerHTML=''; document.getElementById("display_country_local").innerHTML=''; document.getElementById("selectedCity").options.length = 0; for (var j=0;j