var CountryState = new Array();
function State(n, v){
	this.name = n;
	this.value = v;
}
function StateList(n, i){
	this.name = n;
	this.index = i;
	this.states = new Array();
}
function LoadUSCanada(c) {
  var CountryList = new Array();
  CountryList[0] = 'USA';
  CountryList[1] = 'Canada';

  LoadStates();

  for (var i = c.options.length; i > 0; i--){
    c.options[i - 1] = null;
  }

  for (var i = 0; i < CountryList.length; i++){
    c.options[i] = new Option(CountryList[i], CountryList[i].substring(0, 2));
  }
  c.selectedIndex = 0;
}
function LoadCountry(c) {
  var CountryList = new Array();

CountryList[0] = 'USA';
CountryList[1] = 'Canada';
CountryList[2] = '---------------------------------------------------------';
CountryList[3] = 'Abu Dhabi';
CountryList[4] = 'Afars & Issas';
CountryList[5] = 'Afghanistan';
CountryList[6] = 'Aland Islands';
CountryList[7] = 'Albania';
CountryList[8] = 'Algeria';
CountryList[9] = 'American Samoa';
CountryList[10] = 'Andorra';
CountryList[11] = 'Angola';
CountryList[12] = 'Anguilla';
CountryList[13] = 'Antarctica';
CountryList[14] = 'Antigua';
CountryList[15] = 'Antilles';
CountryList[16] = 'Argentina';
CountryList[17] = 'Armenia';
CountryList[18] = 'Aruba';
CountryList[19] = 'Ascensilon Isl';
CountryList[20] = 'Australia';
CountryList[21] = 'Austria';
CountryList[22] = 'Azabaijan';
CountryList[23] = 'Azerbaijan';
CountryList[24] = 'Azores';
CountryList[25] = 'Bah Qatar';
CountryList[26] = 'Bahamas';
CountryList[27] = 'Bahrain';
CountryList[28] = 'Balearic Island';
CountryList[29] = 'Bangladesh';
CountryList[30] = 'Barbados';
CountryList[31] = 'Belarus';
CountryList[32] = 'Belgium';
CountryList[33] = 'Belize';
CountryList[34] = 'Benin';
CountryList[35] = 'Bermuda';
CountryList[36] = 'Bhutan';
CountryList[37] = 'Bolivia';
CountryList[38] = 'Bophuthatswana';
CountryList[39] = 'Borneo';
CountryList[40] = 'Bosnia';
CountryList[41] = 'Botswana';
CountryList[42] = 'Bouvet Island';
CountryList[43] = 'Br Dependency';
CountryList[44] = 'Br Solomon Isl';
CountryList[45] = 'Brazil';
CountryList[46] = 'Brunei';
CountryList[47] = 'Bulgaria';
CountryList[48] = 'Burkina Faso';
CountryList[49] = 'Burma';
CountryList[50] = 'Burundi';
CountryList[51] = 'C I S';
CountryList[52] = 'Cambodia';
CountryList[53] = 'Cameroun';
CountryList[54] = 'Canary Islands';
CountryList[55] = 'Cape Verde Isl';
CountryList[56] = 'Caracao';
CountryList[57] = 'Carolina Island';
CountryList[58] = 'Cayman Islands';
CountryList[59] = 'Cent African Rep';
CountryList[60] = 'Channel Islands';
CountryList[61] = 'Chile';
CountryList[62] = 'China';
CountryList[63] = 'Christmas Island';
CountryList[64] = 'Cocos-Keeling Islands';
CountryList[65] = 'Colombia';
CountryList[66] = 'Comoro';
CountryList[67] = 'Congo Republic';
CountryList[68] = 'Congo, the Democratic Republic of the';
CountryList[69] = 'Cook Islands';
CountryList[70] = 'Costa Rica';
CountryList[71] = 'Croatia';
CountryList[72] = 'Cuba';
CountryList[73] = 'Cyprus';
CountryList[74] = 'Czech Republic';
CountryList[75] = 'Czechoslovakia';
CountryList[76] = 'Dahomey';
CountryList[77] = 'Denmark';
CountryList[78] = 'Djibouti';
CountryList[79] = 'Dominica';
CountryList[80] = 'Dominica Republic';
CountryList[81] = 'Dominican Rep';
CountryList[82] = 'Dubai';
CountryList[83] = 'East Timor';
CountryList[84] = 'Ecuador';
CountryList[85] = 'Egypt';
CountryList[86] = 'El Salvador';
CountryList[87] = 'Equator Guinea';
CountryList[88] = 'Eritrea';
CountryList[89] = 'Estonia';
CountryList[90] = 'Ethiopia';
CountryList[91] = 'Falkland Island';
CountryList[92] = 'Faroe Islands';
CountryList[93] = 'Fiji';
CountryList[94] = 'Finland';
CountryList[95] = 'Fr West Indies';
CountryList[96] = 'France';
CountryList[97] = 'French Antilles';
CountryList[98] = 'French Guiana';
CountryList[99] = 'French Polynesia';
CountryList[100] = 'French Southern Territories';
CountryList[101] = 'Gabon';
CountryList[102] = 'Galapagos Island';
CountryList[103] = 'Georgia';
CountryList[104] = 'Germany';
CountryList[105] = 'Ghana';
CountryList[106] = 'Gibralter';
CountryList[107] = 'Gilbert Islands';
CountryList[108] = 'Gozo';
CountryList[109] = 'Great Britain';
CountryList[110] = 'Greece';
CountryList[111] = 'Greenland';
CountryList[112] = 'Grenada';
CountryList[113] = 'Guadeloupe';
CountryList[114] = 'Guatemala';
CountryList[115] = 'Guernsey';
CountryList[116] = 'Guinea Bissau';
CountryList[117] = 'Guyana';
CountryList[118] = 'Haiti';
CountryList[119] = 'Heard Island and Mcdonald Islands';
CountryList[120] = 'Honduras';
CountryList[121] = 'Hong Kong';
CountryList[122] = 'Hungary';
CountryList[123] = 'Iceland';
CountryList[124] = 'India';
CountryList[125] = 'Indonesia';
CountryList[126] = 'Iran';
CountryList[127] = 'Iraq';
CountryList[128] = 'Ireland';
CountryList[129] = 'Isle Of Man';
CountryList[130] = 'Israel';
CountryList[131] = 'Italy';
CountryList[132] = 'Ivory Coast';
CountryList[133] = 'Jamaica';
CountryList[134] = 'Japan';
CountryList[135] = 'Java';
CountryList[136] = 'Jersey';
CountryList[137] = 'Jordan';
CountryList[138] = 'Kampuchea';
CountryList[139] = 'Kazakhstan';
CountryList[140] = 'Kenya';
CountryList[141] = 'Khmer Republic';
CountryList[142] = 'Kirbati';
CountryList[143] = 'Kirgyzstan';
CountryList[144] = 'Korea P D R';
CountryList[145] = 'Kuwait';
CountryList[146] = 'Kyrgyztan';
CountryList[147] = 'Labrador';
CountryList[148] = 'Laos';
CountryList[149] = 'Latvia';
CountryList[150] = 'Latvia S R R';
CountryList[151] = 'Lebanon';
CountryList[152] = 'Lesotho';
CountryList[153] = 'Liberia';
CountryList[154] = 'Libya';
CountryList[155] = 'Liechtenstein';
CountryList[156] = 'Lithuania';
CountryList[157] = 'Luxembourg';
CountryList[158] = 'Macau';
CountryList[159] = 'Macedonia';
CountryList[160] = 'Madagascar';
CountryList[161] = 'Madeira';
CountryList[162] = 'Malagasy';
CountryList[163] = 'Malawi';
CountryList[164] = 'Malaysia';
CountryList[165] = 'Maldives';
CountryList[166] = 'Mali';
CountryList[167] = 'Malta';
CountryList[168] = 'Mangolian Pr';
CountryList[169] = 'Mariana Islands';
CountryList[170] = 'Marshall Islands';
CountryList[171] = 'Martinique';
CountryList[172] = 'Mauritania';
CountryList[173] = 'Mauritius';
CountryList[174] = 'Mauro Landi';
CountryList[175] = 'Mayotte';
CountryList[176] = 'Mexico';
CountryList[177] = 'Micronesia';
CountryList[178] = 'Moldavia';
CountryList[179] = 'Moldova';
CountryList[180] = 'Monaco';
CountryList[181] = 'Mongolia';
CountryList[182] = 'Montenegro';
CountryList[183] = 'Montserrat';
CountryList[184] = 'Morocco';
CountryList[185] = 'Mozambique';
CountryList[186] = 'Myanmar';
CountryList[187] = 'N Ireland Indies';
CountryList[188] = 'N Mariana Isl';
CountryList[189] = 'Namibia';
CountryList[190] = 'Nauru';
CountryList[191] = 'Nepal';
CountryList[192] = 'Neth Antilles';
CountryList[193] = 'Neth West Indies';
CountryList[194] = 'Netherlands';
CountryList[195] = 'New Caledonia';
CountryList[196] = 'New Guinea';
CountryList[197] = 'New Hebrides';
CountryList[198] = 'New Ireland';
CountryList[199] = 'New Zealand';
CountryList[200] = 'Newfoundland';
CountryList[201] = 'Nicaragua';
CountryList[202] = 'Niger';
CountryList[203] = 'Nigeria';
CountryList[204] = 'Niue';
CountryList[205] = 'Norfolk Island';
CountryList[206] = 'North Korea';
CountryList[207] = 'Northern Ireland';
CountryList[208] = 'Norway';
CountryList[209] = 'Okinawa';
CountryList[210] = 'Oman';
CountryList[211] = 'Pakistan';
CountryList[212] = 'Palestinian Territory, Occupied';
CountryList[213] = 'Panama';
CountryList[214] = 'Papua New Guinea';
CountryList[215] = 'Paraguay';
CountryList[216] = 'Peru';
CountryList[217] = 'Philippines';
CountryList[218] = 'Pitcairn';
CountryList[219] = 'Poland';
CountryList[220] = 'Portugal';
CountryList[221] = 'Qatar';
CountryList[222] = 'Rem Loc Country';
CountryList[223] = 'Rep Of Guinea';
CountryList[224] = 'Rep Of Palau';
CountryList[225] = 'Reunion Island';
CountryList[226] = 'Rhodesia';
CountryList[227] = 'Rkykya Islands';
CountryList[228] = 'Romania';
CountryList[229] = 'Russian Federation';
CountryList[230] = 'Rwanda';
CountryList[231] = 'S West Africa';
CountryList[232] = 'Samoa Islands';
CountryList[233] = 'Samoa Marino';
CountryList[234] = 'San Marino';
CountryList[235] = 'Sao Tome';
CountryList[236] = 'Sao Tomerino';
CountryList[237] = 'Saudi Arabia';
CountryList[238] = 'Senegal';
CountryList[239] = 'Serbia';
CountryList[240] = 'Seychelles';
CountryList[241] = 'Sicily';
CountryList[242] = 'Sierra Leone';
CountryList[243] = 'Singapore';
CountryList[244] = 'Slovak Republic';
CountryList[245] = 'Slovenia';
CountryList[246] = 'Solomon Island';
CountryList[247] = 'Somali Republic';
CountryList[248] = 'South Africa';
CountryList[249] = 'South Korea';
CountryList[250] = 'Spain';
CountryList[251] = 'Spanish Sahara';
CountryList[252] = 'Sri Lanka';
CountryList[253] = 'St Christopher and Nevis';
CountryList[254] = 'St Helena';
CountryList[255] = 'St Kitts';
CountryList[256] = 'St Kitts and Nevis Anguilla';
CountryList[257] = 'St Lucia';
CountryList[258] = 'St Pierre Miquel';
CountryList[259] = 'St Vincent';
CountryList[260] = 'St Vincent and the Grenadines';
CountryList[261] = 'Sudan';
CountryList[262] = 'Suriname';
CountryList[263] = 'Svalbard';
CountryList[264] = 'Swaziland';
CountryList[265] = 'Sweden';
CountryList[266] = 'Switzerland';
CountryList[267] = 'Syria';
CountryList[268] = 'Tahiti';
CountryList[269] = 'Taiwan';
CountryList[270] = 'Tajikistan';
CountryList[271] = 'Tanzania';
CountryList[272] = 'Tasmania';
CountryList[273] = 'Tavalu';
CountryList[274] = 'Tchad';
CountryList[275] = 'Thailand';
CountryList[276] = 'The Gambia';
CountryList[277] = 'Togo Republic';
CountryList[278] = 'Tokelau';
CountryList[279] = 'Tonga';
CountryList[280] = 'Transkei';
CountryList[281] = 'Trinidad Tobago';
CountryList[282] = 'Tunisia';
CountryList[283] = 'Turkemistan';
CountryList[284] = 'Turkey';
CountryList[285] = 'Turks Caicos Isl';
CountryList[286] = 'Tutuila';
CountryList[287] = 'Tuvalu';
CountryList[288] = 'U A E';
CountryList[289] = 'Uganda';
CountryList[290] = 'Ukraine';
CountryList[291] = 'Ukrania S S R';
CountryList[292] = 'Ukranian S S R';
CountryList[293] = 'United Kingdom';
CountryList[294] = 'Upper Volta';
CountryList[295] = 'Uruguay';
CountryList[296] = 'Uzbekistan';
CountryList[297] = 'Vanuatu';
CountryList[298] = 'Vatican City';
CountryList[299] = 'Venezuela';
CountryList[300] = 'Vietnam';
CountryList[301] = 'Virgin Islands, British';
CountryList[302] = 'Wake Islands';
CountryList[303] = 'Wallis and Futuna Island';
CountryList[304] = 'West Bank';
CountryList[305] = 'West Indies';
CountryList[306] = 'West Sahara';
CountryList[307] = 'Western Samoa';
CountryList[308] = 'Yemen';
CountryList[309] = 'Zaire';
CountryList[310] = 'Zambia';
CountryList[311] = 'Zimbabwe';


  LoadStates();

  for (var i = c.options.length; i > 0; i--){
    c.options[i - 1] = null;
  }

  for (var i = 0; i < CountryList.length; i++){
    c.options[i] = new Option(CountryList[i], CountryList[i]);
  }
  
  c.selectedIndex = 0;
}
function LoadStates() {  
  CountryState[0] = new StateList('USA', 0);
  CountryState[0].states[0] = new State('SELECT ONE', '');
  CountryState[0].states[1] = new State('Alabama', 'AL');
  CountryState[0].states[2] = new State('Alaska', 'AK');
  CountryState[0].states[3] = new State('Arizona', 'AZ');
  CountryState[0].states[4] = new State('Arkansas', 'AR');
  CountryState[0].states[5] = new State('California', 'CA');
  CountryState[0].states[6] = new State('Colorado', 'CO');
  CountryState[0].states[7] = new State('Connecticut', 'CT');
  CountryState[0].states[8] = new State('Delaware', 'DE');
  CountryState[0].states[9] = new State('Dist. Columbia', 'DC');
  CountryState[0].states[10] = new State('Florida', 'FL');
  CountryState[0].states[11] = new State('Georgia', 'GA');
  CountryState[0].states[12] = new State('Guam', 'GU');
  CountryState[0].states[13] = new State('Hawaii', 'HI');
  CountryState[0].states[14] = new State('Idaho', 'ID');
  CountryState[0].states[15] = new State('Illinois', 'IL');
  CountryState[0].states[16] = new State('Indiana', 'IN');
  CountryState[0].states[17] = new State('Iowa', 'IA');
  CountryState[0].states[18] = new State('Kansas', 'KS');
  CountryState[0].states[19] = new State('Kentucky', 'KY');
  CountryState[0].states[20] = new State('Louisiana', 'LA');
  CountryState[0].states[21] = new State('Maine', 'ME');
  CountryState[0].states[22] = new State('Maryland', 'MD');
  CountryState[0].states[23] = new State('Massachusetts', 'MA');
  CountryState[0].states[24] = new State('Michigan', 'MI');
  CountryState[0].states[25] = new State('Minnesota', 'MN');
  CountryState[0].states[26] = new State('Mississippi', 'MS');
  CountryState[0].states[27] = new State('Missouri', 'MO');
  CountryState[0].states[28] = new State('Montana', 'MT');
  CountryState[0].states[29] = new State('Nebraska', 'NE');
  CountryState[0].states[30] = new State('Nevada', 'NV');
  CountryState[0].states[31] = new State('New Hampshire', 'NH');
  CountryState[0].states[32] = new State('New Jersey', 'NJ');
  CountryState[0].states[33] = new State('New Mexico', 'NM');
  CountryState[0].states[34] = new State('New York', 'NY');
  CountryState[0].states[35] = new State('North Carolina', 'NC');
  CountryState[0].states[36] = new State('North Dakota', 'ND');
  CountryState[0].states[37] = new State('Ohio', 'OH');
  CountryState[0].states[38] = new State('Oklahoma', 'OK');
  CountryState[0].states[39] = new State('Oregon', 'OR');
  CountryState[0].states[40] = new State('Pennsylvania', 'PA');
  CountryState[0].states[41] = new State('Puerto Rico', 'PR');
  CountryState[0].states[42] = new State('Rhode Island', 'RI');
  CountryState[0].states[43] = new State('South Carolina', 'SC');
  CountryState[0].states[44] = new State('South Dakota', 'SD');
  CountryState[0].states[45] = new State('Tennessee', 'TN');
  CountryState[0].states[46] = new State('Texas', 'TX');
  CountryState[0].states[47] = new State('Utah', 'UT');
  CountryState[0].states[48] = new State('Vermont', 'VT');
  CountryState[0].states[49] = new State('Virgin Islands', 'VI');
  CountryState[0].states[50] = new State('Virginia', 'VA');
  CountryState[0].states[51] = new State('Washington', 'WA');
  CountryState[0].states[52] = new State('West Virginia', 'WV');
  CountryState[0].states[53] = new State('Wisconsin', 'WI');
  CountryState[0].states[54] = new State('Wyoming', 'WY');

  CountryState[1] = new StateList('Canada', 1);
  CountryState[1].states[0] = new State('SELECT ONE', '');
  CountryState[1].states[1] = new State('Alberta', 'AB');
  CountryState[1].states[2] = new State('British Columbia', 'BC');
  CountryState[1].states[3] = new State('Manitoba', 'MB');
  CountryState[1].states[4] = new State('New Brunswich', 'NB');
  CountryState[1].states[5] = new State('Newfoundland', 'NL');
  CountryState[1].states[6] = new State('Northwest Territory', 'NT');
  CountryState[1].states[7] = new State('Nova Scotia', 'NS');
  CountryState[1].states[8] = new State('Nunavut', 'NU');
  CountryState[1].states[9] = new State('Ontario', 'ON');
  CountryState[1].states[10] = new State('Prince Edward Island', 'PE');
  CountryState[1].states[11] = new State('Quebec', 'QC');
  CountryState[1].states[12] = new State('Saskatchewan', 'SK');
  CountryState[1].states[13] = new State('Yukon Territory', 'YT');
}
function CountryChanged(c, s) {
  var ci = c.selectedIndex;

  for (var i = s.options.length; i > 0; i--){
    s.options[i - 1] = null;
  }

  if ((ci == 0) || (ci == 1)) {	
    for (var i = 0; i < CountryState[ci].states.length; i++){
      s.options[i] = new Option(CountryState[ci].states[i].name, CountryState[ci].states[i].value);
    }
  } else {
    s.options[0] = new Option('-----------------------------', '');
  }
  s.selectedIndex = 0;
}
function LoadUSStates(s) {
  for (var i = s.options.length; i > 0; i--){
    s.options[i - 1] = null;
  }

  for (var i = 0; i < CountryState[0].states.length; i++){
    s.options[i] = new Option(CountryState[0].states[i].name, CountryState[0].states[i].value);
  }
  s.selectedIndex = 0;
}