// CascadeSelect JavaScript, version 1.0
// (c) 2007 Tatang Widyanto
// CascadeSelect is freely distributable under the terms of an MIT-style license
// Dependency: Prototype JavaScript framework, version 1.5.1 or above
// For details, see the Prototype web site: http://www.prototypejs.org/

var CascadeSelect = {};

CascadeSelect.DefaultOptions = {
  parentOptions:  [],
  childOptions:   {},
  limitOptions:   [false, false],
  initialOptions: [false, false],
  extraOptions:   [false, false],
  onComplete:     Prototype.emptyFunction
}

CascadeSelect.Base = Class.create();
CascadeSelect.Base.prototype = {
  initialize: function(parent, child, options) {
    this.initial = true;
    this.parent  = $(parent);
    this.child   = $(child);
    this.options = Object.extend(Object.extend({}, CascadeSelect.DefaultOptions), options || {});

    this.populateParent();
    this.populateChild();

    this.parentListener = this.populateChild.bindAsEventListener(this);
    this.childListener  = this.execute.bindAsEventListener(this);
    Event.observe(this.parent, "change", this.parentListener);
    Event.observe(this.child, "change", this.childListener);
    this.initial = false;
  },

  populateParent: function() {
    var element      = this.parent;
    var limitOptions = [];
    if (this.options.limitOptions[0]) {
      var value = this.options.limitOptions[0];
      this.options.parentOptions.each(function(node) {
        if (node[0] == value) limitOptions = [node];
      });
      this.options.parentOptions = limitOptions;
    } else if (this.options.extraOptions && this.options.extraOptions[0][0]) {
      element.options[0] = new Option(this.options.extraOptions[0][1],
        this.options.extraOptions[0][0]);
    }

    var selectedIndex = 0;
    var parentIndex   = this.options.initialOptions[0];
    if (typeof this.options.parentOptions != "undefined") {
      this.options.parentOptions.each(function(node) {
        element.options[element.options.length] = new Option(node[1], node[0]);
        if (node[0] == parentIndex) selectedIndex = element.options.length - 1;
      });
    }

    if (this.initial) element.options.selectedIndex = selectedIndex;
  },

  populateChild: function(event) {
    if (this.parent.options.selectedIndex == -1) return false;
    var element      = this.child;
    var limitOptions = [];
    var parent       = this.parent.options[this.parent.options.selectedIndex].value;
    var childNodes   = this.options.childOptions[parent];

    element.options.length = 0;
    if (this.options.limitOptions[1]) {
      var value = this.options.limitOptions[1];
      childNodes.each(function(node) {
        if (node[0] == value) limitOptions = [node];
      });
      childNodes = limitOptions;
    } else if (this.options.extraOptions && this.options.extraOptions[1][0]) {
      element.options[0] = new Option(this.options.extraOptions[1][1],
        this.options.extraOptions[1][0]);
    }

    var selectedIndex = 0;
    var childIndex    = this.options.initialOptions[1];
    if (typeof childNodes != "undefined") {
      childNodes.each(function(node) {
        element.options[element.options.length] = new Option(node[1], node[0]);
        if (node[0] == childIndex) selectedIndex = element.options.length - 1;
      });
    }

    if (this.initial) element.options.selectedIndex = selectedIndex;
  },

  execute: function(event) {
    var parentValue = this.parent.options[this.parent.options.selectedIndex].value;
    var childValue  = this.child.options[this.child.options.selectedIndex].value;
    this.options.onComplete.bind(this)(parentValue, childValue);
  }
}


CascadeSelect.Indonesian = function(parent, child) {
  var options = Object.extend({
    parentOptions:  (typeof M_PROPINSI == "undefined" ? [] : M_PROPINSI),
    childOptions:   (typeof M_KABUPATEN == "undefined" ? {} : M_KABUPATEN),
    limitOptions:   [false, false],
    initialOptions: [false, false],
    extraOptions:   [["x", "seluruh propinsi"], ["x", "seluruh kota"]],
    onComplete:     Prototype.emptyFunction
  }, arguments[2] || {});
  return new CascadeSelect.Base(parent, child, options);
}

function setPointer(theRow, theRowNum, theAction, theDefaultColor, thePointerColor, theMarkColor)
{
    var theCells = null;

    // 1. Pointer and mark feature are disabled or the browser can't get the
    //    row -> exits
    if ((thePointerColor == '' && theMarkColor == '')
        || typeof(theRow.style) == 'undefined') {
        return false;
    }

    // 2. Gets the current row and exits if the browser can't get it
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    // 3. Gets the current color...
    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    // 3.1 ... with DOM compatible browsers except Opera that does not return
    //         valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    }
    // 3.2 ... with other browsers
    else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    } // end 3

    // 3.3 ... Opera changes colors set via HTML to rgb(r,g,b) format so fix it
    if (currentColor.indexOf("rgb") >= 0)
    {
        var rgbStr = currentColor.slice(currentColor.indexOf('(') + 1,
                                     currentColor.indexOf(')'));
        var rgbValues = rgbStr.split(",");
        currentColor = "#";
        var hexChars = "0123456789ABCDEF";
        for (var i = 0; i < 3; i++)
        {
            var v = rgbValues[i].valueOf();
            currentColor += hexChars.charAt(v/16) + hexChars.charAt(v%16);
        }
    }

    // 4. Defines the new color
    // 4.1 Current color is the default one
    if (currentColor == ''
        || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor              = thePointerColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // Garvin: deactivated onclick marking of the checkbox because it's also executed
            // when an action (like edit/delete) on a single item is performed. Then the checkbox
            // would get deactived, even though we need it activated. Maybe there is a way
            // to detect if the row was clicked, and not an item therein...
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.2 Current color is the pointer one
    else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()
             && (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])) {
        if (theAction == 'out') {
            newColor              = theDefaultColor;
        }
        else if (theAction == 'click' && theMarkColor != '') {
            newColor              = theMarkColor;
            marked_row[theRowNum] = true;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = true;
        }
    }
    // 4.1.3 Current color is the marker one
    else if (currentColor.toLowerCase() == theMarkColor.toLowerCase()) {
        if (theAction == 'click') {
            newColor              = (thePointerColor != '')
                                  ? thePointerColor
                                  : theDefaultColor;
            marked_row[theRowNum] = (typeof(marked_row[theRowNum]) == 'undefined' || !marked_row[theRowNum])
                                  ? true
                                  : null;
            // document.getElementById('id_rows_to_delete' + theRowNum).checked = false;
        }
    } // end 4

    // 5. Sets the new color...
    if (newColor) {
        var c = null;
        // 5.1 ... with DOM compatible browsers except Opera
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            } // end for
        }
        // 5.2 ... with other browsers
        else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    } // end 5

    return true;
} // end of the 'setPointer()' function


var M_PROPINSI  = [
["101","Nanggroe Aceh Darussalam"],["102","Sumatera Utara"],["103","Sumatera Barat"],["104","Riau"],["105","Jambi"],["106","Sumatera Selatan"],["107","Bengkulu"],["108","Lampung"],["109","Kepulauan Bangka Belitung"],["110","Kepulauan Riau"],
["201","DKI Jakarta"],["202","Jawa Barat"],["203","Jawa Tengah"],["204","DI Yogyakarta"],["205","Jawa Timur"],["206","Banten"],
["301","Kalimantan Barat"],["302","Kalimantan Tengah"],["303","Kalimantan Selatan"],["304","Kalimantan Timur"],
["401","Sulawesi Utara"],["402","Sulawesi Tengah"],["403","Sulawesi Selatan"],["404","Sulawesi Tenggara"],["405","Gorontalo"],["406","Sulawesi Barat"],
["501","Bali"],["502","Nusa Tenggara Barat"],["503","Nusa Tenggara Timur"],
["601","Maluku"],["602","Maluku Utara"],["603","Papua"],["604","Irian Jaya Barat"]
];

var M_KABUPATEN = 
{"101":[
["101001","Kab. Aceh Besar"],
["101002","Kab. Pidie"],
["101003","Kab. Aceh Utara"],
["101004","Kab. Aceh Timur"],
["101005","Kab. Aceh Tengah"],
["101006","Kab. Aceh Barat"],
["101007","Kab. Aceh Selatan"],
["101008","Kab. Aceh Tenggara"],
["101009","Kab. Simeulue"],
["101010","Kab. Bireuen"],
["101011","Kab. Aceh Singkil"],
["101012","Kab. Aceh Tamiang"],
["101013","Kab. Gayo Luas"],
["101014","Kab. Aceh Nagan Raya"],
["101015","Kab. Aceh Barat Daya"],
["101016","Kab. Aceh Jaya"],
["101017","Kab. Bener Meriah"],
["101018","Kota Sabang"],
["101019","Kota Banda Aceh"],
["101020","Kota Lhokseumawe"],
["101021","Kota Langsa"],
["101022","Kota Subulussalam"],
["101023","Kab. Pidie Jaya"]],"102":[
["102001","Kab. Deli Serdang"],
["102002","Kab. Langkat"],
["102003","Kab. Karo"],
["102004","Kab. Simalungun"],
["102005","Kab. Dairi"],
["102006","Kab. Asahan"],
["102007","Kab. Labuhan Batu"],
["102008","Kab. Tapanuli Utara"],
["102009","Kab. Tapanuli Tengah"],
["102010","Kab. Tapanuli Selatan"],
["102011","Kab. Nias"],
["102012","Kab. Mandailing Natal"],
["102013","Kab. Toba Samosir"],
["102014","Kab. Nias Selatan"],
["102015","Kab. Pakpak Bharat"],
["102016","Kab. Humbang Hasundutan"],
["102017","Kab. Samosir"],
["102018","Kab. Serdang Bedagai"],
["102019","Kota Medan"],
["102020","Kota Binjai"],
["102021","Kota Tebing Tinggi"],
["102022","Kota Pematang Siantar"],
["102023","Kota Tanjung Balai"],
["102024","Kota Sibolga"],
["102025","Kota Padang Sidempuan"],
["102026","Kab. Batubara"]],"103":[
["103001","Kab. Agam"],
["103002","Kab. Pasaman"],
["103003","Kab. Lima Puluh Kota"],
["103004","Kab. Solok"],
["103005","Kab. Padang Pariaman"],
["103006","Kab. Pesisir Selatan"],
["103007","Kab. Tanah Datar"],
["103008","Kab. Sawah Lunto Sijunjung"],
["103009","Kab. Kepulauan Mentawai"],
["103010","Kab. Pasaman Barat"],
["103011","Kab. Dharmasraya"],
["103012","Kab. Solok Selatan"],
["103013","Kota Bukittinggi"],
["103014","Kota Padang"],
["103015","Kota Padang Panjang"],
["103016","Kota Sawahlunto"],
["103017","Kota Solok"],
["103018","Kota Payakumbuh"],
["103019","Kota Pariaman"]],"104":[
["104001","Kab. Kampar"],
["104002","Kab. Bengkalis"],
["104003","Kab. Indragiri Hulu"],
["104004","Kab. Indragiri Hilir"],
["104005","Kab. Pelalawan"],
["104006","Kab. Rokan Hulu"],
["104007","Kab. Rokan Hilir"],
["104008","Kab. Siak"],
["104009","Kab. Kuantan Singing"],
["104010","Kota Pekanbaru"],
["104011","Kota Dumai"]],"105":[
["105001","Kab. Batanghari"],
["105002","Kab. Bungo"],
["105003","Kab. Merangin"],
["105004","Kab. Tanjung Jabung Barat"],
["105005","Kab. Kerinci"],
["105006","Kab. Muara Jambi"],
["105007","Kab. Tebo"],
["105008","Kab. Sarolangun"],
["105009","Kab. Tanjung Jabung Timur"],
["105010","Kota Jambi"]],
"106":[
["106001","Kab. Musi Banyuasin"],
["106002","Kab. Ogan Komering Ilir"],
["106003","Kab. Ogan Komering Ulu"],
["106004","Kab. Muara Enim"],
["106005","Kab. Lahat"],
["106006","Kab. Musi Rawas"],
["106007","Kab. Banyuasin"],
["106008","Kab. Ogan Ilir"],
["106009","Kab. Oku Selatan"],
["106010","Kab. Oku Timur"],
["106011","Kota Palembang"],
["106012","Kota Lubuk Linggau"],
["106013","Kota Prabumulih"],
["106015","Kab. Empat Lawang"],
["106014","Kota Pagar Alam"]],
"107":[
["107001","Kab. Bengkulu Utara"],
["107002","Kab. Rejang Lebong"],
["107003","Kab. Bengkulu Selatan"],
["107004","Kab. Muko-Muko"],
["107005","Kab. Seluma"],
["107006","Kab. Kaur"],
["107007","Kab. Lebong"],
["107008","Kab. Kepahiang"],
["107009","Kota Bengkulu"]],
"108":[
["108001","Kab. Lampung Selatan"],
["108002","Kab. Lampung Tengah"],
["108003","Kab. Lampung Utara"],
["108004","Kab. Lampung Barat"],
["108005","Kab. Tulang Bawang"],
["108006","Kab. Tanggamus"],
["108007","Kab. Lampung Timur"],
["108008","Kab. Way Kanan"],
["108009","Kota Bandar Lampung"],
["108010","Kota Metro"]],
"109":[
["109001","Kab. Bangka Barat"],
["109002","Kab. Bangka Tengah"],
["109003","Kab. Bangka Selatan"],
["109004","Kab. Belitung Barat"],
["109005","Kab. Belitung Timur"],
["109006","Kab. Bangka"],
["109007","Kab. Belitung"],
["109008","Kota Pangkal Pinang"]],
"110":[
["110001","Kab. Kepulauan Riau"],
["110002","Kab. Karimun"],
["110003","Kab. Natuna"],
["110004","Kab. Lingga"],
["110005","Kota Batam"],
["110006","Kota Tanjung Pinang"],
["110007","Kab. Bintan"]],
"201":[
["201001","Kab. Kepulauan Seribu"],
["201002","Kota Jakarta Pusat"],
["201003","Kota Jakarta Utara"],
["201004","Kota Jakarta Barat"],
["201005","Kota Jakarta Selatan"],
["201006","Kota Jakarta Timur"]],
"202":[
["202001","Kab. Bogor"],
["202002","Kab. Sukabumi"],
["202003","Kab. Cianjur"],
["202004","Kab. Bandung"],
["202005","Kab. Sumedang"],
["202006","Kab. Garut"],
["202007","Kab. Tasikmalaya"],
["202008","Kab. Ciamis"],
["202009","Kab. Kuningan"],
["202010","Kab. Majalengka"],
["202011","Kab. Cirebon"],
["202012","Kab. Indramayu"],
["202013","Kab. Subang"],
["202014","Kab. Purwakarta"],
["202015","Kab. Kerawang"],
["202016","Kab. Bekasi"],
["202017","Kota Bandung"],
["202018","Kota Bogor"],
["202019","Kota Sukabumi"],
["202020","Kota Cirebon"],
["202021","Kota Bekasi"],
["202022","Kota Depok"],
["202023","Kota Cimahi"],
["202024","Kota Tasikmalaya"],
["202025","Kota Banjar"],
["202026","Kab. Bandung Barat"]],
"203":[
["203001","Kab. Cilacap"],
["203002","Kab. Banyumas"],
["203003","Kab. Purbalingga"],
["203004","Kab. Banjarnegara"],
["203005","Kab. Kebumen"],
["203006","Kab. Purworejo"],
["203007","Kab. Wonosobo"],
["203008","Kab. Megelang"],
["203009","Kab. Boyolali"],
["203010","Kab. Klaten"],
["203011","Kab. Sukoharjo"],
["203012","Kab. Wonogiri"],
["203013","Kab. Karanganyar"],
["203014","Kab. Sragen"],
["203015","Kab. Grobogan"],
["203016","Kab. Blora"],
["203017","Kab. Rembang"],
["203018","Kab. Pati"],
["203019","Kab. Kudus"],
["203020","Kab. Jepara"],
["203021","Kab. Demak"],
["203022","Kab. Semarang"],
["203023","Kab. Temanggung"],
["203024","Kab. Kendal"],
["203025","Kab. Batang"],
["203026","Kab. Pekalongan"],
["203027","Kab. Pemalang"],
["203028","Kab. Tegal"],
["203029","Kab. Brebes"],
["203030","Kota Magelang"],
["203031","Kota Surakarta"],
["203032","Kota Salatiga"],
["203033","Kota Semarang"],
["203034","Kota Pekalongan"],
["203035","Kota Tegal"]],
"204":[
["204001","Kab. Bantul"],
["204002","Kab. Sleman"],
["204003","Kab. Gunung Kidul"],
["204004","Kab. Kulonprogo"],
["204005","Kota Yogyakarta"]],
"205":[
["205001","Kab. Gresik"],
["205002","Kab. Sidoarjo"],
["205003","Kab. Mojokerto"],
["205004","Kab. Jombang"],
["205005","Kab. Bojonegoro"],
["205006","Kab. Tuban"],
["205007","Kab. Lamongan"],
["205008","Kab. Madiun"],
["205009","Kab. Ngawi"],
["205010","Kab. Magetan"],
["205011","Kab. Ponorogo"],
["205012","Kab. Pacitan"],
["205013","Kab. Kediri"],
["205014","Kab. Nganjuk"],
["205015","Kab. Blitar"],
["205016","Kab. Tulungagung"],
["205017","Kab. Trenggalek"],
["205018","Kab. Malang"],
["205019","Kab. Pasuruan"],
["205020","Kab. Probolinggo"],
["205021","Kab. Lumajang"],
["205022","Kab. Bondowoso"],
["205023","Kab. Situbondo"],
["205024","Kab. Jember"],
["205025","Kab. Banyuwangi"],
["205026","Kab. Pamekasan"],
["205027","Kab. Sampang"],
["205028","Kab. Sumenep"],
["205029","Kab. Bangkalan"],
["205030","Kota Surabaya"],
["205031","Kota Malang"],
["205032","Kota Madiun"],
["205033","Kota Kediri"],
["205034","Kota Mojokerto"],
["205035","Kota Blitar"],
["205036","Kota Pasuruan"],
["205037","Kota Probolinggo"],
["205038","Kota Batu"]],
"206":[
["206001","Kab. Pandeglang"],
["206002","Kab. Lebak"],
["206003","Kab. Tangerang"],
["206004","Kab. Serang"],
["206005","Kota Cilegon"],
["206006","Kota Tangerang"]],
"301":[
["301001","Kab. Sambas"],
["301002","Kab. Pontianak"],
["301003","Kab. Sanggau"],
["301004","Kab. Sintang"],
["301005","Kab. Kapuas Hulu"],
["301006","Kab. Ketapang"],
["301007","Kab. Bengkayang"],
["301008","Kab. Landak"],
["301009","Kab. Malawi"],
["301010","Kota Pontianak"],
["301011","Kota Singkawang"],
["301012","Kab. Sekadau"],
["301013","Kab. Mempawah"],
["301014","Kab. Kayong Utara"]],
"302":[
["302001","Kab. Kapuas"],
["302002","Kab. Barito Selatan"],
["302003","Kab. Barito Utara"],
["302004","Kab. Kotawaringin Timur"],
["302005","Kab. Kotawaringin Barat"],
["302006","Kab. Pulang Pisau"],
["302007","Kab. Gunung Mas"],
["302008","Kab. Barito Timur"],
["302009","Kab. Sukamara"],
["302010","Kab. Katingan"],
["302011","Kab. Lamandau"],
["302012","Kab. Seruyan"],
["302013","Kab. Murung Raya"],
["302014","Kota Palangkaraya"]],
"303":[
["303001","Kab. Banjar"],
["303002","Kab. Tanah Laut"],
["303003","Kab. Barito Kuala"],
["303004","Kab. Tapin"],
["303005","Kab. Hulu Sungai Selatan"],
["303006","Kab. Hulu Sungai Tengah"],
["303007","Kab. Hulu Sungai Utara"],
["303008","Kab. Tabalong"],
["303009","Kab. Kotabaru"],
["303010","Kab. Tanah Bumbu"],
["303011","Kab. Balangan"],
["303012","Kota Banjarmasin"],
["303013","Kota Banjarbaru"]],
"304":[
["304001","Kab. Pasir"],
["304002","Kab. Kutai"],
["304003","Kab. Berau"],
["304004","Kab. Bulongan"],
["304005","Kab. Malinau"],
["304006","Kab. Nunukan"],
["304007","Kab. Kutai Barat"],
["304008","Kab. Kutai Timur"],
["304009","Kab. Penajam Paser Utara"],
["304010","Kota Samarinda"],
["304011","Kota Balikpapan"],
["304012","Kota Tarakan"],
["304013","Kota Bontang"],
["304014","Kab. Tana Tidung"]],
"401":[
["401001","Kab. Bolaang Mongondow"],
["401002","Kab. Minahasa"],
["401003","Kab. Sangihe"],
["401004","Kab. Kepl. Talaud"],
["401005","Kab. Minahasa Selata"],
["401006","Kab. Minahasa Utara"],
["401007","Kota Manado"],
["401008","Kota Bitung"],
["401009","Kota Tomohon"],
["401010","Kota Kotamobagu"],
["401011","Kab. Minahasa Tenggara"],
["401012","Kab. Kepulauan Sitaro"],
["401013","Kab. Bolaang Mongondow Utara"]],
"402":[
["402001","Kab. Banggai Kepulauan"],
["402002","Kab. Donggala"],
["402003","Kab. Poso"],
["402004","Kab. Banggai"],
["402005","Kab. Buol"],
["402006","Kab. Toli Toli"],
["402007","Kab. Morowali"],
["402008","Kab. Parigi Muotong"],
["402009","Kab. Tojo Una-Una"],
["402010","Kota Palu"]],
"403":[
["403001","Kab. Maros"],
["403002","Kab. Pangkajene Kepulauan"],
["403003","Kab. Gowa"],
["403004","Kab. Takalar"],
["403005","Kab. Jeneponto"],
["403006","Kab. Barru"],
["403007","Kab. Bone"],
["403008","Kab. Wajo"],
["403009","Kab. Soppeng"],
["403010","Kab. Bantaeng"],
["403011","Kab. Bulukumba"],
["403012","Kab. Sinjai"],
["403013","Kab. Selayar"],
["403014","Kab. Pinrang"],
["403015","Kab. Sidenreng Rappang"],
["403016","Kab. Enrekang"],
["403017","Kab. Luwu"],
["403018","Kab. Tana Toraja"],
["403019","Kab. Luwu Utara"],
["403020","Kab. Luwu Timur"],
["403021","Kota Makasar"],
["403022","Kota Pare Pare"],
["403023","Kota Palopo"]],
"404":[
["404001","Kab. Konawe"],
["404002","Kab. Muna"],
["404003","Kab. Buton"],
["404004","Kab. Kolaka"],
["404005","Kab. Konawe Selatan"],
["404006","Kab. Kolaka Utara"],
["404007","Kab. Wakatobi"],
["404008","Kab. Bombana"],
["404009","Kota Kendari"],
["404010","Kota Bau-Bau"],
["404011","Kab. Konawe Utara"],
["404012","Kab. Buton Utara"]],
"405":[
["405001","Kab. Boalemo"],
["405002","Kab. Gorontalo"],
["405003","Kab. Pohuwato"],
["405004","Kab. Bonebolango"],
["405005","Kota Gorontalo"],
["405006","Kab. Gorontalo Utara"]],
"406":[
["406001","Kab. Mamuju"],
["406002","Kab. Mamuju Utara"],
["406003","Kab. Polewali"],
["406004","Kab. Mamasa"],
["406005","Kab. Majene"]],
"501":[
["501001","Kab. Buleleng"],
["501002","Kab. Jembrana"],
["501003","Kab. Tabanan"],
["501004","Kab. Badung"],
["501005","Kab. Gianyar"],
["501006","Kab. Klungkung"],
["501007","Kab. Bangli"],
["501008","Kab. Karang Asem"],
["501009","Kota Denpasar"]],
"502":[
["502001","Kab. Lombok Barat"],
["502002","Kab. Lombok Tengah"],
["502003","Kab. Lombok Timur"],
["502004","Kab. Sumbawa"],
["502005","Kab. Dompu"],
["502006","Kab. Bima"],
["502007","Kab. Sumbawa Barat"],
["502008","Kota Mataram"],
["502009","Kota Bima"]],
"503":[
["503001","Kab. Kupang"],
["503002","Kab. Timor Tengah Selatan"],
["503003","Kab. Timor Tengah Utara"],
["503004","Kab. Belu"],
["503005","Kab. Alor"],
["503006","Kab. Flores Timur"],
["503007","Kab. Sikka"],
["503008","Kab. Ende"],
["503009","Kab. Ngada"],
["503010","Kab. Manggarai"],
["503011","Kab. Sumba Timur"],
["503012","Kab. Sumba Barat"],
["503013","Kab. Lembata"],
["503014","Kab. Rote Ndao"],
["503015","Kab. Manggarai Barat"],
["503016","Kota Kupang"],
["503017","Kab. Sumba Tengah"],
["503018","Kab. Sumba Barat Daya"],
["503019","Kab. Nagekeo"]],
"601":[
["601001","Kab. Maluku Tengah"],
["601002","Kab. Maluku Tenggara"],
["601003","Kab. Buru"],
["601004","Kab. Maluku Tenggara Barat"],
["601005","Kab. Seram Bagian Barat"],
["601006","Kab. Seram Bagian Timur"],
["601007","Kab. Kepulauan Aru"],
["601008","Kota Ambon"]],
"602":[
["602001","Kab. Halmahera Barat"],
["602002","Kab. Halmahera Tengah"],
["602003","Kab. Halmahera Utara"],
["602004","Kab. Halmahera Selatan"],
["602005","Kab. Kepulauan Sula"],
["602006","Kab. Halmahera Timur"],
["602007","Kota Ternate"],
["602008","Kota Tidore Kepulauan"]],
"603":[
["603001","Kab. Jaya Pura"],
["603002","Kab. Biak Numfor"],
["603003","Kab. Yapen Waropen"],
["603004","Kab. Marauke"],
["603005","Kab. Jayawijaya"],
["603006","Kab. Paniai"],
["603007","Kab. Nabire"],
["603008","Kab. Puncak Jaya"],
["603009","Kab. Mimika"],
["603010","Kab. Keerom"],
["603011","Kab. Sarmi"],
["603012","Kab. Asmat"],
["603013","Kab. Mappi"],
["603014","Kab. Boven Digul"],
["603015","Kab. Yahukimo"],
["603016","Kab. Pegunungan Bintang"],
["603017","Kab. Supiori"],
["603018","Kab. Waropen"],
["603019","Kab. Tolikara"],
["603020","Kota Jayapura"]],
"604":[
["604001","Kab. Fak-Fak"],
["604002","Kab. Sorong"],
["604003","Kab. Manokwari"],
["604004","Kab. Kaimana"],
["604005","Kab. Sorong Selatan"],
["604006","Kab. Raja Ampat"],
["604007","Kab. Teluk Bintuni"],
["604008","Kab. Teluk Wondama"],
["604009","Kota Sorong"]]
};