// Populate an array with all of the states or suburbs from the different 
// countries in the order that the countries appear in the 
// drop-down list. 

state = new Array(24)
state [0] = new Array(1)
state [1]= new Array(8)
state [2] = new Array(1)
state [3] = new Array(1)
state [4] = new Array(1)
state [5]= new Array(1)
state [6] = new Array(1)
state [7] = new Array(4)
state [8] = new Array(1)
state [9]= new Array(14)
state [10] = new Array(28)
state [11] = new Array(1)
state [12] = new Array(1)
state [13]= new Array(1)
state [14] = new Array(5)
state [15] = new Array(16)
state [16] = new Array(1)
state [17]= new Array(58)
state [18] = new Array(1)
state [19] = new Array(29)
state [20] = new Array(13)
state [21] = new Array(1)
state [22] = new Array(20)
state [23] = new Array(45)

//blank  (3)
state [0] [0] = ""

//Australia  (8)
state [1] [0] = "New South Wales"
state [1] [1] = "Queensland"
state [1] [2] = "Victoria"
state [1] [3] = "South Australia"
state [1] [4] = "Northern Territory"
state [1] [5] = "Tasmania"
state [1] [6] = "Western Australia"
state [1] [7] = "A.C.T. Canberra"

//Beijing   (1)
state [2][0] = "-"

//Brunei  (1)
state [3] [0] = "-"

//Europe
state [4] [0] = "-"

//Quangdong
state [5] [0] = "-"

//Hong Kong
state [6] [0] = "-"

//Indonesia
state [7] [0] = "Java"
state [7] [1] = "Sulawesi"
state [7] [2] = "Sumatra"
state [7] [3] = "Kalimantan"

//Japan
state [8] [0] = "-"

//Malaysia
state [9] [0] = "Perlis"
state [9] [1] = "Kedah"
state [9] [2] = "Kelantan"
state [9] [3] = "Trengganu"
state [9] [4] = "Pahang"
state [9] [5] = "Perak"
state [9] [6] = "Penang"
state [9] [7] = "Selangor"
state [9] [8] = "Wilayah Persekutuan"
state [9] [9] = "Malacca"
state [9] [10] = "Negri Sembilan"
state [9] [11] = "Johore"
state [9] [12] = "Sabah"
state [9] [13] = "Sarawak"

//New Zealand
state [10] [0] ="Auckland"
state [10] [1] ="Bay of Plenty"
state [10] [2] ="Canterbury"
state [10] [3] ="Otago"
state [10] [4] ="Christchurch"
state [10] [5] ="Coromandel"
state [10] [6] ="Dunedin"
state [10] [7] ="Eastland"
state [10] [8] ="Fiordland"
state [10] [9] ="Hawkes Bay"
state [10] [10] ="Horowhenua"
state [10] [11] ="Manawatu"
state [10] [12] ="Marlborough"
state [10] [13] ="Mt Cook"
state [10] [14] ="Nelson"
state [10] [15] ="Northland"
state [10] [16] ="Queenstown"
state [10] [17] ="Rotorua"
state [10] [18] ="Ruapehu"
state [10] [19] ="Southland"
state [10] [20] ="Taranaki"
state [10] [21] ="Taupo"
state [10] [22] ="Waikato"
state [10] [23] ="Wairarapa"
state [10] [24] ="Wanaka"
state [10] [25] ="Wanganui"
state [10] [26] ="Wellington"
state [10] [27] ="West Coast"

//Philippines
state [11] [0] = "-"

//Shanghai
state [12] [0] = "-"

//Singapore
state [13] [0] = "-"

//South Africa
state [14] [0] = "Gauteng"
state [14] [1] = "Natal"
state [14] [2] = "Cape"
state [14] [3] = "Orange Free State"
state [14] [4] = "Eastern Transvaal"

//Taiwan
//Taiwan
state [15] [0] ="Changhua Hsien"
state [15] [1] ="Chiayi Hsien"
state [15] [2] ="Chilung Hsien"
state [15] [3] ="Hsinchu Hsien"
state [15] [4] ="Hualian Hsien"
state [15] [5] ="Kaohsiung"
state [15] [6] ="Kaohsung Hsien"
state [15] [7] ="Nantou Hsien"
state [15] [8] ="Pingtung Hsien"
state [15] [9] ="Taichung Hsien"
state [15] [10] ="Tainan Hsien"
state [15] [11] ="Taipei"
state [15] [12] ="Taipei Hsien"
state [15] [13] ="Taitong Hsien"
state [15] [14] ="Taoyuan Hsien"
state [15] [15] ="Yunlin Hsien"

//Thailand
state [16] [0] = "-"

//US
state [17] [0] = "Alabama"
state [17] [1] = "Alaska"
state [17] [2] = "Arizona"
state [17] [3] = "Arkansas"
state [17] [4] = "California"
state [17] [5] = "Colorado"
state [17] [6] = "Connecticut"
state [17] [7] = "D.C."
state [17] [8] = "Delaware"
state [17] [9] = "Florida"
state [17] [10] = "Georgia"
state [17] [11] = "Hawaii"
state [17] [12] = "Idaho"
state [17] [13] = "Illinois"
state [17] [14] = "Indiana"
state [17] [15] = "Iowa"
state [17] [16] = "Kansas"
state [17] [17] = "Kentucky"
state [17] [18] = "Louisiana"
state [17] [19] = "Maine"
state [17] [20] = "Maryland"
state [17] [21] = "Massachusetts"
state [17] [22] = "Michigan"
state [17] [23] = "Minnesota"
state [17] [24] = "Mississippi"
state [17] [25] = "Missouri"
state [17] [26] = "Montana"
state [17] [27] = "Nebraska"
state [17] [28] = "Nevada"
state [17] [29] = "New Hampshire"
state [17] [30] = "New Jersey"
state [17] [31] = "New Mexico"
state [17] [32] = "New York"
state [17] [33] = "North Carolina"
state [17] [34] = "North Dakota"
state [17] [35] = "Ohio"
state [17] [36] = "Oklahoma"
state [17] [37] = "Oregon"
state [17] [38] = "Pennsylvania"
state [17] [39] = "Rhode Island"
state [17] [40] = "South Carolina"
state [17] [41] = "South Dakota"
state [17] [42] = "Tennessee"
state [17] [43] = "Texas"
state [17] [44] = "Utah"
state [17] [45] = "Vermont"
state [17] [46] = "Virginia"
state [17] [47] = "Washington"
state [17] [48] = "West Virginia"
state [17] [49] = "Wisconsin"
state [17] [50] = "Wyoming"
state [17] [51] = "American Samoa"
state [17] [52] = "Guam"
state [17] [53] = "Mariana Island"
state [17] [54] = "Marshall Island"
state [17] [55] = "Micronesia"
state [17] [56] = "Puerto Rico"
state [17] [57] = "Virgin Island"

//Vietnam
state [18] [0] = "-"

//India
state [19] [0] ="Andhra Pradesh"
state [19] [1] ="Arunachal Pradesh"
state [19] [2] ="Assam"
state [19] [3] ="Bihar"
state [19] [4] ="Chattisgarh"
state [19] [5] ="Delhi"
state [19] [6] ="Goa"
state [19] [7] ="Gujarat"
state [19] [8] ="Haryana"
state [19] [9] ="Himachal Pradesh"
state [19] [10] ="Jammu & Kashmir"
state [19] [11] ="Jharkand"
state [19] [12] ="Karnataka"
state [19] [13] ="Kerala"
state [19] [14] ="Madhya Pradesh"
state [19] [15] ="Maharashtra"
state [19] [16] ="Manipur"
state [19] [17] ="Meghalaya"
state [19] [18] ="Mizoram"
state [19] [19] ="Nagaland"
state [19] [20] ="Orissa"
state [19] [21] ="Punjab"
state [19] [22] ="Rajasthan"
state [19] [23] ="Sikkim"
state [19] [24] ="Tamil Nadu"
state [19] [25] ="Tripura"
state [19] [26] ="Uttaranchal"
state [19] [27] ="Uttar Pradesh"
state [19] [28] ="West Bengal"

//Canada
state [20] [0] ="Alberta"
state [20] [1] ="British Columbia"
state [20] [2] ="Manitoba"
state [20] [3] ="New Brunswick"
state [20] [4] ="Newfoundland and Labrador"
state [20] [5] ="Northwest Territories"
state [20] [6] ="Nova Scotia"
state [20] [7] ="Nunavut"
state [20] [8] ="Ontario"
state [20] [9] ="Prince Edward Island"
state [20] [10] ="Quebec"
state [20] [11] ="Saskatchewan"
state [20] [12] ="Yukon"

//Turkey
state [21] [0] ="-"

//Italy
state [22] [0] ="Abruzzi"
state [22] [1] ="Basilicata"
state [22] [2] ="Calabria"
state [22] [3] ="Campania"
state [22] [4] ="Emilia-Romagna"
state [22] [5] ="Friuli-Venezia Giulia"
state [22] [6] ="Lazio"
state [22] [7] ="Liguria"
state [22] [8] ="Lombardia"
state [22] [9] ="Marche"
state [22] [10] ="Molise"
state [22] [11] ="Piemonte"
state [22] [12] ="Puglia"
state [22] [13] ="Sardegna"
state [22] [14] ="Sicilia"
state [22] [15] ="Toscana"
state [22] [16] ="Trentino-Alto Adige"
state [22] [17] ="Umbria"
state [22] [18] ="Valle d'Aosta"
state [22] [19] ="Veneto"

//England
state [23] [0] ="Avon"
state [23] [1] ="Bedfordshire"
state [23] [2] ="Berkshire"
state [23] [3] ="Buckinghamshire"
state [23] [4] ="Cambridgeshire"
state [23] [5] ="Cheshire"
state [23] [6] ="Cornwall"
state [23] [7] ="Cumberland - Cumbria"
state [23] [8] ="Derbyshire"
state [23] [9] ="Devon"
state [23] [10] ="Dorset"
state [23] [11] ="Durham"
state [23] [12] ="Essex"
state [23] [13] ="Gloucestershire"
state [23] [14] ="Hampshire"
state [23] [15] ="Herefordshire"
state [23] [16] ="Hertfordshire"
state [23] [17] ="Huntingdonshire"
state [23] [18] ="Isle of Man"
state [23] [19] ="Isle of Wight"
state [23] [20] ="Jersey, Ch. Isles"
state [23] [21] ="Kent"
state [23] [22] ="Lancashire"
state [23] [23] ="Leicestershire"
state [23] [24] ="Lincolnshire"
state [23] [25] ="London"
state [23] [26] ="Middlesex"
state [23] [27] ="Norfolk"
state [23] [28] ="Northamptonshire"
state [23] [29] ="Northumberland"
state [23] [30] ="Nottinghamshire"
state [23] [31] ="Oxfordshire"
state [23] [32] ="Rutland"
state [23] [33] ="Shropshire (Salop) "
state [23] [34] ="Somersetshire"
state [23] [35] ="Staffordshire"
state [23] [36] ="Suffolk"
state [23] [37] ="Surrey"
state [23] [38] ="Sussex"
state [23] [39] ="Warwickshire"
state [23] [40] ="West Midlands "
state [23] [41] ="Westmorland"
state [23] [42] ="Wiltshire"
state [23] [43] ="Worcestershire"
state [23] [44] ="Yorkshire"

//============================================

//Next, we create a function to fill the second drop down from 
//the array based on the item selected in the first drop down.

function FillList()
{
var num=document.form1.country_n.selectedIndex 
var boxlength = 0

document.form1.state.selectedIndex = 0
for ( ctr=0;ctr<state[num].length;ctr++)
{
boxlength++;
document.form1.state.options[ctr] = new Option(state[num] [ctr], state[num][ctr]);
}

document.form1.state.length = boxlength;
document.form1.state.focus() ;

}

function DisCountry()
{
document.form1.country_n.disabled=true;
}

