var str = new Object(); var stateArray = new Array(); str["Bali"] = 'center'; stateArray[0] = 'Bali'; str["Banten"] = 'center'; stateArray[1] = 'Banten'; str["Bengkulu"] = 'center'; stateArray[2] = 'Bengkulu'; str["D.I Yogyakarta"] = 'center'; stateArray[3] = 'D.I Yogyakarta'; str["Dki Jakarta"] = 'center'; stateArray[4] = 'Dki Jakarta'; str["Gorontalo"] = 'center'; stateArray[5] = 'Gorontalo'; str["Jambi"] = 'center'; stateArray[6] = 'Jambi'; str["Java"] = 'center'; stateArray[7] = 'Java'; str["Jawa Barat"] = 'center'; stateArray[8] = 'Jawa Barat'; str["Jawa Tengah"] = 'center'; stateArray[9] = 'Jawa Tengah'; str["Jawa Timur"] = 'center'; stateArray[10] = 'Jawa Timur'; str["Kalimantan"] = 'center'; stateArray[11] = 'Kalimantan'; str["Kalimantan Barat"] = 'center'; stateArray[12] = 'Kalimantan Barat'; str["Kalimantan Selatan"] = 'center'; stateArray[13] = 'Kalimantan Selatan'; str["Kalimantan Tengah"] = 'center'; stateArray[14] = 'Kalimantan Tengah'; str["Kalimantan Timur"] = 'center'; stateArray[15] = 'Kalimantan Timur'; str["Kalimantan Utara"] = 'center'; stateArray[16] = 'Kalimantan Utara'; str["Kepulauan Bangka Belitung"] = 'center'; stateArray[17] = 'Kepulauan Bangka Belitung'; str["Kepulauan Riau"] = 'center'; stateArray[18] = 'Kepulauan Riau'; str["Lampung"] = 'center'; stateArray[19] = 'Lampung'; str["Maluku"] = 'center'; stateArray[20] = 'Maluku'; str["Maluku Islands"] = 'center'; stateArray[21] = 'Maluku Islands'; str["Maluku Utara"] = 'center'; stateArray[22] = 'Maluku Utara'; str["Nangroe Aceh Darussalam"] = 'center'; stateArray[23] = 'Nangroe Aceh Darussalam'; str["Nusa Tenggara"] = 'center'; stateArray[24] = 'Nusa Tenggara'; str["Nusa Tenggara Barat"] = 'center'; stateArray[25] = 'Nusa Tenggara Barat'; str["Nusa Tenggara Timur"] = 'center'; stateArray[26] = 'Nusa Tenggara Timur'; str["Papua"] = 'center'; stateArray[27] = 'Papua'; str["Papua Barat"] = 'center'; stateArray[28] = 'Papua Barat'; str["Riau"] = 'center'; stateArray[29] = 'Riau'; str["Sulawesi"] = 'center'; stateArray[30] = 'Sulawesi'; str["Sulawesi Barat"] = 'center'; stateArray[31] = 'Sulawesi Barat'; str["Sulawesi Selatan"] = 'center'; stateArray[32] = 'Sulawesi Selatan'; str["Sulawesi Tengah"] = 'center'; stateArray[33] = 'Sulawesi Tengah'; str["Sulawesi Tenggara"] = 'center'; stateArray[34] = 'Sulawesi Tenggara'; str["Sulawesi Utara"] = 'center'; stateArray[35] = 'Sulawesi Utara'; str["Sumatera Barat"] = 'center'; stateArray[36] = 'Sumatera Barat'; str["Sumatera Selatan"] = 'center'; stateArray[37] = 'Sumatera Selatan'; str["Sumatera Utara"] = 'south'; stateArray[38] = 'Sumatera Utara'; str["Sumatra"] = 'center'; stateArray[39] = 'Sumatra'; function getRegionForState(state) { return str[state]; } function populateState(field, insIntl, insAll) { var len = stateArray.length; if (insIntl) { len += 1; } if (insAll) { len += 1; } field.length = len; var i = 0; var j = 0; if (insAll) { field[j].value = "ALL"; field[j].text = "ALL"; j++; } for (; i < stateArray.length; i++) { field[j].value = stateArray[i]; field[j].text = stateArray[i]; j++; } field.selectedIndex = 0; } function getStateArray() { return stateArray; } function getStatesMap() { var states = new RegExp(); for (var i = 0; i < stateArray.length; i++) { states[stateArray[i]] = stateArray[i]; } return states; }