
 //<![CDATA[ 
 // array of possible countries in the same order as they appear in the society selection list 
 var societyLists = new Array(4) 
 societyLists["empty"] = ["Select a society"]; 
 societyLists["HYD"] = ["NCL Godavari", "Raj Pushpa properties", "Sahara Estates", "Sai Satya Residency", "PBR Estates", "Janapriya Castle", "Shanthi Bagh", "Paragon Venkatdri", "Arunodaya Appartments", "kranthishikara", "Saikrupa(Kompally)", "Kanchenjunga", "Aparna Shiv Kailash", "Prajay Alkapuri", "Srinivasa Village", "Prajay Niwas-2", "Sri Sai Krupa Appts", "FRWA", "Bharadwaj Appts"]; 
 societyLists["BLR"] = ["Diamond District", "Itina Neela", "Purva Riviera", "Ranka Nest" , "Apollo Hospitals "]; 
 societyLists["DEL/NCR"]= ["NRI City", "Jay Vayu Vihar", "Gaur Green", "HRC", "Shipra Sun City", "Devendra Vihar", "Vatika City", "Pratap Nagar ", "Kendriya Vihar", "Green Ville", "SuperTech Icon", "Essel Tower", "Vasant Kunj D2", "Beverly Hills", "parasnath", "Richmond", "Vasant Kunj C1", "supertech emarald"];  
 societyLists["CHN"] = ["Great Pearl Apartment", "INS Rajali", "Gems Park","Gokulam1","Gokulam2","Rail Nagar","Ampa mall hotspot","Anand flats","Annai flats","Asiad colony","Sea view apartment","Luz golden enclave","Nethrambigai apartment","Jain ashraya phase-3","Jaibharath","Gokul gardens","Golden treasure"]; 
 /* CountryChange() is called from the onchange event of a select element. 
 * param selectObj - the select object which fired the on change event. 
  */ 
 function societyChange(selectObj) { 
 // get the index of the selected option 
 var idx = selectObj.selectedIndex; 
 // get the value of the selected option 
 var which = selectObj.options[idx].value; 
 // use the selected option value to retrieve the list of items from the societyLists array 
 cList = societyLists[which]; 
 // get the society select element via its known id 
 var cSelect = document.getElementById("society"); 
 // remove the current options from the society select 
 var len=cSelect.options.length; 
 while (cSelect.options.length > 0) { 
 cSelect.remove(0); 
 } 
 var newOption; 
 // create new options 
 for (var i=0; i<cList.length; i++) { 
 newOption = document.createElement("option"); 
 newOption.value = cList[i];  // assumes option string and value are the same 
 newOption.text=cList[i]; 
 // add the new option 
 try { 
 cSelect.add(newOption);  // this will fail in DOM browsers but is needed for IE 
 } 
 catch (e) { 
 cSelect.appendChild(newOption); 
 } 
 } 
 } 
//]]>
