var str = new Object(); var stateArray = new Array(); str["ANDAMAN AND NICOBAR"] = 'South'; stateArray[0] = 'ANDAMAN AND NICOBAR'; str["ANDHRA PRADESH"] = 'South'; stateArray[1] = 'ANDHRA PRADESH'; str["ARUNACHAL PRADESH"] = 'East'; stateArray[2] = 'ARUNACHAL PRADESH'; str["ASSAM"] = 'East'; stateArray[3] = 'ASSAM'; str["BIHAR"] = 'East'; stateArray[4] = 'BIHAR'; str["CHANDIGARH"] = 'North'; stateArray[5] = 'CHANDIGARH'; str["CHHATTISGARH"] = 'West'; stateArray[6] = 'CHHATTISGARH'; str["DAMAN & DIU"] = 'West'; stateArray[7] = 'DAMAN & DIU'; str["GOA"] = 'South'; stateArray[8] = 'GOA'; str["GUJARAT"] = 'West'; stateArray[9] = 'GUJARAT'; str["HARYANA"] = 'North'; stateArray[10] = 'HARYANA'; str["HIMACHAL PRADESH"] = 'North'; stateArray[11] = 'HIMACHAL PRADESH'; str["JAMMU & KASHMIR"] = 'North'; stateArray[12] = 'JAMMU & KASHMIR'; str["JHARKHAND"] = 'East'; stateArray[13] = 'JHARKHAND'; str["KARNATAKA"] = 'South'; stateArray[14] = 'KARNATAKA'; str["KERALA"] = 'South'; stateArray[15] = 'KERALA'; str["LAKSHADWEEP"] = 'South'; stateArray[16] = 'LAKSHADWEEP'; str["MADHYA PRADESH"] = 'North'; stateArray[17] = 'MADHYA PRADESH'; str["MAHARASHTRA"] = 'West'; stateArray[18] = 'MAHARASHTRA'; str["MANIPUR"] = 'East'; stateArray[19] = 'MANIPUR'; str["MEGHALAYA"] = 'East'; stateArray[20] = 'MEGHALAYA'; str["MIZORAM"] = 'East'; stateArray[21] = 'MIZORAM'; str["NAGALAND"] = 'East'; stateArray[22] = 'NAGALAND'; str["NEW DELHI"] = 'North'; stateArray[23] = 'NEW DELHI'; str["ORISSA"] = 'South'; stateArray[24] = 'ORISSA'; str["PONDICHERRY"] = 'South'; stateArray[25] = 'PONDICHERRY'; str["PUNJAB"] = 'North'; stateArray[26] = 'PUNJAB'; str["RAJASTHAN"] = 'North'; stateArray[27] = 'RAJASTHAN'; str["SIKKIM"] = 'East'; stateArray[28] = 'SIKKIM'; str["TAMIL NADU"] = 'South'; stateArray[29] = 'TAMIL NADU'; str["TELANGANA"] = 'South'; stateArray[30] = 'TELANGANA'; str["TRIPURA"] = 'East'; stateArray[31] = 'TRIPURA'; str["UTTAR PRADESH"] = 'North'; stateArray[32] = 'UTTAR PRADESH'; str["UTTARAKHAND"] = 'North'; stateArray[33] = 'UTTARAKHAND'; str["UTTARANCHAL"] = 'North'; stateArray[34] = 'UTTARANCHAL'; str["WEST BENGAL"] = 'East'; stateArray[35] = 'WEST BENGAL'; 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++; } if (insIntl) { field[j].value = "INTERNATIONAL"; field[j].text = "INTERNATIONAL"; } 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; }