Solved

2 Step Dynamic Multiple Select Box

Posted on 2003-11-04
19
1,946 Views
Last Modified: 2012-06-22
Some time ago I asked about dynamic select multiple selection boxes (http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20779816.html). After some time I got an excellent answer that got me to where we are now. Now I need to take it even further and I need to have it done really quickly.

Check out the following page and its source code: http://www.abc-of-travel.com/travelpartners/regioncountrystate.asp

As you can see the step from selecting multiple countries to multiple selectible states/provinces works out greatly. Also check the javascript source: yes I entered all those states for all countries myself :)

Now it would be logic for me to now want it to work as follows:
1) By selecting one or more Continents the Countries select box is filled with the countries of each selected Continent. This should work in the same was as it currently works from Country to State, so selecting multiple Continents should make all countries of all selected continents enter the select box.
2) From that point the same thing should happen which happens now, meaning that I can select multiple countries and when I do all states for those countries enter the selection box.

In the end this should end up working in a way where selecting 1 or more continents leaves you with a choice of 1 or more countries which leaves you with a choice of states corresponding with all the selected countries in the selected continents.

Its important that I get this done somehow quickly hence the 500 points. Thanks guys!
0
Comment
Question by:pgkooijman
  • 9
  • 8
  • 2
19 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9679918
this is going to take a bit of work so...

start by making an array to contain the countries, and a continent code

var arrCountries = new Array();

add the country details

arrCountries[0]= new listItem( 'continentid','countryid','countryname');
arrCountries[0]= new listItem( 'AF','ZM','Zimbabze');
arrCountries[1]= new listItem( 'AF','SA','South Africa');
reapeat for all countries, or loop thriugh database query

this function will create the list items
function listItem(itemGroup, itemValue, itemText){
            this.itemGroup=itemGroup;
            this.itemValue=itemValue;
            this.itemText=itemText;
      }

this function will populate the sublist
function populateSubList(groupID, objSub){
            objSub.selectedIndex=0;
            isVisible=0;
            if(objSub.options.length>0){
                  for (x=objSub.options.length; x>0; x--){
                        objSub.options[x]=null;
                  }
            }
            
            for(x=0; x < arrItems.length; x++){
                  if(arrItems[x].itemGroup==groupID){
                        listOpt = document.createElement("option") ;
                      listOpt.value = arrItems[x].itemValue ;
                      listOpt.text = arrItems[x].itemText ;
                      objSub.add(listOpt) ;
                  }
            }
      }


and call it like this

<select name="" onChange="populateSubList(this.value,sublistToPopulate)">

so if
<option value="AF">Africa</option>

is selected

the countries list would populate
with

<option="countryid">Country Name</option> where the continent id ="AF"
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9679966
here's a working sample

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
      <title>Human Resources Toolbox - Reports - Post Reports</title>
<style>
      blockquote{
      font : inherit ;
      color : black;
      text-justify : inter-ideograph;
      text-align : justify;
}

</style>
<script>
var arrItems = new Array();

function listItem(itemGroup, itemSubGroup, itemDesc){
      this.group=itemGroup;
      this.subGroup=itemSubGroup;
      this.desc=itemDesc;
}

function populateSubList(groupID, objSub, objShow){
      objShow.style.visibility='hidden';
      if(objSub.options.length>1){
            for (x=objSub.options.length; x>0; x--){
                  objSub.options[x]=null;
            }
      }
      
      for(x=0; x< arrItems.length; x++){
            if(arrItems[x].group==groupID){
                  listOpt = document.createElement("option") ;
                listOpt.value = arrItems[x].subGroup ;
                listOpt.text = arrItems[x].desc ;
                objSub.add(listOpt) ;
            }
      }
      if(objSub.options.length>1){
            objShow.style.visibility='visible';
      }
}

arrItems[0]= new listItem(1,1,'Accident Type-Centre');
arrItems[1]= new listItem(1,2,'Accident Type-Region');
arrItems[2]= new listItem(1,3,'Injury Type-Centre');
arrItems[3]= new listItem(1,4,'Injury Type-Region');
arrItems[4]= new listItem(1,5,'Job Exp Accident-Centre');
arrItems[5]= new listItem(1,6,'Job Exp Accident-Region');
arrItems[6]= new listItem(2,8,'YTD Accident And Injury');
arrItems[7]= new listItem(5,9,'Full Time Safe Driving');
arrItems[8]= new listItem(5,10,'Part Time Safe Driving');
arrItems[9]= new listItem(6,11,'Safe Mechanics');
arrItems[10]= new listItem(3,7,'Weekly Conference Call');


function validateForm(objForm){
var err="";

 
if(!objForm.postFile1.value  && !objForm.postFile2.value  && !objForm.postFile3.value  && !objForm.postFile4.value  && !objForm.postFile5.value  && !objForm.postFile6.value ){
      err=err+"You have not selected a file for upload.\n";
}

      if(objForm.postFile1.value){
            var strTemp = objForm.postFile1.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile1.focus();
                        objForm.postFile1.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report1Day.value)){
                        if(!err){
                              objForm.report1Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report1Month.value)){
                        if(!err){
                              objForm.report1Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType1.value)){
                        if(!err){
                              objForm.rptType1.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType1.value)){
                              if(!err){
                                    objForm.rptSubType1.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }


      if(objForm.postFile2.value){
            var strTemp = objForm.postFile2.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile2.focus();
                        objForm.postFile2.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report2Day.value)){
                        if(!err){
                              objForm.report2Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report2Month.value)){
                        if(!err){
                              objForm.report2Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType2.value)){
                        if(!err){
                              objForm.rptType2.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType2.value)){
                              if(!err){
                                    objForm.rptSubType2.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }


      if(objForm.postFile3.value){
            var strTemp = objForm.postFile3.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile3.focus();
                        objForm.postFile3.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report3Day.value)){
                        if(!err){
                              objForm.report3Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report3Month.value)){
                        if(!err){
                              objForm.report3Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType3.value)){
                        if(!err){
                              objForm.rptType3.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType3.value)){
                              if(!err){
                                    objForm.rptSubType3.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }


      if(objForm.postFile4.value){
            var strTemp = objForm.postFile4.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile4.focus();
                        objForm.postFile4.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report4Day.value)){
                        if(!err){
                              objForm.report4Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report4Month.value)){
                        if(!err){
                              objForm.report4Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType4.value)){
                        if(!err){
                              objForm.rptType4.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType4.value)){
                              if(!err){
                                    objForm.rptSubType4.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }


      if(objForm.postFile5.value){
            var strTemp = objForm.postFile5.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile5.focus();
                        objForm.postFile5.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report5Day.value)){
                        if(!err){
                              objForm.report5Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report5Month.value)){
                        if(!err){
                              objForm.report5Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType5.value)){
                        if(!err){
                              objForm.rptType5.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType5.value)){
                              if(!err){
                                    objForm.rptSubType5.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }


      if(objForm.postFile6.value){
            var strTemp = objForm.postFile6.value.toLowerCase();
            if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                  if(!err){
                        objForm.postFile6.focus();
                        objForm.postFile6.select();
                  }
                  err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\nThis file can not be processed.\n Either remove the file or change to an acceptable format file.\n";
            }
            
            if(!err){
                  if(!eval(objForm.report6Day.value)){
                        if(!err){
                              objForm.report6Day.focus();
                        }
                        err=err+"You must indicate the effective day of the report.\n";
                  }
                  
                  if(!eval(objForm.report6Month.value)){
                        if(!err){
                              objForm.report6Month.focus();
                        }
                        err=err+"You must indicate the effective month of the report.\n";
                  }
            }
            
            if(!err){
                  if(!eval(objForm.rptType6.value)){
                        if(!err){
                              objForm.rptType6.focus();
                        }
                        err=err+"You must select a report type for this file.\n";
                  }else{
                        if(!eval(objForm.rptSubType6.value)){
                              if(!err){
                                    objForm.rptSubType6.focus();
                              }
                              err=err+"You must select a report subtype for this report.\n";
                        }
                  }
            }
      }

      


      if(err){
            alert(err);
      }else{
                  objForm.butSubmit.disabled=true;
                  objForm.butCancel.disabled=true;
            }
      
return (err ? false : true);
}


      function validateFile(objFile){
            var err="";
            
            if(objFile.value){
                  var strTemp = objFile.value.toLowerCase();
                  if(strTemp.indexOf('.doc') == -1 && strTemp.indexOf('.xls') == -1 ) {
                              err=err+"Invalid file type!\nOnly Word Document files (.doc) \nor Excel Spreadsheet Files (.xls) may be uploaded using this form.\n";
                        }
            }
            
            if(err){
                  alert(err);
            }
                  
      return (err ? false : true);
      }
</script>
</head>

<body>
<form name="rptPost" action="uploadReports.cfm" method="post" onSubmit="return validateForm(this)" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="1" border="0" align="center" width="600">

      
      <tr>
            <td>POST ID :</td>
            
            <td width="350">363<input type="hidden" name="postID1" value="363"></td>
      </tr>
      
      <tr>
            <td>Effective date of report : </td>
            <td>
            <select name="report1Day" tabindex="27">
                  <option value="0" selected>-</option>
                     <option value="01">01</option>
                     <option value="02">02</option>
                     <option value="03">03</option>
                     <option value="04">04</option>
                     <option value="05">05</option>
                     <option value="06">06</option>
                     <option value="07">07</option>
                    <option value="08">08</option>
                     <option value="09">09</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                     <option value="24">24</option>
                     <option value="25">25</option>
                     <option value="26">26</option>
                     <option value="27">27</option>
                     <option value="28">28</option>
                     <option value="29">29</option>
                     <option value="30">30</option>
                     <option value="31">31</option>
            </select>
            /
            <select name="report1Month">
                     <option value="0" selected>-</option>
                     <option value="01">01</option>
                     <option value="02">02</option>
                     <option value="03">03</option>
                     <option value="04">04</option>
                     <option value="05">05</option>
                     <option value="06">06</option>
                     <option value="07">07</option>
                     <option value="08">08</option>
                     <option value="09">09</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
            </select>
            /
               <select name="report1Year" tabindex="27">
                  <option value="2002">2002</option>
                     <option value="2003" selected>2003</option>
                     <option value="2004">2004</option>
               </select>
            </td>
      </tr>
      <tr>
            <td>&nbsp;</td><td>&nbsp;dd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;mm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;yyyy</td>
      </tr>
      <tr>
            <td>Report Department :</td>
            <td>Health and Safety</td>
      </tr>
      <tr>
            <td>Report Type :</td>
            
            <td><select name="rptType1" onchange="populateSubList(this.value, document.rptPost.rptSubType1, trRepList1); txtRepType1.value=this.options[this.selectedIndex].text;">
                  <option value="0">--Select a Report Type</option>
                  
                  <option value="1">Analysis</option>
                  
                  <option value="2">Monthly</option>
                  
                  <option value="5">SafeDrive</option>
                  
                  <option value="6">SafeMech</option>
                  
                  <option value="3">Weekly</option>
                  </select>
                  
                  <input type="hidden" name="txtRepType1" value="">
                  
            </td>
      </tr>
      <tr id="trRepList1" style="visibility:hidden;">
            <td>Report Sub-Type :</td>
            
            <td><select name="rptSubType1" onchange="">
                  <option value="0">--Select a Report Sub-Type</option>
                  </select>
            </td>
      </tr>
      <tr>
            <td>Select File :</td>
            <td><input type="file" name="postFile1" onchange="validateFile(this)"></td>
      </tr>      
      <tr>
            <td colspan="2"><hr width="80%"></td>
      </tr>
      
      
      

</table>
</form>

</body>
</html>
0
 

Author Comment

by:pgkooijman
ID: 9679987
Could we make it in a way where I get to keep my current arrays of Countries and States? Also I loved it in my other questions that people just posted entire HTML+Jscript code that I could copy-paste and try out. Such a solution would be amazing.
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9680089
loking at the arrays you have created it would be pretty hard, you have id'd the parent country as the first array element so you could use that to filter the sub regions of the country but you have nothing to id the continent

let me see what i can come up with


0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9680500
try this


<html>
<head>
<title>Region 2 Country 2 State</title>
<LINK HREF="./includebox/styles.css" REL="stylesheet" TYPE="text/css">
<SCRIPT language="JavaScript">
Countries = new Array
(
new Array("Asia","Afghanistan","Badakhshan","Badghis","Baghlan","Balkh","Bamian","Farah","Faryab","Ghazni","Ghowr","Helmand","Herat","Jowzjan","Kabol","Kandahar","Kapisa","Khowst","Konar","Kondoz","Laghman","Lowgar","Nangarhar","Nimruz","Nurestan","Oruzgan","Paktia","Paktika","Parvan","Samangan","Sar-e Pol","Takhar","Vardak","Zabol"),
new Array("Asia","Albania","Qarku i Beratit","Qarku i Dibres","Qarku i Durresit","Qarku i Elbasanit","Qarku i Fierit","Qarku i Gjirokastres","Qarku i Korces","Qarku i Kukesit","Qarku i Lezhes","Qarku i Shkodres","Qarku i Tiranes","Qarku i Vlores"),
new Array("Asia","Algeria","Adrar","Ain Defla","Ain Temouchent","Alger","Annaba","Batna","Bechar","Bejaia","Biskra","Blida","Bordj Bou Arreridj","Bouira","Boumerdes","Chlef","Constantine","Djelfa","El Bayadh","El Oued","El Tarf","Ghardaia","Guelma","Illizi","Jijel","Khenchela","Laghouat","Mascara","Medea","Mila","Mostaganem","M'Sila","Naama","Oran","Ouargla","Oum el Bouaghi","Relizane","Saida","Setif","Sidi Bel Abbes","Skikda","Souk Ahras","Tamanghasset","Tebessa","Tiaret","Tindouf","Tipaza","Tissemsilt","Tizi Ouzou","Tlemcen"),
new Array("Asia","American Samoa"),
new Array("Andorra","Andorra la Vella","Canillo","Encamp","La Massana","Escaldes-Engordany","Ordino","Sant Julia de Loria"),
new Array("Angola","Bengo","Benguela","Bie","Cabinda","Cuando Cubango","Cuanza Norte","Cuanza Sul","Cunene","Huambo","Huila","Luanda","Lunda Norte","Lunda Sul","Malanje","Moxico","Namibe","Uige","Zaire"),
new Array("Anguilla"),
new Array("Antarctica"),
new Array("Antigua And Barbuda","Barbuda","Redonda","Saint George","Saint John","Saint Mary","Saint Paul","Saint Peter","Saint Philip"),
new Array("Argentina","Buenos Aires","Catamarca","Chaco","Chubut","Cordoba","Corrientes","Entre Rios","Formosa","Jujuy","La Pampa","La Rioja","Mendoza","Misiones","Neuquen","Rio Negro","Salta","San Juan","San Luis","Santa Cruz","Santa Fe","Santiago del Estero","Tierra del Fuego","Tucuman"),
new Array("Armenia","Aragatsotn","Ararat","Armavir","Geghark'unik'","Kotayk'","Lorri","Shirak","Syunik'","Tavush","Vayots' Dzor","Yerevan"),
new Array("Aruba"),
new Array("Australia","Australian Capital Territory","New South Wales","Northern Territory","Queensland","South Australia","Tasmania","Victoria","Western Australia"),
new Array("Austria","Burgenland","Kaernten","Niederoesterreich","Oberoesterreich","Salzburg","Steiermark","Tirol","Vorarlberg","Wien"),
new Array("Azerbaijan","Abseron Rayonu","Agcabadi Rayonu","Agdam Rayonu","Agdas Rayonu","Agstafa Rayonu","Agsu Rayonu","Ali Bayramli Sahari","Astara Rayonu","Baki Sahari","Balakan Rayonu","Barda Rayonu","Beylaqan Rayonu","Bilasuvar Rayonu","Cabrayil Rayonu","Calilabad Rayonu","Daskasan Rayonu","Davaci Rayonu","Fuzuli Rayonu","Gadabay Rayonu","Ganca Sahari","Goranboy Rayonu","Goycay Rayonu","Haciqabul Rayonu","Imisli Rayonu","Ismayilli Rayonu","Kalbacar Rayonu","Kurdamir Rayonu","Lacin Rayonu","Lankaran Rayonu","Lankaran Sahari","Lerik Rayonu","Masalli Rayonu","Mingacevir Sahari","Naftalan Sahari","Naxcivan Muxtar Respublikasi","Neftcala Rayonu","Oguz Rayonu","Qabala Rayonu","Qax Rayonu","Qazax Rayonu","Qobustan Rayonu","Quba Rayonu","Qubadli Rayonu","Qusar Rayonu","Saatli Rayonu","Sabirabad Rayonu","Saki Rayonu","Saki Sahari","Salyan Rayonu","Samaxi Rayonu","Samkir Rayonu","Samux Rayonu","Siyazan Rayonu","Sumqayit Sahari","Susa Rayonu","Susa Sahari","Tartar Rayonu","Tovuz Rayonu","Ucar Rayonu","Xacmaz Rayonu","Xankandi Sahari","Xanlar Rayonu","Xizi Rayonu","Xocali Rayonu","Xocavand Rayonu","Yardimli Rayonu","Yevlax Rayonu","Yevlax Sahari","Zangilan Rayonu","Zaqatala Rayonu","Zardab Rayonu"),
new Array("Bahamas","Acklins and Crooked Islands","Bimini","Cat Island","Exuma","Freeport","Fresh Creek","Governor's Harbour","Green Turtle Cay","Harbour Island","High Rock","Inagua","Kemps Bay","Long Island","Marsh Harbour","Mayaguana","New Providence","Nichollstown and Berry Islands","Ragged Island","Rock Sound","Sandy Point","San Salvador","Rum Cay"),
new Array("Bahrain","Al Hadd","Al Manamah","Al Mintaqah al Gharbiyah","Al Mintaqah al Wusta","Al Mintaqah ash Shamaliyah","Al Muharraq","Ar Rifa' wa al Mintaqah al Janubiyah","Jidd Hafs","Madinat Hamad","Madinat 'Isa","Juzur Hawar","Sitrah"),
new Array("Bangladesh","Barisal","Chittagong","Dhaka","Khulna","Rajshahi"),
new Array("Barbados","Christ Church","Saint Andrew","Saint George","Saint James","Saint John","Saint Joseph","Saint Lucy","Saint Michael","Saint Peter","Saint Philip","Saint Thomas"),
new Array("Belarus","Brest","Homyel'skaya","Horad Minsk","Hrodzyenskaya","Mahilyowskaya","Minskaya","Vitsyebskaya"),
new Array("Belgium","Antwerpen","Brabant Wallon","Brussels","Flanders","Hainaut","Liege","Limburg","Luxembourg","Namur","Oost-Vlaanderen","Vlaams-Brabant","Wallonia","West-Vlaanderen"),
new Array("Belize","Belize","Cayo","Corozal","Orange Walk","Stann Creek","Toledo"),
new Array("Benin","Alibori","Atakora","Atlantique","Borgou","Collines","Couffo","Donga","Littoral","Mono","Oueme","Plateau","Zou"),
new Array("Bermuda","Devonshire","Hamilton","Hamilton","Paget","Pembroke","Saint George","Saint George's","Sandys","Smith's","Southampton","Warwick"),
new Array("Bhutan","Bumthang","Chhukha","Chirang","Dagana","Geylegphug","Ha","Lhuntshi","Mongar","Paro","Pemagatsel","Punakha","Samchi","Samdrup Jongkhar","Shemgang","Tashigang","Thimphu","Tongsa","Wangdi Phodrang"),
new Array("Bolivia","Chuquisaca","Cochabamba","Beni","La Paz","Oruro","Pando","Potosi","Santa Cruz","Tarija"),
new Array("Bosnia Hercegovina","Brcko district","Bosnia and Herzegovina","Republika Srpska"),
new Array("Botswana","Central","Chobe","Francistown","Gaborone","Ghanzi","Kgalagadi","Kgatleng","Kweneng","Lobatse","Ngamiland","North-East","Selebi-Pikwe","South-East","Southern"),
new Array("Bouvet Island"),
new Array("Brazil","Acre","Alagoas","Amapa","Amazonas","Bahia","Ceara","Distrito Federal","Espirito Santo","Goias","Maranhao","Mato Grosso","Mato Grosso do Sul","Minas Gerais","Para","Paraiba","Parana","Pernambuco","Piaui","Rio de Janeiro","Rio Grande do Norte","Rio Grande do Sul","Rondonia","Roraima","Santa Catarina","Sao Paulo","Sergipe","Tocantins"),
new Array("Brunei Darussalam","Belait","Brunei and Muara","Temburong","Tutong"),
new Array("Bulgaria","Blagoevgrad","Burgas","Dobrich","Gabrovo","Khaskovo","Kurdzhali","Kyustendil","Lovech","Montana","Pazardzhik","Pernik","Pleven","Plovdiv","Razgrad","Ruse","Shumen","Silistra","Sliven","Smolyan","Sofiya","Sofiya-Grad","Stara Zagora","Turgovishte","Varna","Veliko Turnovo","Vidin","Vratsa","Yambol"),
new Array("Burkina","Bam","Bazega","Bougouriba","Boulgou","Boulkiemde","Ganzourgou","Gnagna","Gourma","Houe","Kadiogo","Kenedougou","Komoe","Kossi","Kouritenga","Mouhoun","Namentenga","Naouri","Oubritenga","Oudalan","Passore","Poni","Sanguie","Sanmatenga","Seno","Sissili","Soum","Sourou","Tapoa","Yatenga","Zoundweogo"),
new Array("Burma","Chin State","Ayeyarwady","Bago","Kachin State","Kayin State","Kayah State","Magway","Mandalay","Mon State","Rakhine State","Sagaing","Shan State","Tanintharyi","Yangon"),
new Array("Burundi","Bubanza","Bujumbura","Bururi","Cankuzo","Cibitoke","Gitega","Karuzi","Kayanza","Kirundo","Makamba","Muramvya","Muyinga","Mwaro","Ngozi","Rutana","Ruyigi"),
new Array("Byelorussian SSR"),
new Array("Cambodia","Banteay Mean Cheay","Batdambang","Kampong Cham","Kampong Chhnang","Kampong Spoe","Kampong Thum","Kampot","Kandal","Kaoh Kong","Keb","Kracheh","Mondol Kiri","Otdar Mean Cheay","Pailin","Phnum Penh","Pouthisat","Preah Seihanu","Preah Vihear","Prey Veng","Rotanah Kiri","Siem Reab","Stoeng Treng","Svay Rieng","Takev"),
new Array("Cameroon","Adamaoua","Centre","Est","Extreme-Nord","Littoral","Nord","Nord-Ouest","Ouest","Sud","Sud-Ouest"),
new Array("Canada","Alberta","British Columbia","Manitoba","New Brunswick","Newfoundland and Labrador","Northwest Territories","Nova Scotia","Nunavut","Ontario","Prince Edward Island","Quebec","Saskatchewan","Yukon Territory"),
new Array("Cape Verde","Boa Vista","Brava","Calheta","Maio","Mosteiros","Paul","Praia","Porto Novo","Ribeira Grande","Sal","Santa Catarina","Santa Cruz","Sao Domingos","Sao Nicolau","Sao Filipe","Sao Vicente","Tarrafal"),
new Array("Cayman Islands","Creek","Eastern","Midland","South Town","Spot Bay","Stake Bay","West End","Western"),
new Array("Central African Republic","Bamingui-Bangoran","Bangui","Basse-Kotto","Haute-Kotto","Haut-Mbomou","Kemo","Lobaye","Mambere-Kadei","Mbomou","Nana-Grebizi","Nana-Mambere","Ombella-Mpoko","Ouaka","Ouham","Ouham-Pende","Sangha-Mbaere","Vakaga"),
new Array("Chad","Batha","Biltine","Borkou-Ennedi-Tibesti","Chari-Baguirmi","Guera","Kanem","Lac","Logone Occidental","Logone Oriental","Mayo-Kebbi","Moyen-Chari","Ouaddai","Salamat","Tandjile"),
new Array("Chile","Aisen del General Carlos Ibanez del Campo","Antofagasta","Araucania","Atacama","Bio-Bio","Coquimbo","Libertador General Bernardo O'Higgins","Los Lagos","Magallanes y de la Antartica Chilena","Maule","Region Metropolitana","Tarapaca","Valparaiso"),
new Array("China","Anhui","Beijing","Chongqing","Fujian","Gansu","Guangdong","Guangxi","Guizhou","Hainan","Hebei","Heilongjiang","Henan","Hubei","Hunan","Jiangsu","Jiangxi","Jilin","Liaoning","Nei Mongol","Ningxia","Qinghai","Shaanxi","Shandong","Shanghai","Shanxi","Sichuan","Tianjin","Xinjiang","Xizang (Tibet)","Yunnan","Zhejiang"),
new Array("Christmas Island"),
new Array("Cocos (Keeling) Islands"),
new Array("Colombia","Amazonas","Antioquia","Arauca","Atlantico","Distrito Capital de Bogota","Bolivar","Boyaca","Caldas","Caqueta","Casanare","Cauca","Cesar","Choco","Cordoba","Cundinamarca","Guainia","Guaviare","Huila","La Guajira","Magdalena","Meta","Narino","Norte de Santander","Putumayo","Quindio","Risaralda","San Andres y Providencia","Santander","Sucre","Tolima","Valle del Cauca","Vaupes","Vichada"),
new Array("Comoros","Grande Comore (Njazidja)","Anjouan (Nzwani)","Moheli (Mwali)"),
new Array("Congo","Bandundu","Bas-Congo","Equateur","Kasai-Occidental","Kasai-Oriental","Katanga","Kinshasa","Maniema","Nord-Kivu","Orientale","Sud-Kivu"),
new Array("Cook Islands"),
new Array("Costa Rica","Alajuela","Cartago","Guanacaste","Heredia","Limon","Puntarenas","San Jose"),
new Array("Cote D'Ivoire","Abengourou","Abidjan","Aboisso","Adiake","Adzope","Agboville","Agnibilekrou","Alepe","Bocanda","Bangolo","Beoumi","Biankouma","Bondoukou","Bongouanou","Bouafle","Bouake","Bouna","Boundiali","Dabakala","Dabou","Daloa","Danane","Daoukro","Dimbokro","Divo","Duekoue","Ferkessedougou","Gagnoa","Grand-Bassam","Grand-Lahou","Guiglo","Issia","Jacqueville","Katiola","Korhogo","Lakota","Man","Mankono","Mbahiakro","Odienne","Oume","Sakassou","San-Pedro","Sassandra","Seguela","Sinfra","Soubre","Tabou","Tanda","Tiebissou","Tingrela","Tiassale","Touba","Toulepleu","Toumodi","Vavoua","Yamoussoukro","Zuenoula"),
new Array("Croatia","Bjelovarsko-Bilogorska Zupanija","Brodsko-Posavska Zupanija","Dubrovacko-Neretvanska Zupanija","Istarska Zupanija","Karlovacka Zupanija","Koprivnicko-Krizevacka Zupanija","Krapinsko-Zagorska Zupanija","Licko-Senjska Zupanija","Medimurska Zupanija","Osjecko-Baranjska Zupanija","Pozesko-Slavonska Zupanija","Primorsko-Goranska Zupanija","Sibensko-Kninska Zupanija","Sisacko-Moslavacka Zupanija","Splitsko-Dalmatinska Zupanija","Varazdinska Zupanija","Viroviticko-Podravska Zupanija","Vukovarsko-Srijemska Zupanija","Zadarska Zupanija","Zagreb","Zagrebacka Zupanija"),
new Array("Cuba","Camaguey","Ciego de Avila","Cienfuegos","Ciudad de La Habana","Granma","Guantanamo","Holguin","Isla de la Juventud","La Habana","Las Tunas","Matanzas","Pinar del Rio","Sancti Spiritus","Santiago de Cuba","Villa Clara"),
new Array("Cyprus","Famagusta","Kyrenia","Larnaca","Limassol","Nicosia","Paphos"),
new Array("Czech Republic","Jihocesky Kraj","Jihomoravsky Kraj","Karlovarsky Kraj","Kralovehradecky Kraj","Liberecky Kraj","Moravskoslezsky Kraj","Olomoucky Kraj","Pardubicky Kraj","Plzensky Kraj","Praha","Stredocesky Kraj","Ustecky Kraj","Vysocina","Zlinsky Kraj"),
new Array("Denmark","Arhus","Bornholm","Fredericksberg","Frederiksborg","Fyn","Kobenhavn","Kobenhavns","Nordjylland","Ribe","Ringkobing","Roskilde","Sonderjylland","Storstrom","Vejle","Vestsjalland","Viborg"),
new Array("Djibouti","Ali Sabih","Dikhil","Djibouti","Obock","Tadjoura"),
new Array("Dominica","Saint Andrew","Saint David","Saint George","Saint John","Saint Joseph","Saint Luke","Saint Mark","Saint Patrick","Saint Paul","Saint Peter"),
new Array("Dominican Republic","Azua","Baoruco","Barahona","Dajabon","Distrito Nacional","Duarte","Elias Pina","El Seibo","Espaillat","Hato Mayor","Independencia","La Altagracia","La Romana","La Vega","Maria Trinidad Sanchez","Monsenor Nouel","Monte Cristi","Monte Plata","Pedernales","Peravia","Puerto Plata","Salcedo","Samana","Sanchez Ramirez","San Cristobal","San Juan","San Pedro de Macoris","Santiago","Santiago Rodriguez","Valverde"),
new Array("East Timor","Aileu","Ainaro","Baucau","Bobonaro (Maliana)","Cova-Lima (Suai)","Dili","Ermera","Lautem (Los Palos)","Liquica","Manatuto","Manufahi (Same)","Oecussi (Ambeno)","Viqueque"),
new Array("Ecuador","Azuay","Bolivar","Canar","Carchi","Chimborazo","Cotopaxi","El Oro","Esmeraldas","Galapagos","Guayas","Imbabura","Loja","Los Rios","Manabi","Morona-Santiago","Napo","Orellana","Pastaza","Pichincha","Sucumbios","Tungurahua","Zamora-Chinchipe"),
new Array("Egypt","Ad Daqahliyah","Al Bahr al Ahmar","Al Buhayrah","Al Fayyum","Al Gharbiyah","Al Iskandariyah","Al Isma'iliyah","Al Jizah","Al Minufiyah","Al Minya","Al Qahirah","Al Qalyubiyah","Al Wadi al Jadid","Ash Sharqiyah","As Suways","Aswan","Asyut","Bani Suwayf","Bur Sa'id","Dumyat","Janub Sina'","Kafr ash Shaykh","Matruh","Qina","Shamal Sina'","Suhaj"),
new Array("El Salvador","Ahuachapan","Cabanas","Chalatenango","Cuscatlan","La Libertad","La Paz","La Union","Morazan","San Miguel","San Salvador","Santa Ana","San Vicente","Sonsonate","Usulutan"),
new Array("Equatorial Guinea","Annobon","Bioko Norte","Bioko Sur","Centro Sur","Kie-Ntem","Litoral","Wele-Nzas"),
new Array("Eritrea","Central","Anelba","Southern Red Sea","Northern Red Sea","Southern","Gash-Barka"),
new Array("Estonia","Harjumaa (Tallinn)","Hiiumaa (Kardla)","Ida-Virumaa (Johvi)","Jarvamaa (Paide)","Jogevamaa (Jogeva)","Laanemaa (Haapsalu)","Laane-Virumaa (Rakvere)","Parnumaa (Parnu)","Polvamaa (Polva)","Raplamaa (Rapla)","Saaremaa (Kuressaare)","Tartumaa (Tartu)","Valgamaa (Valga)","Viljandimaa (Viljandi)","Vorumaa (Voru)"),
new Array("Ethiopia","Adis Abeba (Addis Ababa)","Afar","Amara (Amhara)","Binshangul Gumuz","Dire Dawa","Gambela Hizboch (Gambela Peoples)","Hareri Hizb (Harari People)","Oromiya (Oromia)","Sumale (Somali)","Tigray","Ye Debub Biheroch Bihereseboch na Hizboch"),
new Array("Falkland Islands"),
new Array("Faroe Islands"),
new Array("Fiji","Central","Eastern","Northern","Rotuma","Western"),
new Array("Finland","Aland","Etela-Suomen Laani","Ita-Suomen Laani","Lansi-Suomen Laani","Lappi","Oulun Laani"),
new Array("France","Alsace","Aquitaine","Auvergne","Basse-Normandie","Bourgogne","Bretagne","Centre","Champagne-Ardenne","Corse","Franche-Comte","Haute-Normandie","Ile-de-France","Languedoc-Roussillon","Limousin","Lorraine","Midi-Pyrenees","Nord-Pas-de-Calais","Pays de la Loire","Picardie","Poitou-Charentes","Provence-Alpes-Cote d'Azur","Rhone-Alpes"),
new Array("Gabon","Estuaire","Haut-Ogooue","Moyen-Ogooue","Ngounie","Nyanga","Ogooue-Ivindo","Ogooue-Lolo","Ogooue-Maritime","Woleu-Ntem"),
new Array("Gambia","Banjul","Central River","Lower River","North Bank","Upper River","Western"),
new Array("Georgia","Abkhazia","Ajaria","Chiat'ura","Gori","Guria","Imereti","Kakheti","K'ut'aisi","Kvemo Kartli","Mtskheta-Mtianeti","P'ot'i","Racha-Lechkhumi","Kvemo Svaneti","Rust'avi","Samegrelo","Zemo Svaneti","Samtskhe-Javakheti","Shida Kartli","T'bilisi","Tqibuli","Tsqaltubo","Zugdidi"),
new Array("Germany","Baden-Wuerttemberg","Bayern","Berlin","Brandenburg","Bremen","Hamburg","Hessen","Mecklenburg-Vorpommern","Niedersachsen","Nordrhein-Westfalen","Rheinland-Pfalz","Saarland","Sachsen","Sachsen-Anhalt","Schleswig-Holstein","Thueringen"),
new Array("Ghana","Ashanti","Brong-Ahafo","Central","Eastern","Greater Accra","Northern","Upper East","Upper West","Volta","Western"),
new Array("Gibraltar"),
new Array("Greece","Agion Oros","Achaia","Aitolia kai Akarmania","Argolis","Arkadia","Arta","Attiki","Chalkidiki","Chanion","Chios","Dodekanisos","Drama","Evros","Evrytania","Evvoia","Florina","Fokidos","Fthiotis","Grevena","Ileia","Imathia","Ioannina","Irakleion","Karditsa","Kastoria","Kavala","Kefallinia","Kerkyra","Kilkis","Korinthia","Kozani","Kyklades","Lakonia","Larisa","Lasithi","Lefkas","Lesvos","Magnisia","Messinia","Pella","Pieria","Preveza","Rethynnis","Rodopi","Samos","Serrai","Thesprotia","Thessaloniki","Trikala","Voiotia","Xanthi","Zakynthos"),
new Array("Greenland","Avannaa (Nordgronland)","Tunu (Ostgronland)","Kitaa (Vestgronland)"),
new Array("Grenada","Carriacou and Petit Martinique","Saint Andrew","Saint David","Saint George","Saint John","Saint Mark","Saint Patrick"),
new Array("Guadeloupe"),
new Array("Guam"),
new Array("Guatemela","Alta Verapaz","Baja Verapaz","Chimaltenango","Chiquimula","El Progreso","Escuintla","Guatemala","Huehuetenango","Izabal","Jalapa","Jutiapa","Peten","Quetzaltenango","Quiche","Retalhuleu","Sacatepequez","San Marcos","Santa Rosa","Solola","Suchitepequez","Totonicapan","Zacapa"),
new Array("Guernsey","Saint Peter Port","Saint Sampson","Vale","Castel","Saint Saviour","Saint Pierre du Bois","Torteval","Forest","Saint Martin","Saint Andrew"),
new Array("Guiana"),
new Array("Guinea","Beyla","Boffa","Boke","Conakry","Coyah","Dabola","Dalaba","Dinguiraye","Dubreka","Faranah","Forecariah","Fria","Gaoual","Gueckedou","Kankan","Kerouane","Kindia","Kissidougou","Koubia","Koundara","Kouroussa","Labe","Lelouma","Lola","Macenta","Mali","Mamou","Mandiana","Nzerekore","Pita","Siguiri","Telimele","Tougue","Yomou"),
new Array("Guinea-Bissau","Bafata","Biombo","Bissau","Bolama","Cacheu","Gabu","Oio","Quinara","Tombali"),
new Array("Guyana","Barima-Waini","Cuyuni-Mazaruni","Demerara-Mahaica","East Berbice-Corentyne","Essequibo Islands-West Demerara","Mahaica-Berbice","Pomeroon-Supenaam","Potaro-Siparuni","Upper Demerara-Berbice","Upper Takutu-Upper Essequibo" ),
new Array("Haiti","Artibonite","Centre","Grand 'Anse","Nord","Nord-Est","Nord-Ouest","Ouest","Sud","Sud-Est"),
new Array("Heard Islands"),
new Array("Honduras","Atlantida","Choluteca","Colon","Comayagua","Copan","Cortes","El Paraiso","Francisco Morazan","Gracias a Dios","Intibuca","Islas de la Bahia","La Paz","Lempira","Ocotepeque","Olancho","Santa Barbara","Valle","Yoro"),
new Array("Hong Kong"),
new Array("Hungary","Bacs-Kiskun","Baranya","Bekes","Bekescsaba","Borsod-Abauj-Zemplen","Budapest","Csongrad","Debrecen","Dunaujvaros","Eger","Fejer","Gyor","Gyor-Moson-Sopron","Hajdu-Bihar","Heves","Hodmezovasarhely","Jasz-Nagykun-Szolnok","Kaposvar","Kecskemet","Komarom-Esztergom","Miskolc","Nagykanizsa","Nograd","Nyiregyhaza","Pecs","Pest","Somogy","Sopron","Szabolcs-Szatmar-Bereg","Szeged","Szekesfehervar","Szolnok","Szombathely","Tatabanya","Tolna","Vas","Veszprem","Veszprem","Zala","Zalaegerszeg"),
new Array("Iceland","Akranes","Akureyri","Arnessysla","Austur-Bardhastrandarsysla","Austur-Hunavatnssysla","Austur-Skaftafellssysla","Borgarfjardharsysla","Dalasysla","Eyjafjardharsysla","Gullbringusysla","Hafnarfjordhur","Husavik","Isafjordhur","Keflavik","Kjosarsysla","Kopavogur","Myrasysla","Neskaupstadhur","Nordhur-Isafjardharsysla","Nordhur-Mulasys-la","Nordhur-Thingeyjarsysla","Olafsfjordhur","Rangarvallasysla","Reykjavik","Saudharkrokur","Seydhisfjordhur","Siglufjordhur","Skagafjardharsysla","Snaefellsnes-og Hnappadalssysla","Strandasysla","Sudhur-Mulasysla","Sudhur-Thingeyjarsysla","Vesttmannaeyjar","Vestur-Bardhastrandarsysla","Vestur-Hunavatnssysla","Vestur-Isafjardharsysla","Vestur-Skaftafellssysla"),
new Array("India","Andaman and Nicobar Islands","Andhra Pradesh","Arunachal Pradesh","Assam","Bihar","Chandigarh","Chhattisgarh","Dadra and Nagar Haveli","Daman and Diu","Delhi","Goa","Gujarat","Haryana","Himachal Pradesh","Jammu and Kashmir","Jharkhand","Karnataka","Kerala","Lakshadweep","Madhya Pradesh","Maharashtra","Manipur","Meghalaya","Mizoram","Nagaland","Orissa","Pondicherry","Punjab","Rajasthan","Sikkim","Tamil Nadu","Tripura","Uttaranchal","Uttar Pradesh","West Bengal"),
new Array("Indonesia","Aceh","Bali","Banten","Bengkulu","Gorontalo","Jakarta Raya","Jambi","Jawa Barat","Jawa Tengah","Jawa Timur","Kalimantan Barat","Kalimantan Selatan","Kalimantan Tengah","Kalimantan Timur","Kepulauan Bangka Belitung","Lampung","Maluku","Maluku Utara","Nusa Tenggara Barat","Nusa Tenggara Timur","Papua","Riau","Sulawesi Selatan","Sulawesi Tengah","Sulawesi Tenggara","Sulawesi Utara","Sumatera Barat","Sumatera Selatan","Sumatera Utara","Yogyakarta"),
new Array("Iran","Ardabil","Azarbayjan-e Gharbi","Azarbayjan-e Sharqi","Bushehr","Chahar Mahall va Bakhtiari","Esfahan","Fars","Gilan","Golestan","Hamadan","Hormozgan","Ilam","Kerman","Kermanshah","Khorasan","Khuzestan","Kohkiluyeh va Buyer Ahmad","Kordestan","Lorestan","Markazi","Mazandaran","Qazvin","Qom","Semnan","Sistan va Baluchestan","Tehran","Yazd","Zanjan"),
new Array("Iraq","Al Anbar","Al Basrah","Al Muthanna","Al Qadisiyah","An Najaf","Arbil","As Sulaymaniyah","At Ta'mim","Babil","Baghdad","Dahuk","Dhi Qar","Diyala","Karbala'","Maysan","Ninawa","Salah ad Din","Wasit"),
new Array("Ireland","Carlow","Cavan","Clare","Cork","Donegal","Dublin","Galway","Kerry","Kildare","Kilkenny","Laois","Leitrim","Limerick","Longford","Louth","Mayo","Meath","Monaghan","Offaly","Roscommon","Sligo","Tipperary","Waterford","Westmeath","Wexford","Wicklow"),
new Array("Isle Of Man"),
new Array("Israel","Central","Haifa","Jerusalem","Northern","Southern","Tel Aviv"),
new Array("Italy","Abruzzi","Basilicata","Calabria","Campania","Emilia-Romagna","Friuli-Venezia Giulia","Lazio","Liguria","Lombardia","Marche","Molise","Piemonte","Puglia","Sardegna","Sicilia","Toscana","Trentino-Alto Adige","Umbria","Valle d'Aosta","Veneto"),
new Array("Jamaica","Clarendon","Hanover","Kingston","Manchester","Portland","Saint Andrew","Saint Ann","Saint Catherine","Saint Elizabeth","Saint James","Saint Mary","Saint Thomas","Trelawny","Westmoreland"),
new Array("Japan","Aichi","Akita","Aomori","Chiba","Ehime","Fukui","Fukuoka","Fukushima","Gifu","Gumma","Hiroshima","Hokkaido","Hyogo","Ibaraki","Ishikawa","Iwate","Kagawa","Kagoshima","Kanagawa","Kochi","Kumamoto","Kyoto","Mie","Miyagi","Miyazaki","Nagano","Nagasaki","Nara","Niigata","Oita","Okayama","Okinawa","Osaka","Saga","Saitama","Shiga","Shimane","Shizuoka","Tochigi","Tokushima","Tokyo","Tottori","Toyama","Wakayama","Yamagata","Yamaguchi","Yamanashi"),
new Array("Jersey"),
new Array("Jordan","Ajlun","Al 'Aqabah","Al Balqa'","Al Karak","Al Mafraq","'Amman","At Tafilah","Az Zarqa'","Irbid","Jarash","Ma'an","Madaba"),
new Array("Kazakhstan","Almaty Oblysy","Almaty Qalasy","Aqmola Oblysy (Astana)","Aqtobe Oblysy","Astana Qalasy","Atyrau Oblysy","Batys Qazaqstan Oblysy (Oral)","Bayqongyr Qalasy","Mangghystau Oblysy (Aqtau)","Ongtustik Qazaqstan Oblysy (Shymkent)","Pavlodar Oblysy","Qaraghandy Oblysy","Qostanay Oblysy","Qyzylorda Oblysy","Shyghys Qazaqstan Oblysy (Oskemen)","Soltustik Qazaqstan Oblysy (Petropavlovsk)","Zhambyl Oblysy (Taraz)"),
new Array("Kenya","Central","Coast","Eastern","Nairobi Area","North Eastern","Nyanza","Rift Valley","Western"),
new Array("Kiribati","Gilbert Islands","Line Islands","Phoenix Islands"),
new Array("South Korea","Cheju-do","Cholla-bukto","Cholla-namdo","Ch'ungch'ong-bukto","Ch'ungch'ong-namdo","Inch'on-gwangyoksi","Kangwon-do","Kwangju-gwangyoksi","Kyonggi-do","Kyongsang-bukto","Kyongsang-namdo","Pusan-gwangyoksi","Soul-t'ukpyolsi","Taegu-gwangyoksi","Taejon-gwangyoksi","Ulsan-gwangyoksi"),
new Array("North Korea","Chagang-do (Chagang Province)","Hamgyong-bukto (North Hamgyong Province)","Hamgyong-namdo (South Hamgyong Province)","Hwanghae-bukto (North Hwanghae Province)","Hwanghae-namdo (South Hwanghae Province)","Kaesong-si (Kaesong City)","Kangwon-do (Kangwon Province)","Najin Sonbong-si","Namp'o-si (Namp'o City)","P'yongan-bukto (North P'yongan Province)","P'yongan-namdo (South P'yongan Province)","P'yongyang-si (Pyongyang City)","Yanggang-do (Yanggang Province)"),
new Array("Kuwait","Al Ahmadi","Al Farwaniyah","Al 'Asimah","Al Jahra'","Hawalli"),
new Array("Kyrgyzstan","Batken Oblasty","Bishkek Shaary","Chuy Oblasty (Bishkek)","Jalal-Abad Oblasty","Naryn Oblasty","Osh Oblasty","Talas Oblasty","Ysyk-Kol Oblasty (Karakol)"),
new Array("Laos","Attapu","Bokeo","Bolikhamxai","Champasak","Houaphan","Khammouan","Louangnamtha","Louangphabang","Oudomxai","Phongsali","Salavan","Savannakhet","Viangchan","Viangchan","Xaignabouli","Xaisomboun","Xekong","Xiangkhoang"),
new Array("Latvia","Aizkraukles Rajons","Aluksnes Rajons","Balvu Rajons","Bauskas Rajons","Cesu Rajons","Daugavpils","Daugavpils Rajons","Dobeles Rajons","Gulbenes Rajons","Jekabpils Rajons","Jelgava","Jelgavas Rajons","Jurmala","Kraslavas Rajons","Kuldigas Rajons","Liepaja","Liepajas Rajons","Limbazu Rajons","Ludzas Rajons","Madonas Rajons","Ogres Rajons","Preilu Rajons","Rezekne","Rezeknes Rajons","Riga","Rigas Rajons","Saldus Rajons","Talsu Rajons","Tukuma Rajons","Valkas Rajons","Valmieras Rajons","Ventspils","Ventspils Rajons"),
new Array("Lebanon","Beyrouth","Beqaa","Liban-Nord","Liban-Sud","Mont-Liban","Nabatiye"),
new Array("Lesotho","Berea","Butha-Buthe","Leribe","Mafeteng","Maseru","Mohales Hoek","Mokhotlong","Qacha's Nek","Quthing","Thaba-Tseka"),
new Array("Liberia","Bomi","Bong","Gparbolu","Grand Bassa","Grand Cape Mount","Grand Gedeh","Grand Kru","Lofa","Margibi","Maryland","Montserrado","Nimba","River Cess","River Gee","Sinoe"),
new Array("Libya","Ajdabiya","Al 'Aziziyah","Al Fatih","Al Jabal al Akhdar","Al Jufrah","Al Khums","Al Kufrah","An Nuqat al Khams","Ash Shati'","Awbari","Az Zawiyah","Banghazi","Darnah","Ghadamis","Gharyan","Misratah","Murzuq","Sabha","Sawfajjin","Surt","Tarabulus","Tarhunah","Tubruq","Yafran","Zlitan"),
new Array("Liechtenstein","Balzers","Eschen","Gamprin","Mauren","Planken","Ruggell","Schaan","Schellenberg","Triesen","Triesenberg","Vaduz"),
new Array("Lithuania","Alytaus","Kauno","Klaipedos","Marijampoles","Panevezio","Siauliu","Taurages","Telsiu","Utenos","Vilniaus"),
new Array("Luxembourg","Diekirch","Grevenmacher","Luxembourg"),
new Array("Macau"),
new Array("Macedonia","Aracinovo","Bac","Belcista","Berovo","Bistrica","Bitola","Blatec","Bogdanci","Bogomila","Bogovinje","Bosilovo","Brvenica","Cair (Skopje)","Capari","Caska","Cegrane","Centar (Skopje)","Centar Zupa","Cesinovo","Cucer-Sandevo","Debar","Delcevo","Delogozdi","Demir Hisar","Demir Kapija","Dobrusevo","Dolna Banjica","Dolneni","Dorce Petrov (Skopje)","Drugovo","Dzepciste","Gazi Baba (Skopje)","Gevgelija","Gostivar","Gradsko","Ilinden","Izvor","Jegunovce","Kamenjane","Karbinci","Karpos (Skopje)","Kavadarci","Kicevo","Kisela Voda (Skopje)","Klecevce","Kocani","Konce","Kondovo","Konopiste","Kosel","Kratovo","Kriva Palanka","Krivogastani","Krusevo","Kuklis","Kukurecani","Kumanovo","Labunista","Lipkovo","Lozovo","Lukovo","Makedonska Kamenica","Makedonski Brod","Mavrovi Anovi","Meseista","Miravci","Mogila","Murtino","Negotino","Negotino-Polosko","Novaci","Novo Selo","Oblesevo","Ohrid","Orasac","Orizari","Oslomej","Pehcevo","Petrovec","Plasnica","Podares","Prilep","Probistip","Radovis","Rankovce","Resen","Rosoman","Rostusa","Samokov","Saraj","Sipkovica","Sopiste","Sopotnica","Srbinovo","Star Dojran","Staravina","Staro Nagoricane","Stip","Struga","Strumica","Studenicani","Suto Orizari (Skopje)","Sveti Nikole","Tearce","Tetovo","Topolcani","Valandovo","Vasilevo","Velesta","Veles","Vevcani","Vinica","Vitoliste","Vranestica","Vrapciste","Vratnica","Vrutok","Zajas","Zelenikovo","Zeleno","Zitose","Zletovo","Zrnovci"),
new Array("Madagascar","Antananarivo","Antsiranana","Fianarantsoa","Mahajanga","Toamasina","Toliara"),
new Array("Malawi","Balaka","Blantyre","Chikwawa","Chiradzulu","Chitipa","Dedza","Dowa","Karonga","Kasungu","Likoma","Lilongwe","Machinga (Kasupe)","Mangochi","Mchinji","Mulanje","Mwanza","Mzimba","Ntcheu","Nkhata Bay","Nkhotakota","Nsanje","Ntchisi","Phalombe","Rumphi","Salima","Thyolo","Zomba"),
new Array("Malaysia","Johor","Kedah","Kelantan","Labuan","Melaka","Negeri Sembilan","Pahang","Perak","Perlis","Pulau Pinang","Putrajaya","Sabah","Sarawak","Selangor","Terengganu","Wilayah Persekutuan"),
new Array("Maldives","Alifu","Baa","Dhaalu","Faafu","Gaafu Alifu","Gaafu Dhaalu","Gnaviyani","Haa Alifu","Haa Dhaalu","Kaafu","Laamu","Lhaviyani","Maale","Meemu","Noonu","Raa","Seenu","Shaviyani","Thaa","Vaavu"),
new Array("Mali","Gao","Kayes","Kidal","Koulikoro","Mopti","Segou","Sikasso","Tombouctou"),
new Array("Malta"),
new Array("Marshall Islands","Ailinginae","Ailinglaplap","Ailuk","Arno","Aur","Bikar","Bikini","Bokak","Ebon","Enewetak","Erikub","Jabat","Jaluit","Jemo","Kili","Kwajalein","Lae","Lib","Likiep","Majuro","Maloelap","Mejit","Mili","Namorik","Namu","Rongelap","Rongrik","Toke","Ujae","Ujelang","Utirik","Wotho","Wotje"),
new Array("Martinique"),
new Array("Mauritania","Adrar","Assaba","Brakna","Dakhlet Nouadhibou","Gorgol","Guidimaka","Hodh Ech Chargui","Hodh El Gharbi","Inchiri","Nouakchott","Tagant","Tiris Zemmour","Trarza"),
new Array("Mauritius","Agalega Islands","Black River","Cargados Carajos Shoals","Flacq","Grand Port","Moka","Pamplemousses","Plaines Wilhems","Port Louis","Riviere du Rempart","Rodrigues","Savanne"),
new Array("Mayotte"),
new Array("Mexico","Aguascalientes","Baja California","Baja California Sur","Campeche","Chiapas","Chihuahua","Coahuila de Zaragoza","Colima","Distrito Federal","Durango","Guanajuato","Guerrero","Hidalgo","Jalisco","Mexico","Michoacan de Ocampo","Morelos","Nayarit","Nuevo Leon","Oaxaca","Puebla","Queretaro de Arteaga","Quintana Roo","San Luis Potosi","Sinaloa","Sonora","Tabasco","Tamaulipas","Tlaxcala","Veracruz-Llave","Yucatan","Zacatecas"),
new Array("Micronesia","Chuuk (Truk)","Kosrae (Kosaie)","Pohnpei (Ponape)","Yap"),
new Array("Moldova","Balti","Cahul","Chisinau","Chisinau","Edinet","Gagauzia","Lapusna","Orhei","Soroca","Stinga Nistrului","Tighina","Ungheni"),
new Array("Monaco","Fontvieille","La Condamine","Monaco-Ville","Monte-Carlo"),
new Array("Mongolia","Arhangay","Bayanhongor","Bayan-Olgiy","Bulgan","Darhan Uul","Dornod","Dornogovi","Dundgovi","Dzavhan","Govi-Altay","Govi-Sumber","Hentiy","Hovd","Hovsgol","Omnogovi","Orhon","Ovorhangay","Selenge","Suhbaatar","Tov","Ulaanbaatar","Uvs"),
new Array("Montserrat","Saint Anthony","Saint Georges","Saint Peter"),
new Array("Morocco","Agadir","Al Hoceima","Azilal","Beni Mellal","Ben Slimane","Boulemane","Casablanca","Chaouen","El Jadida","El Kelaa des Sraghna","Er Rachidia","Essaouira","Fes","Figuig","Guelmim","Ifrane","Kenitra","Khemisset","Khenifra","Khouribga","Laayoune","Larache","Marrakech","Meknes","Nador","Ouarzazate","Oujda","Rabat-Sale","Safi","Settat","Sidi Kacem","Tanger","Tan-Tan","Taounate","Taroudannt","Tata","Taza","Tetouan","Tiznit"),
new Array("Mozambique","Cabo Delgado","Gaza","Inhambane","Manica","Maputo","Maputo City","Nampula","Niassa","Sofala","Tete","Zambezia"),
new Array("Namibia","Caprivi","Erongo","Hardap","Karas","Khomas","Kunene","Ohangwena","Okavango","Omaheke","Omusati","Oshana","Oshikoto","Otjozondjupa"),
new Array("Nauru","Aiwo","Anabar","Anetan","Anibare","Baiti","Boe","Buada","Denigomodu","Ewa","Ijuw","Meneng","Nibok","Uaboe","Yaren"),
new Array("Nepal","Bagmati","Bheri","Dhawalagiri","Gandaki","Janakpur","Karnali","Kosi","Lumbini","Mahakali","Mechi","Narayani","Rapti","Sagarmatha","Seti"),
new Array("Netherlands","Drenthe","Flevoland","Friesland","Gelderland","Groningen","Limburg","Noord-Brabant","Noord-Holland","Overijssel","Utrecht","Zeeland","Zuid-Holland"),
new Array("Netherlands Antilles"),
new Array("New Caledonia","Iles Loyaute","Nord","Sud"),
new Array("New Zealand","Auckland","Bay of Plenty","Canterbury","Gisborne","Hawke's Bay","Marlborough","Nelson","Northland","Otago","Southland","Taranaki","Tasman","Waikato","Manawatu-Wanganui","Wellington","West Coast"),
new Array("Nicaragua"," Atlantico Norte","Atlantico Sur","Boaco","Carazo","Chinandega","Chontales","Esteli","Granada","Jinotega","Leon","Madriz","Managua","Masaya","Matagalpa","Nueva Segovia","Rio San Juan","Rivas"),
new Array("Niger","Agadez","Diffa","Dosso","Maradi","Niamey","Tahoua","Tillaberi","Zinder"),
new Array("Nigeria","Abia","Abuja Federal Capital Territory","Adamawa","Akwa Ibom","Anambra","Bauchi","Bayelsa","Benue","Borno","Cross River","Delta","Ebonyi","Edo","Ekiti","Enugu","Gombe","Imo","Jigawa","Kaduna","Kano","Katsina","Kebbi","Kogi","Kwara","Lagos","Nassarawa","Niger","Ogun","Ondo","Osun","Oyo","Plateau","Rivers","Sokoto","Taraba","Yobe","Zamfara"),
new Array("Niue"),
new Array("Norfolk Island"),
new Array("Norway","Akershus","Aust-Agder","Buskerud","Finnmark","Hedmark","Hordaland","More og Romsdal","Nordland","Nord-Trondelag","Oppland","Oslo","Ostfold","Rogaland","Sogn og Fjordane","Sor-Trondelag","Telemark","Troms","Vest-Agder","Vestfold"),
new Array("Oman","Ad Dakhiliyah","Al Batinah","Al Wusta","Ash Sharqiyah","Az Zahirah","Masqat","Musandam","Zufar"),
new Array("Pakistan","Balochistan","Federally Administered Tribal Areas","Islamabad Capital Territory","North-West Frontier Province","Punjab","Sindh"),
new Array("Palau","Aimeliik","Airai","Angaur","Hatobohei","Kayangel","Koror","Melekeok","Ngaraard","Ngarchelong","Ngardmau","Ngatpang","Ngchesar","Ngeremlengui","Ngiwal","Peleliu","Sonsoral"),
new Array("Panama","Bocas del Toro","Chiriqui","Cocle","Colon","Darien","Herrera","Los Santos","Panama","San Blas","and Veraguas"),
new Array("Papua New Guinea","Bougainville","Central","Chimbu","Eastern Highlands","East New Britain","East Sepik","Enga","Gulf","Madang","Manus","Milne Bay","Morobe","National Capital","New Ireland","Northern","Sandaun","Southern Highlands","Western","Western Highlands","West New Britain"),
new Array("Paraguay","Alto Paraguay","Alto Parana","Amambay","Asuncion","Boqueron","Caaguazu","Caazapa","Canindeyu","Central","Concepcion","Cordillera","Guaira","Itapua","Misiones","Neembucu","Paraguari","Presidente Hayes","San Pedro"),
new Array("Peru","Amazonas","Ancash","Apurimac","Arequipa","Ayacucho","Cajamarca","Callao","Cusco","Huancavelica","Huanuco","Ica","Junin","La Libertad","Lambayeque","Lima","Loreto","Madre de Dios","Moquegua","Pasco","Piura","Puno","San Martin","Tacna","Tumbes","Ucayali"),
new Array("Philippines","Abra","Agusan del Norte","Agusan del Sur","Aklan","Albay","Angeles","Antique","Aurora","Bacolod","Bago","Baguio","Bais","Basilan","Basilan City","Bataan","Batanes","Batangas","Batangas City","Benguet","Bohol","Bukidnon","Bulacan","Butuan","Cabanatuan","Cadiz","Cagayan","Cagayan de Oro","Calbayog","Caloocan","Camarines Norte","Camarines Sur","Camiguin","Canlaon","Capiz","Catanduanes","Cavite","Cavite City","Cebu","Cebu City","Cotabato","Dagupan","Danao","Dapitan","Davao City","Davao del Norte","Davao del Sur","Davao Oriental","Dipolog","Dumaguete","Eastern Samar","General Santos","Gingoog","Ifugao","Iligan","Ilocos Norte","Ilocos Sur","Iloilo","Iloilo City","Iriga","Isabela","Kalinga-Apayao","La Carlota","Laguna","Lanao del Norte","Lanao del Sur","Laoag","Lapu-Lapu","La Union","Legaspi","Leyte","Lipa","Lucena","Maguindanao","Mandaue","Manila","Marawi","Marinduque","Masbate","Mindoro Occidental","Mindoro Oriental","Misamis Occidental","Misamis Oriental","Mountain","Naga","Negros Occidental","Negros Oriental","North Cotabato","Northern Samar","Nueva Ecija","Nueva Vizcaya","Olongapo","Ormoc","Oroquieta","Ozamis","Pagadian","Palawan","Palayan","Pampanga","Pangasinan","Pasay","Puerto Princesa","Quezon","Quezon City","Quirino","Rizal","Romblon","Roxas","Samar","San Carlos (in Negros Occidental)","San Carlos (in Pangasinan)","San Jose","San Pablo","Silay","Siquijor","Sorsogon","South Cotabato","Southern Leyte","Sultan Kudarat","Sulu","Surigao","Surigao del Norte","Surigao del Sur","Tacloban","Tagaytay","Tagbilaran","Tangub","Tarlac","Tawi-Tawi","Toledo","Trece Martires","Zambales","Zamboanga","Zamboanga del Norte","Zamboanga del Sur"),
new Array("Pitcairn"),
new Array("Poland","Dolnoslaskie","Kujawsko-Pomorskie","Lodzkie","Lubelskie","Lubuskie","Malopolskie","Mazowieckie","Opolskie","Podkarpackie","Podlaskie","Pomorskie","Slaskie","Swietokrzyskie","Warminsko-Mazurskie","Wielkopolskie","Zachodniopomorskie"),
new Array("Portugal","Aveiro","Acores (Azores)","Beja","Braga","Braganca","Castelo Branco","Coimbra","Evora","Faro","Guarda","Leiria","Lisboa","Madeira","Portalegre","Porto","Santarem","Setubal","Viana do Castelo","Vila Real","Viseu"),
new Array("Puerto Rico","Adjuntas","Aguada","Aguadilla","Aguas Buenas","Aibonito","Anasco","Arecibo","Arroyo","Barceloneta","Barranquitas","Bayamon","Cabo Rojo","Caguas","Camuy","Canovanas","Carolina","Catano","Cayey","Ceiba","Ciales","Cidra","Coamo","Comerio","Corozal","Culebra","Dorado","Fajardo","Florida","Guanica","Guayama","Guayanilla","Guaynabo","Gurabo","Hatillo","Hormigueros","Humacao","Isabela","Jayuya","Juana Diaz","Juncos","Lajas","Lares","Las Marias","Las Piedras","Loiza","Luquillo","Manati","Maricao","Maunabo","Mayaguez","Moca","Morovis","Naguabo","Naranjito","Orocovis","Patillas","Penuelas","Ponce","Quebradillas","Rincon","Rio Grande","Sabana Grande","Salinas","San German","San Juan","San Lorenzo","San Sebastian","Santa Isabel","Toa Alta","Toa Baja","Trujillo Alto","Utuado","Vega Alta","Vega Baja","Vieques","Villalba","Yabucoa","Yauco"),
new Array("Qatar","Ad Dawhah","Al Ghuwayriyah","Al Jumayliyah","Al Khawr","Al Wakrah","Ar Rayyan","Jarayan al Batinah","Madinat ash Shamal","Umm Sa'id","Umm Salal"),
new Array("Reunion"),
new Array("Romania","Alba","Arad","Arges","Bacau","Bihor","Bistrita-Nasaud","Botosani","Braila","Brasov","Bucuresti","Buzau","Calarasi","Caras-Severin","Cluj","Constanta","Covasna","Dimbovita","Dolj","Galati","Gorj","Giurgiu","Harghita","Hunedoara","Ialomita","Iasi","Ilfov","Maramures","Mehedinti","Mures","Neamt","Olt","Prahova","Salaj","Satu Mare","Sibiu","Suceava","Teleorman","Timis","Tulcea","Vaslui","Vilcea","Vrancea"),
new Array("Russian Federation","Adygeya (Maykop)","Aginskiy Buryatskiy (Aginskoye)","Altay (Gorno-Altaysk)","Altayskiy (Barnaul)","Amurskaya (Blagoveshchensk)","Arkhangel'skaya","Astrakhanskaya","Bashkortostan (Ufa)","Belgorodskaya","Bryanskaya","Buryatiya (Ulan-Ude)","Chechnya (Groznyy)","Chelyabinskaya","Chitinskaya","Chukotskiy (Anadyr')","Chuvashiya (Cheboksary)","Dagestan (Makhachkala)","Evenkiyskiy (Tura)","Ingushetiya (Nazran')","Irkutskaya","Ivanovskaya","Kabardino-Balkariya (Nal'chik)","Kaliningradskaya","Kalmykiya (Elista)","Kaluzhskaya","Kamchatskaya (Petropavlovsk-Kamchatskiy)","Karachayevo-Cherkesiya (Cherkessk)","Kareliya (Petrozavodsk)","Kemerovskaya","Khabarovskiy","Khakasiya (Abakan)","Khanty-Mansiyskiy (Khanty-Mansiysk)","Kirovskaya","Komi (Syktyvkar)","Koryakskiy (Palana)","Kostromskaya","Krasnodarskiy","Krasnoyarskiy","Kurganskaya","Kurskaya","Leningradskaya","Lipetskaya","Magadanskaya","Mariy-El (Yoshkar-Ola)","Mordoviya (Saransk)","Moskovskaya","Moskva (Moscow)","Murmanskaya","Nenetskiy (Nar'yan-Mar)","Nizhegorodskaya","Novgorodskaya","Novosibirskaya","Omskaya","Orenburgskaya","Orlovskaya (Orel)","Penzenskaya","Permskaya","Komi-Permyatskiy (Kudymkar)","Primorskiy (Vladivostok)","Pskovskaya","Rostovskaya","Ryazanskaya","Sakha (Yakutiya)","Sakhalinskaya (Yuzhno-Sakhalinsk)","Samarskaya","Sankt-Peterburg (Saint Petersburg)","Saratovskaya","Severnaya Osetiya-Alaniya [North Ossetia] (Vladikavkaz)","Smolenskaya","Stavropol'skiy","Sverdlovskaya (Yekaterinburg)","Tambovskaya","Tatarstan (Kazan')","Taymyrskiy (Dudinka)","Tomskaya","Tul'skaya","Tverskaya","Tyumenskaya","Tyva (Kyzyl)","Udmurtiya (Izhevsk)","Ul'yanovskaya","Ust'-Ordynskiy Buryatskiy (Ust'-Ordynskiy)","Vladimirskaya","Volgogradskaya","Vologodskaya","Voronezhskaya","Yamalo-Nenetskiy (Salekhard)","Yaroslavskaya","Yevreyskaya"),
new Array("Rwanda","Butare","Byumba","Cyangugu","Gikongoro","Gisenyi","Gitarama","Kibungo","Kibuye","Kigali Rurale","Kigali-ville","Umutara","Ruhengeri"),
new Array("Saint Helena","Ascension","Saint Helena","Tristan da Cunha"),
new Array("Saint Kitts","Christ Church Nichola Town","Saint Anne Sandy Point","Saint George Basseterre","Saint George Gingerland","Saint James Windward","Saint John Capesterre","Saint John Figtree","Saint Mary Cayon","Saint Paul Capesterre","Saint Paul Charlestown","Saint Peter Basseterre","Saint Thomas Lowland","Saint Thomas Middle Island","Trinity Palmetto Point"),
new Array("Saint Lucia","Anse-la-Raye","Castries","Choiseul","Dauphin","Dennery","Gros-Islet","Laborie","Micoud","Praslin","Soufriere","Vieux-Fort"),
new Array("Saint Pierre"),
new Array("Saint Vincent","Charlotte","Grenadines","Saint Andrew","Saint David","Saint George","Saint Patrick"),
new Array("Samoa","A'ana","Aiga-i-le-Tai","Atua","Fa'asaleleaga","Gaga'emauga","Gagaifomauga","Palauli","Satupa'itea","Tuamasaga","Va'a-o-Fonoti","Vaisigano"),
new Array("San Marino","Acquaviva","Borgo Maggiore","Chiesanuova","Domagnano","Faetano","Fiorentino","Monte Giardino","San Marino","Serravalle"),
new Array("Sao Tome and Principe","Principe","Sao Tome"),
new Array("Saudi Arabia","Al Bahah","Al Hudud ash Shamaliyah","Al Jawf","Al Madinah","Al Qasim","Ar Riyad","Ash Sharqiyah (Eastern Province)","'Asir","Ha'il","Jizan","Makkah","Najran","Tabuk"),
new Array("Senegal","Dakar","Diourbel","Fatick","Kaolack","Kolda","Louga","Saint-Louis","Tambacounda","Thies","Ziguinchor"),
new Array("Seychelles","Anse aux Pins","Anse Boileau","Anse Etoile","Anse Louis","Anse Royale","Baie Lazare","Baie Sainte Anne","Beau Vallon","Bel Air","Bel Ombre","Cascade","Glacis","Grand' Anse (on Mahe)","Grand' Anse (on Praslin)","La Digue","La Riviere Anglaise","Mont Buxton","Mont Fleuri","Plaisance","Pointe La Rue","Port Glaud","Saint Louis","Takamaka"),
new Array("Sierra Leone","Eastern","Northern","Southern","Western"),
new Array("Singapore"),
new Array("Slovakia","Banskobystricky","Bratislavsky","Kosicky","Nitriansky","Presovsky","Trenciansky","Trnavsky","Zilinsky"),
new Array("Solomon Islands","Central","Choiseul (Lauru)","Guadalcanal","Honiara","Isabel","Makira","Malaita","Rennell/Bellona","Temotu","Western"),
new Array("Somalia","Awdal","Bakool","Banaadir","Bari","Bay","Galguduud","Gedo","Hiiraan","Jubbada Dhexe","Jubbada Hoose","Mudug","Nugaal","Sanaag","Shabeellaha Dhexe","Shabeellaha Hoose","Sool","Togdheer","Woqooyi Galbeed"),
new Array("South Africa","Eastern Cape","Free State","Gauteng","KwaZulu-Natal","Limpopo","Mpumalanga","North-West","Northern Cape","Western Cape"),
new Array("South Georgia"),
new Array("Spain","Andalucia","Aragon","Asturias","Baleares (Balearic Islands)","Ceuta","Canarias (Canary Islands)","Cantabria","Castilla-La Mancha","Castilla y Leon","Cataluna","Communidad Valencian","Extremadura","Galicia","La Rioja","Madrid","Melilla","Murcia","Navarra","Pais Vasco"),
new Array("Sri Lanka","Central","North Central","North Eastern","North Western","Sabaragamuwa","Southern","Uva","Western"),
new Array("Sudan","A'ali an Nil","Al Bahr al Ahmar","Al Buhayrat","Al Jazirah","Al Khartum","Al Qadarif","Al Wahdah","An Nil al Abyad","An Nil al Azraq","Ash Shamaliyah","Bahr al Jabal","Gharb al Istiwa'iyah","Gharb Bahr al Ghazal","Gharb Darfur","Gharb Kurdufan","Janub Darfur","Janub Kurdufan","Junqali","Kassala","Nahr an Nil","Shamal Bahr al Ghazal","Shamal Darfur","Shamal Kurdufan","Sharq al Istiwa'iyah","Sinnar","Warab"),
new Array("Suriname","Brokopondo","Commewijne","Coronie","Marowijne","Nickerie","Para","Paramaribo","Saramacca","Sipaliwini","Wanica"),
new Array("Svalbard"),
new Array("Swaziland","Hhohho","Lubombo","Manzini","Shiselweni"),
new Array("Sweden","Blekinge","Dalarnas","Gavleborgs","Gotlands","Hallands","Jamtlands","Jonkopings","Kalmar","Kronobergs","Norrbottens","Orebro","Ostergotlands","Skane","Sodermanlands","Stockholms","Uppsala","Varmlands","Vasterbottens","Vasternorrlands","Vastmanlands","Vastra Gotalands"),
new Array("Switzerland","Aargau","Appenzell Ausser-Rhoden","Appenzell Inner-Rhoden","Basel-Landschaft","Basel-Stadt","Bern","Fribourg","Geneve","Glarus","Graubunden","Jura","Luzern","Neuchatel","Nidwalden","Obwalden","Sankt Gallen","Schaffhausen","Schwyz","Solothurn","Thurgau","Ticino","Uri","Valais","Vaud","Zug","Zurich"),
new Array("Syria","Al Hasakah","Al Ladhiqiyah","Al Qunaytirah","Ar Raqqah","As Suwayda'","Dar'a","Dayr az Zawr","Dimashq","Halab","Hamah","Hims","Idlib","Rif Dimashq","Tartus"),
new Array("Tajikista","Viloyati Mukhtori Kuhistoni Badakhshon (Khorugh)","Viloyati Khatlon (Qurghonteppa)","Viloyati Sughd (Khujand)"),
new Array("Tanzania","Arusha","Dar es Salaam","Dodoma","Iringa","Kagera","Kigoma","Kilimanjaro","Lindi","Mara","Mbeya","Morogoro","Mtwara","Mwanza","Pemba North","Pemba South","Pwani","Rukwa","Ruvuma","Shinyanga","Singida","Tabora","Tanga","Zanzibar Central/South","Zanzibar North","Zanzibar Urban/West"),
new Array("Thailand","Amnat Charoen","Ang Thong","Buriram","Chachoengsao","Chai Nat","Chaiyaphum","Chanthaburi","Chiang Mai","Chiang Rai","Chon Buri","Chumphon","Kalasin","Kamphaeng Phet","Kanchanaburi","Khon Kaen","Krabi","Krung Thep Mahanakhon (Bangkok)","Lampang","Lamphun","Loei","Lop Buri","Mae Hong Son","Maha Sarakham","Mukdahan","Nakhon Nayok","Nakhon Pathom","Nakhon Phanom","Nakhon Ratchasima","Nakhon Sawan","Nakhon Si Thammarat","Nan","Narathiwat","Nong Bua Lamphu","Nong Khai","Nonthaburi","Pathum Thani","Pattani","Phangnga","Phatthalung","Phayao","Phetchabun","Phetchaburi","Phichit","Phitsanulok","Phra Nakhon Si Ayutthaya","Phrae","Phuket","Prachin Buri","Prachuap Khiri Khan","Ranong","Ratchaburi","Rayong","Roi Et","Sa Kaeo","Sakon Nakhon","Samut Prakan","Samut Sakhon","Samut Songkhram","Sara Buri","Satun","Sing Buri","Sisaket","Songkhla","Sukhothai","Suphan Buri","Surat Thani","Surin","Tak","Trang","Trat","Ubon Ratchathani","Udon Thani","Uthai Thani","Uttaradit","Yala","Yasothon"),
new Array("Togo","De La Kara","Des Plateaux","Des Savanes","Centrale","Maritime"),
new Array("Tokelau"),
new Array("Tonga","Ha'apai","Tongatapu","Vava'u"),
new Array("Trinidad and Tobago","Arima","Caroni","Mayaro","Nariva","Port-of-Spain","Saint Andrew","Saint David","Saint George","Saint Patrick","San Fernando","Tobago","Victoria"),
new Array("Tunisia","Ariana (Aryanah)","Beja (Bajah)","Ben Arous (Bin 'Arus)","Bizerte (Banzart)","Gabes (Qabis)","Gafsa (Qafsah)","Jendouba (Jundubah)","Kairouan (Al Qayrawan)","Kasserine (Al Qasrayn)","Kebili (Qibili)","Kef (Al Kaf)","Mahdia (Al Mahdiyah)","Manouba (Manubah)","Medenine (Madanin)","Monastir (Al Munastir)","Nabeul (Nabul)","Sfax (Safaqis)","Sidi Bou Zid (Sidi Bu Zayd)","Siliana (Silyanah)","Sousse (Susah)","Tataouine (Tatawin)","Tozeur (Tawzar)","Tunis","Zaghouan (Zaghwan)"),
new Array("Turkey","Adana","Adiyaman","Afyon","Agri","Aksaray","Amasya","Ankara","Antalya","Ardahan","Artvin","Aydin","Balikesir","Bartin","Batman","Bayburt","Bilecik","Bingol","Bitlis","Bolu","Burdur","Bursa","Canakkale","Cankiri","Corum","Denizli","Diyarbakir","Duzce","Edirne","Elazig","Erzincan","Erzurum","Eskisehir","Gaziantep","Giresun","Gumushane","Hakkari","Hatay","Igdir","Isparta","Istanbul","Izmir","Kahramanmaras","Karabuk","Karaman","Kars","Kastamonu","Kayseri","Kilis","Kirikkale","Kirklareli","Kirsehir","Kocaeli","Konya","Kutahya","Malatya","Manisa","Mardin","Mersin","Mugla","Mus","Nevsehir","Nigde","Ordu","Osmaniye","Rize","Sakarya","Samsun","Sanliurfa","Siirt","Sinop","Sirnak","Sivas","Tekirdag","Tokat","Trabzon","Tunceli","Usak","Van","Yalova","Yozgat","Zonguldak"),
new Array("Turkmenistan","Ahal Welayaty (Ashgabat)","Balkan Welayaty (Balkanabat)","Dashoguz Welayaty","Lebap Welayaty (Turkmenabat)","Mary Welayaty"),
new Array("Tuvalu"),
new Array("Uganda","Adjumani","Apac","Arua","Bugiri","Bundibugyo","Bushenyi","Busia","Gulu","Hoima","Iganga","Jinja","Kabale","Kabarole","Kalangala","Kampala","Kamuli","Kamwenge","Kanungu","Kapchorwa","Kasese","Katakwi","Kayunga","Kibale","Kiboga","Kisoro","Kitgum","Kotido","Kumi","Kyenjojo","Lira","Luwero","Masaka","Masindi","Mayuge","Mbale","Mbarara","Moroto","Moyo","Mpigi","Mubende","Mukono","Nakapiripirit","Nakasongola","Nebbi","Ntungamo","Pader","Pallisa","Rakai","Rukungiri","Sembabule","Sironko","Soroti","Tororo","Wakiso","Yumbe"),
new Array("Ukraine","Cherkas'ka (Cherkasy)","Chernihivs'ka (Chernihiv)","Chernivets'ka (Chernivtsi)","Dnipropetrovs'ka (Dnipropetrovs'k)","Donets'ka (Donets'k)","Ivano-Frankivs'ka (Ivano-Frankivs'k)","Kharkivs'ka (Kharkiv)","Khersons'ka (Kherson)","Khmel'nyts'ka (Khmel'nyts'kyy)","Kirovohrads'ka (Kirovohrad)","Kyyiv","Kyyivs'ka (Kiev)","Luhans'ka (Luhans'k)","L'vivs'ka (L'viv)","Mykolayivs'ka (Mykolayiv)","Odes'ka (Odesa)","Poltavs'ka (Poltava)","Avtonomna Respublika Krym (Simferopol')","Rivnens'ka (Rivne)","Sevastopol'","Sums'ka (Sumy)","Ternopil's'ka (Ternopil')","Vinnyts'ka (Vinnytsya)","Volyns'ka (Luts'k)","Zakarpats'ka (Uzhhorod)","Zaporiz'ka (Zaporizhzhya)","Zhytomyrs'ka (Zhytomyr)"),
new Array("United Arab Emirates","Abu Zaby (Abu Dhabi)","'Ajman","Al Fujayrah","Ash Shariqah (Sharjah)","Dubayy (Dubai)","Ra's al Khaymah","Umm al Qaywayn"),
new Array("United Kingdom"),
new Array("United States","Alaska","Alabama","Arkansas","Arizona","California","Colorado","Connecticut","District of Columbia","Delaware","Florida","Georgia","Hawaii","Iowa","Idaho","Illinois","Indiana","Kansas","Kentucky","Louisiana","Massachussets","Maryland","Maine","Michigan","Minnesota","Missouri","Mississippi","Montana","North Carolina","North Dakota","Nebraska","New Hampshire","New Jersey","New Mexico","Nevada","New York","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Virginia","Vermont","Washington","Wisconsin","West Virginia","Wyoming"),
new Array("Uruguay","Artigas","Canelones","Cerro Largo","Colonia","Durazno","Flores","Florida","Lavalleja","Maldonado","Montevideo","Paysandu","Rio Negro","Rivera","Rocha","Salto","San Jose","Soriano","Tacuarembo","Treinta y Tres"),
new Array("Uzbekistan","Andijon Viloyati","Buxoro Viloyati","Farg'ona Viloyati","Jizzax Viloyati","Namangan Viloyati","Navoiy Viloyati","Qashqadaryo Viloyati (Qarshi)","Qaraqalpog'iston Respublikasi (Nukus)","Samarqand Viloyati","Sirdaryo Viloyati (Guliston)","Surxondaryo Viloyati (Termiz)","Toshkent Shahri","Toshkent Viloyati","Xorazm Viloyati (Urganch)"),
new Array("Vanuatu","Malampa","Penama","Sanma","Shefa","Tafea","Torba"),
new Array("Venezuela","Amazonas","Anzoategui","Apure","Aragua","Barinas","Bolivar","Carabobo","Cojedes","Delta Amacuro","Dependencias Federales","Distrito Federal","Falcon","Guarico","Lara","Merida","Miranda","Monagas","Nueva Esparta","Portuguesa","Sucre","Tachira","Trujillo","Vargas","Yaracuy","Zulia"),
new Array("Vietnam","An Giang","Bac Giang","Bac Kan","Bac Lieu","Bac Ninh","Ba Ria-Vung Tau","Ben Tre","Binh Dinh","Binh Duong","Binh Phuoc","Binh Thuan","Ca Mau","Can Tho","Cao Bang","Dac Lak","Da Nang","Dong Nai","Dong Thap","Gia Lai","Ha Giang","Hai Duong","Hai Phong","Ha Nam","Ha Noi","Ha Tay","Ha Tinh","Hoa Binh","Ho Chi Minh","Hung Yen","Khanh Hoa","Kien Giang","Kon Tum","Lai Chau","Lam Dong","Lang Son","Lao Cai","Long An","Nam Dinh","Nghe An","Ninh Binh","Ninh Thuan","Phu Tho","Phu Yen","Quang Binh","Quang Nam","Quang Ngai","Quang Ninh","Quang Tri","Soc Trang","Son La","Tay Ninh","Thai Binh","Thai Nguyen","Thanh Hoa","Thua Thien-Hue","Tien Giang","Tra Vinh","Tuyen Quang","Vinh Long","Vinh Phuc","Yen Bai"),
new Array("Virgin Islands"),
new Array("Western Sahara"),
new Array("Yemen","Abyan","'Adan","Ad Dali'","Al Bayda'","Al Hudaydah","Al Jawf","Al Mahrah","Al Mahwit","'Amran","Dhamar","Hadramawt","Hajjah","Ibb","Lahij","Ma'rib","Sa'dah","San'a'","Shabwah","Ta'izz"),
new Array("Zambia","Central","Copperbelt","Eastern","Luapula","Lusaka","Northern","North-Western","Southern","Western"),
new Array("Zimbabwe","Bulawayo","Harare","Manicaland","Mashonaland Central","Mashonaland East","Mashonaland West","Masvingo","Matabeleland North","Matabeleland South","Midlands")

)


 

function fillcountry(f,obj,icr)
{
   obj.length=null;
   for(var i=0; i<Countries.length;i++)
   {
        if(f.value==Countries[i][icr])
        {
             if(icr){
                   for(var j=(icr);j<Countries[i].length-(1+icr);j++)
             {
                  obj.length++;
                  obj.options[obj.length-1].text=Countries[i][j+1]
                  obj.options[obj.length-1].value=Countries[i][j+1];
             }
                  
                   }else{
                         obj.length++;
                  obj.options[obj.length-1].text=Countries[i][1]
                  obj.options[obj.length-1].value=Countries[i][1];
                   }
        }
   }
}

function renderCountries()
{
     for(var i=1;i<Countries.length;i++)
     {
          document.write("<option value="+Countries[i][0]+">"+Countries[i][0])
     }
}

</SCRIPT>
</head>
<body leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<TABLE cellspacing="0" cellpadding="30" height="100%" width="100%" border="0">
<TR>
<TD valign="top" class="MainBack">
<!-- Begin Main content -->
<TABLE border="0">
<TR>
<TD nowrap><H1>Region - Country - State Problem</H1></TD>
<TD width="100%" background="./images/stepline.gif">
&nbsp;&nbsp;&nbsp;
<IMG SRC="./images/step1a.gif" width="46" height="20">&nbsp;
<IMG SRC="./images/step2b.gif" width="46" height="20">&nbsp;
<IMG SRC="./images/step3b.gif" width="46" height="20">&nbsp;
<IMG SRC="./images/step4b.gif" width="46" height="20">&nbsp;
<IMG SRC="./images/stepxb.gif" width="57" height="20">&nbsp;&nbsp;&nbsp;
</TD>
<TD nowrap>
<IMG SRC="http://www.shop-of-snowboarding.com/images/info.gif" border="0" width="20" height="20" alt="Look up this Section in the Travel Manual" align="left">&nbsp;
Detailed Instructions</TD>
</TR>
</TABLE>
<BR>
<FORM NAME="TraForm" ACTION="regioncountrystate.asp" METHOD="POST" onSubmit="return CheckForm();">

<TABLE border="0" cellpadding="4">
<TR>
<TD valign="top">Continents
<A HREF="javascript:alert('Select 1 or more targetted Continents that will be visited. Hold the Control Key down and click on the items listed to select multiple continents');">
<IMG SRC="./images/expl.gif" width="14" height="14" border="0">
</A></TD>
<TD valign="top">Countries
<A HREF="javascript:alert('Select 1 or more  targetted Countries that will be visited. Hold the Control Key down and click on the items listed to select multiple countries');">
<IMG SRC="./images/expl.gif" width="14" height="14" border="0">
</A>
</TD>
<TD valign="top">State/Province
<A HREF="javascript:alert('Select 1 or more  targetted States/Provinces that will be visited. Hold the Control Key down and click on the items listed to select multiple states/provinces');">
<IMG SRC="./images/expl.gif" width="14" height="14" border="0">
</A>
</TD>
<TD valign="top">Cities:
<A HREF="javascript:alert('Enter the Cities that the Travel Package will be visiting. Start with the first city and end with the last City. Seperate each city with a Line Break (Enter)');">
<IMG SRC="./images/expl.gif" width="14" height="14" border="0">
</A>
</TD>
</TR>


<TR>
<TD valign="top">
<SELECT class="FormSelect" NAME="Regions" SIZE="9" MULTIPLE onchange="fillcountry(this, document.TraForm.Countries,0)">
<OPTION VALUE="" class="FormSelected">- Select 1 or more -</OPTION>
<OPTION VALUE="Africa">Africa</OPTION>
<OPTION VALUE="Antarctica">Antarctica</OPTION>
<OPTION VALUE="Australia & Oceania">Australia & Oceania</OPTION>
<OPTION VALUE="Asia">Asia</OPTION>
<OPTION VALUE="Carribean">Carribean</OPTION>
<OPTION VALUE="Europe">Europe</OPTION>
<OPTION VALUE="Middle-east">Middle-east</OPTION>
<OPTION VALUE="North America">North America</OPTION>
<OPTION VALUE="Central America">Central America</OPTION>
<OPTION VALUE="South America">South America</OPTION>
</SELECT>
</TD>
<TD valign="top">
<SELECT class="FormSelect" NAME="Countries" SIZE="9" MULTIPLE onchange="fillcountry(this, document.TraForm.States,1)">
<OPTION VALUE="" class="FormSelected">- Select 1 or more -</OPTION>
    <script>
          renderCountries();
     </script>
</SELECT>
</TD>
<TD valign="top">
<SELECT class="FormSelect" NAME="States" SIZE="9" MULTIPLE>
<OPTION VALUE="" class="FormSelected">- Select 1 or more -</OPTION>
</SELECT>
</TD>
<TD valign="top">
<TEXTAREA NAME="Cities" Class="FormText" cols="25" rows="9">
</TEXTAREA>
</TD>

<TD valign="top">
<INPUT TYPE="Submit" VALUE="Go to Step 2 >>>" class="FormBut">
</TD></TR>
</FORM>
</TABLE>
<HR>
<strong>Question:</strong><BR>
How can I add an extra dynamic step? Selecting one or more Continents leads to the selecing of one or more countries in the selected continents. Selecting one or more countries then leads to a selection of states that are in those selected countries. As you can see the step from 1 or more countries leads to a selection of states.

<!-- End Main content -->
</TD></TR>
</TABLE>
</body>
</html>

i put asia in as a ttest so from the first window select asia
0
 

Author Comment

by:pgkooijman
ID: 9681863
Amazing! And this works the same way so I pressume it will work with same browsers as the previous version. It works with about anything, correct?

Answer me this last question and the points are yours with a great thank you from the entire team! JScript is now our cup of coffee!
0
 

Author Comment

by:pgkooijman
ID: 9681882
Woaaah! I am sorry but that is not it yet! I cannot select multiple continents and then get the countries of all selected continents in the countries selection box. This should happen just the way it already happens for countries - 2 - states. Anyway to fix that?
0
 
LVL 25

Accepted Solution

by:
James Rodgers earned 500 total points
ID: 9682106
change the fillcountry function to this

function fillcountry(f,obj,icr)
{
   obj.length=null;
   
   for (x=0;x<f.length;x++){
    if(f[x].selected){
   for(var i=0; i<Countries.length;i++)
   {
        if(f[x].value==Countries[i][icr])
        {
             if(icr){
                for(var j=(icr);j<Countries[i].length-(1+icr);j++)
             {
                  obj.length++;
                  obj.options[obj.length-1].text=Countries[i][j+1]
                  obj.options[obj.length-1].value=Countries[i][j+1];
             }
               
                }else{
                     obj.length++;
                  obj.options[obj.length-1].text=Countries[i][1]
                  obj.options[obj.length-1].value=Countries[i][1];
                }
        }
   }
   }
   }
}


also change this

<OPTION VALUE="Australia & Oceania">Australia & Oceania</OPTION>

to this

<OPTION VALUE="AustraliaOceania">Australia & Oceania</OPTION>

try not to use special characters in values, if you passed that value in a url it would cause problems.

0
 

Author Comment

by:pgkooijman
ID: 9682618
Thanks a bunch, nice solution. Wil it work with virtually all browsers?

Accepter you last answer, thanks again!
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 25

Expert Comment

by:James Rodgers
ID: 9682621
thanks for the point

everything working ok now?
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9682645
should be points...

should work on the major browsers IE and NS, the code is straight forward and uses crossbrowser compliant syntax as far as i am aware
0
 

Author Comment

by:pgkooijman
ID: 9682801
Everything working fine and dandy! Thanks again!
0
 

Expert Comment

by:RayOfChattanooga
ID: 9685995
Dang for a solution like that you should get a lifetime membership there Jester.  I have seen some work horses in my days but you definitely took the cake on that solution.  Heck why dont you look up my q's from time to time....heh
0
 

Author Comment

by:pgkooijman
ID: 9686047
Indeed! Wish I could hand them out. Jester is my hero!
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9686287
thanks for the good word....

i just try to help where i can
0
 

Expert Comment

by:RayOfChattanooga
ID: 9686697
Well if you ever get bored enough feel free to help me out with my issues.  Currently I have 2 that seem to have temporary fixes.  One solution will fix one prob but create another the returned solution will fix that but forget about another and so on......

Have a peak at the following two if you get time before I get an answer:

http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20782213.html
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20783349.html
0
 

Author Comment

by:pgkooijman
ID: 9687269
Jester, if you are still around: there is a very small bug in the script. The last state in each Country's array is not shown in the list of states. For instance if you select Europe, France then you will notice how Rhone-Alpes is not in the list of states. Probably only one variable has to be increased by 1 but we cannot even read and understand your script :). So if you are around please tell us how to fix that very little problem.

Thanks,

 Phil
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9687321
ttry this

function fillcountry(f,obj,icr)
{
   obj.length=null;
   
   for (x=0;x<f.length;x++){
    if(f[x].selected){
   for(var i=0; i<Countries.length;i++)
   {
        if(f[x].value==Countries[i][icr])
        {
             if(icr){
                for(var j=(icr);j<Countries[i].length-1;j++)
             {
                  obj.length++;
                  obj.options[obj.length-1].text=Countries[i][j+1]
                  obj.options[obj.length-1].value=Countries[i][j+1];
             }
               
                }else{
                     obj.length++;
                  obj.options[obj.length-1].text=Countries[i][1]
                  obj.options[obj.length-1].value=Countries[i][1];
                }
        }
   }
   }
   }
}
0
 

Author Comment

by:pgkooijman
ID: 9687380
Clueless how, but that works. You're amazing Jester. Wil make you a millionaire if I ever become one :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now