  var countries = new Array();
  var counties = new Array();
  var cities = new Array();

  countries[0] = new Array();
  counties[0] = new Array();
  cities[0] = new Array();

  function fillcountry(region_id) {

    country_select = document.forms.propertyForm.countryid;

    country_select.length = 0;
    country_select.options[0] = new Option( "-------", "0", 1, 1 );

    if ( !countries[region_id] ) {
      fillcounty(0);
      return;
    }

    for( i=0; i<countries[region_id].length; i++ ) {
      country_select.options[i+1] = new Option( countries[region_id][i][1], countries[region_id][i][0] );
    }

    country_select.options[0].selected = true;

    fillcounty(0);
  }

  function fillcounty(country_id) {

    county_select = document.forms.propertyForm.countyid;

    county_select.length = 0;
    county_select.options[0] = new Option( "-------", "0", 1, 1 );

    if ( !counties[country_id] ) {
      fillcity(0);
      return;
    }

    for( i=0; i<counties[country_id].length; i++ ) {
      county_select.options[i+1] = new Option( counties[country_id][i][1], counties[country_id][i][0] );
    }

    county_select.options[0].selected = true;

    fillcity(0);
  }

  function fillcity(county_id) {

    city_select = document.forms.propertyForm.cityid;
    city_select.length = 0;

    city_select.options[0] = new Option( "-------", "0", 1, 1 );

    if ( !cities[county_id] ) {
      return;
    }

    for( i=0; i<cities[county_id].length; i++ ) {
      city_select.options[i+1] = new Option( cities[county_id][i][1], cities[county_id][i][0] );
    }

    city_select.options[0].selected = true;
  }
