
function fillprimarystate(){ 
 // this function is used to fill the primarystate list on load
addOption(document.dealerform.primarystate, "Andaman", "Andaman", "");
addOption(document.dealerform.primarystate, "Andhra Pradesh", "Andhra Pradesh", "");
addOption(document.dealerform.primarystate, "Arunachal Pradesh", "Arunachal Pradesh", "");
addOption(document.dealerform.primarystate, "Assam", "Assam", "");
addOption(document.dealerform.primarystate, "Bihar", "Bihar", "");
addOption(document.dealerform.primarystate, "Chandigarh", "Chandigarh", "");
addOption(document.dealerform.primarystate, "Chhattisgarh", "Chhattisgarh", "");
addOption(document.dealerform.primarystate, "Delhi", "Delhi", "");
addOption(document.dealerform.primarystate, "Goa", "Goa", "");
addOption(document.dealerform.primarystate, "Gujarat", "Gujarat", "");
addOption(document.dealerform.primarystate, "Haryana", "Haryana", "");
addOption(document.dealerform.primarystate, "Himachal Pradesh", "Himachal Pradesh", "");
addOption(document.dealerform.primarystate, "Jammu & Kashmir", "Jammu & Kashmir", "");
addOption(document.dealerform.primarystate, "Jharkhand", "Jharkhand", "");
addOption(document.dealerform.primarystate, "Karnataka", "Karnataka", "");
addOption(document.dealerform.primarystate, "Kerala", "Kerala", "");
addOption(document.dealerform.primarystate, "Madhya Pradesh", "Madhya Pradesh", "");
addOption(document.dealerform.primarystate, "Maharashtra", "Maharashtra", "");
addOption(document.dealerform.primarystate, "Manipur", "Manipur", "");
addOption(document.dealerform.primarystate, "Meghalaya", "Meghalaya", "");
addOption(document.dealerform.primarystate, "Mizoram", "Mizoram", "");
addOption(document.dealerform.primarystate, "Nagaland", "Nagaland", "");
addOption(document.dealerform.primarystate, "Orissa", "Orissa", "");
addOption(document.dealerform.primarystate, "Pondicherry", "Pondicherry", "");
addOption(document.dealerform.primarystate, "Punjab", "Punjab", "");
addOption(document.dealerform.primarystate, "Rajasthan", "Rajasthan", "");
addOption(document.dealerform.primarystate, "Sikkim", "Sikkim", "");
addOption(document.dealerform.primarystate, "Tamil Nadu", "Tamil Nadu", "");
addOption(document.dealerform.primarystate, "Tripura", "Tripura", "");
addOption(document.dealerform.primarystate, "Uttarakhand", "Uttarakhand", "");
addOption(document.dealerform.primarystate, "Uttar Pradesh", "Uttar Pradesh", "");
addOption(document.dealerform.primarystate, "West Bengal", "West Bengal", "");
addOption(document.dealerform.primarystate, "Other", "Other", "");
}

function Selectprimarycity(){
// ON selection of primarystate this function will work

removeAllOptions(document.dealerform.primarycity);
addOption(document.dealerform.primarycity, "", "Select City", "");

if(document.dealerform.primarystate.value == 'Andaman'){
addOption(document.dealerform.primarycity,"Agartala", "Agartala");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Andhra Pradesh'){
addOption(document.dealerform.primarycity,"Guntur", "Guntur");
addOption(document.dealerform.primarycity,"Hyderabad", "Hyderabad");
addOption(document.dealerform.primarycity,"Kurnool", "Kurnool");
addOption(document.dealerform.primarycity,"Nellore", "Nellore");
addOption(document.dealerform.primarycity,"Rajmundry", "Rajmundry");
addOption(document.dealerform.primarycity,"Tirupati", "Tirupati");
addOption(document.dealerform.primarycity,"Vijayawada", "Vijayawada");
addOption(document.dealerform.primarycity,"Vizag", "Vizag");
addOption(document.dealerform.primarycity,"Warangal", "Warangal");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Arunachal Pradesh'){
addOption(document.dealerform.primarycity,"Itanagar", "Itanagar");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Assam'){
addOption(document.dealerform.primarycity,"Dibrugarh", "Dibrugarh");
addOption(document.dealerform.primarycity,"Guwahati", "Guwahati");
addOption(document.dealerform.primarycity,"Jorhat", "Jorhat");
addOption(document.dealerform.primarycity,"Muzaffarpur", "Muzaffarpur");
addOption(document.dealerform.primarycity,"Silchar", "Silchar");
addOption(document.dealerform.primarycity,"Tezpur", "Tezpur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Bihar'){
addOption(document.dealerform.primarycity,"Bhagalpur", "Bhagalpur");
addOption(document.dealerform.primarycity,"Patna", "Patna");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Chandigarh'){
addOption(document.dealerform.primarycity,"Chandigarh", "Chandigarh");
}
if(document.dealerform.primarystate.value == 'Chhattisgarh'){
addOption(document.dealerform.primarycity,"Bhilai", "Bhilai");
addOption(document.dealerform.primarycity,"Bilaspur", "Bilaspur");
addOption(document.dealerform.primarycity,"Raipur", "Raipur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Delhi'){
addOption(document.dealerform.primarycity,"New Delhi", "New Delhi");
}
if(document.dealerform.primarystate.value == 'Goa'){
addOption(document.dealerform.primarycity,"Goa", "Goa");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Gujarat'){
addOption(document.dealerform.primarycity,"Ahmedabad", "Ahmedabad");
addOption(document.dealerform.primarycity,"Anand", "Anand");
addOption(document.dealerform.primarycity,"Bharuch", "Bharuch");
addOption(document.dealerform.primarycity,"Bhavnagar", "Bhavnagar");
addOption(document.dealerform.primarycity,"Gandhidham", "Gandhidham");
addOption(document.dealerform.primarycity,"Himatnagar", "Himatnagar");
addOption(document.dealerform.primarycity,"Jamnagar", "Jamnagar");
addOption(document.dealerform.primarycity,"Junagadh", "Junagadh");
addOption(document.dealerform.primarycity,"Mehsana", "Mehsana");
addOption(document.dealerform.primarycity,"Modinagar", "Modinagar");
addOption(document.dealerform.primarycity,"Rajkot", "Rajkot");
addOption(document.dealerform.primarycity,"Surat", "Surat");
addOption(document.dealerform.primarycity,"Vadodara", "Vadodara");
addOption(document.dealerform.primarycity,"Vapi", "Vapi");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Haryana'){
addOption(document.dealerform.primarycity,"Ambala", "Ambala");
addOption(document.dealerform.primarycity,"Hissar", "Hissar");
addOption(document.dealerform.primarycity,"Kaithal", "Kaithal");
addOption(document.dealerform.primarycity,"Karnal", "Karnal");
addOption(document.dealerform.primarycity,"Kurukshetra", "Kurukshetra");
addOption(document.dealerform.primarycity,"Panchkula", "Panchkula");
addOption(document.dealerform.primarycity,"Panipat", "Panipat");
addOption(document.dealerform.primarycity,"Rewari", "Rewari");
addOption(document.dealerform.primarycity,"Rohtak", "Rohtak");
addOption(document.dealerform.primarycity,"Sirsa", "Sirsa");
addOption(document.dealerform.primarycity,"Sonipat", "Sonipat");
addOption(document.dealerform.primarycity,"Yamuna Nagar", "Yamuna Nagar");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Himachal Pradesh'){
addOption(document.dealerform.primarycity,"Damtal", "Damtal");
addOption(document.dealerform.primarycity,"Hamirpur", "Hamirpur");
addOption(document.dealerform.primarycity,"Mandi", "Mandi");
addOption(document.dealerform.primarycity,"Shimla", "Shimla");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Jammu & Kashmir'){
addOption(document.dealerform.primarycity,"Jammu", "Jammu");
addOption(document.dealerform.primarycity,"Srinagar", "Srinagar");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Jharkhand'){
addOption(document.dealerform.primarycity,"Bokaro", "Bokaro");
addOption(document.dealerform.primarycity,"Dhanbad", "Dhanbad");
addOption(document.dealerform.primarycity,"Hazaribagh", "Hazaribagh");
addOption(document.dealerform.primarycity,"Jamshedpur", "Jamshedpur");
addOption(document.dealerform.primarycity,"Ranchi", "Ranchi");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Karnataka'){
addOption(document.dealerform.primarycity,"Bangalore", "Bangalore");
addOption(document.dealerform.primarycity,"Belgaum", "Belgaum");
addOption(document.dealerform.primarycity,"Bellary", "Bellary");
addOption(document.dealerform.primarycity,"Devanagere", "Devanagere");
addOption(document.dealerform.primarycity,"Gulbarga", "Gulbarga");
addOption(document.dealerform.primarycity,"Hassan", "Hassan");
addOption(document.dealerform.primarycity,"Hubli", "Hubli");
addOption(document.dealerform.primarycity,"Mangalore", "Mangalore");
addOption(document.dealerform.primarycity,"Mysore", "Mysore");
addOption(document.dealerform.primarycity,"Shimoga", "Shimoga");
addOption(document.dealerform.primarycity,"Tumkur", "Tumkur");
addOption(document.dealerform.primarycity,"Udupi", "Udupi");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Kerala'){
addOption(document.dealerform.primarycity,"Allepey", "Allepey");
addOption(document.dealerform.primarycity,"Calicut", "Calicut");
addOption(document.dealerform.primarycity,"Cochin", "Cochin");
addOption(document.dealerform.primarycity,"Kannur", "Kannur");
addOption(document.dealerform.primarycity,"Kollam", "Kollam");
addOption(document.dealerform.primarycity,"Kottayam", "Kottayam");
addOption(document.dealerform.primarycity,"Malapuram", "Malapuram");
addOption(document.dealerform.primarycity,"Palakkad", "Palakkad");
addOption(document.dealerform.primarycity,"Pathanamtitta", "Pathanamtitta");
addOption(document.dealerform.primarycity,"Thrissur", "Thrissur");
addOption(document.dealerform.primarycity,"Trivandrum", "Trivandrum");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Maharashtra'){
addOption(document.dealerform.primarycity,"Ahmednagar", "Ahmednagar");
addOption(document.dealerform.primarycity,"Akola", "Akola");
addOption(document.dealerform.primarycity,"Amaravati", "Amaravati");
addOption(document.dealerform.primarycity,"Aurangabad", "Aurangabad");
addOption(document.dealerform.primarycity,"Chandrapur", "Chandrapur");
addOption(document.dealerform.primarycity,"Jalgaon", "Jalgaon");
addOption(document.dealerform.primarycity,"Kolhapur", "Kolhapur");
addOption(document.dealerform.primarycity,"Mumbai & Thane", "Mumbai & Thane");
addOption(document.dealerform.primarycity,"Nagpur", "Nagpur");
addOption(document.dealerform.primarycity,"Nanded", "Nanded");
addOption(document.dealerform.primarycity,"Nashik", "Nashik");
addOption(document.dealerform.primarycity,"Pune", "Pune");
addOption(document.dealerform.primarycity,"Ratnagiri", "Ratnagiri");
addOption(document.dealerform.primarycity,"Sangli", "Sangli");
addOption(document.dealerform.primarycity,"Satara", "Satara");
addOption(document.dealerform.primarycity,"Sholapur", "Sholapur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Manipur'){
addOption(document.dealerform.primarycity,"Imphal", "Imphal");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Meghalaya'){
addOption(document.dealerform.primarycity,"Shillong", "Shillong");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Mizoram'){
addOption(document.dealerform.primarycity,"Aizwal", "Aizwal");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Madhya Pradesh'){
addOption(document.dealerform.primarycity,"Bhopal", "Bhopal");
addOption(document.dealerform.primarycity,"Chhindwara", "Chhindwara");
addOption(document.dealerform.primarycity,"Gwalior", "Gwalior");
addOption(document.dealerform.primarycity,"Indore", "Indore");
addOption(document.dealerform.primarycity,"Jabalpur", "Jabalpur");
addOption(document.dealerform.primarycity,"Ratlam", "Ratlam");
addOption(document.dealerform.primarycity,"Sagar", "Sagar");
addOption(document.dealerform.primarycity,"Satna", "Satna");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Nagaland'){
addOption(document.dealerform.primarycity,"Dimapur", "Dimapur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Orissa'){
addOption(document.dealerform.primarycity,"Behrampur", "Behrampur");
addOption(document.dealerform.primarycity,"Bhubaneshwar", "Bhubaneshwar");
addOption(document.dealerform.primarycity,"Cuttack", "Cuttack");
addOption(document.dealerform.primarycity,"Rourkela", "Rourkela");
addOption(document.dealerform.primarycity,"Sambhalpur", "Sambhalpur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Pondicherry'){
addOption(document.dealerform.primarycity,"Pondicherry", "Pondicherry");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Punjab'){
addOption(document.dealerform.primarycity,"Abohar", "Abohar");
addOption(document.dealerform.primarycity,"Amritsar", "Amritsar");
addOption(document.dealerform.primarycity,"Bhatinda", "Bhatinda");
addOption(document.dealerform.primarycity,"Firozpur", "Firozpur");
addOption(document.dealerform.primarycity,"Hoshiarpur", "Hoshiarpur");
addOption(document.dealerform.primarycity,"Jallandhar", "Jallandhar");
addOption(document.dealerform.primarycity,"Khanna", "Khanna");
addOption(document.dealerform.primarycity,"Ludhiana", "Ludhiana");
addOption(document.dealerform.primarycity,"Moga", "Moga");
addOption(document.dealerform.primarycity,"Mohali", "Mohali");
addOption(document.dealerform.primarycity,"Muktsar", "Muktsar");
addOption(document.dealerform.primarycity,"Pathankot", "Pathankot");
addOption(document.dealerform.primarycity,"Patiala", "Patiala");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Rajasthan'){
addOption(document.dealerform.primarycity,"Ajmer", "Ajmer");
addOption(document.dealerform.primarycity,"Alwar", "Alwar");
addOption(document.dealerform.primarycity,"Bhilwada", "Bhilwada");
addOption(document.dealerform.primarycity,"Bikaner", "Bikaner");
addOption(document.dealerform.primarycity,"Chittoragarh", "Chittoragarh");
addOption(document.dealerform.primarycity,"Jaipur", "Jaipur");
addOption(document.dealerform.primarycity,"Jodhpur", "Jodhpur");
addOption(document.dealerform.primarycity,"Kota", "Kota");
addOption(document.dealerform.primarycity,"Udaipur", "Udaipur");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Sikkim'){
addOption(document.dealerform.primarycity,"Gangtok", "Gangtok");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Tamil Nadu'){
addOption(document.dealerform.primarycity,"Chennai", "Chennai");
addOption(document.dealerform.primarycity,"Coimbatore", "Coimbatore");
addOption(document.dealerform.primarycity,"Erode", "Erode");
addOption(document.dealerform.primarycity,"Madurai", "Madurai");
addOption(document.dealerform.primarycity,"Nagarkoil", "Nagarkoil");
addOption(document.dealerform.primarycity,"Namakkal", "Namakkal");
addOption(document.dealerform.primarycity,"Salem", "Salem");
addOption(document.dealerform.primarycity,"Sivakasi", "Sivakasi");
addOption(document.dealerform.primarycity,"Thanjavur", "Thanjavur");
addOption(document.dealerform.primarycity,"Tirunelveli", "Tirunelveli");
addOption(document.dealerform.primarycity,"Tirupur", "Tirupur");
addOption(document.dealerform.primarycity,"Trichy", "Trichy");
addOption(document.dealerform.primarycity,"Tuticorin", "Tuticorin");
addOption(document.dealerform.primarycity,"Vellore", "Vellore");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Tripura'){
addOption(document.dealerform.primarycity,"Agartala", "Agartala");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Uttarakhand'){
addOption(document.dealerform.primarycity,"Dehradun", "Dehradun");
addOption(document.dealerform.primarycity,"Haldwani", "Haldwani");
addOption(document.dealerform.primarycity,"Roorkie", "Roorkie");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Uttar Pradesh'){
addOption(document.dealerform.primarycity,"Agra", "Agra");
addOption(document.dealerform.primarycity,"Aligarh", "Aligarh");
addOption(document.dealerform.primarycity,"Allahabad", "Allahabad");
addOption(document.dealerform.primarycity,"Bareilly", "Bareilly");
addOption(document.dealerform.primarycity,"Bullandshar", "Bullandshar");
addOption(document.dealerform.primarycity,"Faizabad", "Faizabad");
addOption(document.dealerform.primarycity,"Gorakhpur", "Gorakhpur");
addOption(document.dealerform.primarycity,"Jhansi", "Jhansi");
addOption(document.dealerform.primarycity,"Kanpur", "Kanpur");
addOption(document.dealerform.primarycity,"Lucknow", "Lucknow");
addOption(document.dealerform.primarycity,"Mathura", "Mathura");
addOption(document.dealerform.primarycity,"Meerut", "Meerut");
addOption(document.dealerform.primarycity,"Moradabad", "Moradabad");
addOption(document.dealerform.primarycity,"Muzafarnagar", "Muzafarnagar");
addOption(document.dealerform.primarycity,"Shajahanpur", "Shajahanpur");
addOption(document.dealerform.primarycity,"Varanasi", "Varanasi");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'West Bengal'){
addOption(document.dealerform.primarycity,"Asansol", "Asansol");
addOption(document.dealerform.primarycity,"Durgapur", "Durgapur");
addOption(document.dealerform.primarycity,"Kharagpur", "Kharagpur");
addOption(document.dealerform.primarycity,"Kolkata", "Kolkata");
addOption(document.dealerform.primarycity,"Shivasagar", "Shivasagar");
addOption(document.dealerform.primarycity,"Siliguri", "Siliguri");
addOption(document.dealerform.primarycity,"Other", "Other");
}
if(document.dealerform.primarystate.value == 'Other'){
addOption(document.dealerform.primarycity,"Other", "Other");
}

}


function fillsecondarystate(){ 
 // this function is used to fill the secondarystate list on load
addOption(document.dealerform.secondarystate, "Andaman", "Andaman", "");
addOption(document.dealerform.secondarystate, "Andhra Pradesh", "Andhra Pradesh", "");
addOption(document.dealerform.secondarystate, "Arunachal Pradesh", "Arunachal Pradesh", "");
addOption(document.dealerform.secondarystate, "Assam", "Assam", "");
addOption(document.dealerform.secondarystate, "Bihar", "Bihar", "");
addOption(document.dealerform.secondarystate, "Chandigarh", "Chandigarh", "");
addOption(document.dealerform.secondarystate, "Chhattisgarh", "Chhattisgarh", "");
addOption(document.dealerform.secondarystate, "Delhi", "Delhi", "");
addOption(document.dealerform.secondarystate, "Goa", "Goa", "");
addOption(document.dealerform.secondarystate, "Gujarat", "Gujarat", "");
addOption(document.dealerform.secondarystate, "Haryana", "Haryana", "");
addOption(document.dealerform.secondarystate, "Himachal Pradesh", "Himachal Pradesh", "");
addOption(document.dealerform.secondarystate, "Jammu & Kashmir", "Jammu & Kashmir", "");
addOption(document.dealerform.secondarystate, "Jharkhand", "Jharkhand", "");
addOption(document.dealerform.secondarystate, "Karnataka", "Karnataka", "");
addOption(document.dealerform.secondarystate, "Kerala", "Kerala", "");
addOption(document.dealerform.secondarystate, "Madhya Pradesh", "Madhya Pradesh", "");
addOption(document.dealerform.secondarystate, "Maharashtra", "Maharashtra", "");
addOption(document.dealerform.secondarystate, "Manipur", "Manipur", "");
addOption(document.dealerform.secondarystate, "Meghalaya", "Meghalaya", "");
addOption(document.dealerform.secondarystate, "Mizoram", "Mizoram", "");
addOption(document.dealerform.secondarystate, "Nagaland", "Nagaland", "");
addOption(document.dealerform.secondarystate, "Orissa", "Orissa", "");
addOption(document.dealerform.secondarystate, "Pondicherry", "Pondicherry", "");
addOption(document.dealerform.secondarystate, "Punjab", "Punjab", "");
addOption(document.dealerform.secondarystate, "Rajasthan", "Rajasthan", "");
addOption(document.dealerform.secondarystate, "Sikkim", "Sikkim", "");
addOption(document.dealerform.secondarystate, "Tamil Nadu", "Tamil Nadu", "");
addOption(document.dealerform.secondarystate, "Tripura", "Tripura", "");
addOption(document.dealerform.secondarystate, "Uttarakhand", "Uttarakhand", "");
addOption(document.dealerform.secondarystate, "Uttar Pradesh", "Uttar Pradesh", "");
addOption(document.dealerform.secondarystate, "West Bengal", "West Bengal", "");
addOption(document.dealerform.secondarystate, "Other", "Other", "");
}

function Selectsecondarycity(){
// ON selection of secondarystate this function will work

removeAllOptions(document.dealerform.secondarycity);
addOption(document.dealerform.secondarycity, "", "Select City", "");

if(document.dealerform.secondarystate.value == 'Andaman'){
addOption(document.dealerform.secondarycity,"Agartala", "Agartala");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Andhra Pradesh'){
addOption(document.dealerform.secondarycity,"Guntur", "Guntur");
addOption(document.dealerform.secondarycity,"Hyderabad", "Hyderabad");
addOption(document.dealerform.secondarycity,"Kurnool", "Kurnool");
addOption(document.dealerform.secondarycity,"Nellore", "Nellore");
addOption(document.dealerform.secondarycity,"Rajmundry", "Rajmundry");
addOption(document.dealerform.secondarycity,"Tirupati", "Tirupati");
addOption(document.dealerform.secondarycity,"Vijayawada", "Vijayawada");
addOption(document.dealerform.secondarycity,"Vizag", "Vizag");
addOption(document.dealerform.secondarycity,"Warangal", "Warangal");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Arunachal Pradesh'){
addOption(document.dealerform.secondarycity,"Itanagar", "Itanagar");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Assam'){
addOption(document.dealerform.secondarycity,"Dibrugarh", "Dibrugarh");
addOption(document.dealerform.secondarycity,"Guwahati", "Guwahati");
addOption(document.dealerform.secondarycity,"Jorhat", "Jorhat");
addOption(document.dealerform.secondarycity,"Muzaffarpur", "Muzaffarpur");
addOption(document.dealerform.secondarycity,"Silchar", "Silchar");
addOption(document.dealerform.secondarycity,"Tezpur", "Tezpur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Bihar'){
addOption(document.dealerform.secondarycity,"Bhagalpur", "Bhagalpur");
addOption(document.dealerform.secondarycity,"Patna", "Patna");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Chandigarh'){
addOption(document.dealerform.secondarycity,"Chandigarh", "Chandigarh");
}
if(document.dealerform.secondarystate.value == 'Chhattisgarh'){
addOption(document.dealerform.secondarycity,"Bhilai", "Bhilai");
addOption(document.dealerform.secondarycity,"Bilaspur", "Bilaspur");
addOption(document.dealerform.secondarycity,"Raipur", "Raipur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Delhi'){
addOption(document.dealerform.secondarycity,"New Delhi", "New Delhi");
}
if(document.dealerform.secondarystate.value == 'Goa'){
addOption(document.dealerform.secondarycity,"Goa", "Goa");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Gujarat'){
addOption(document.dealerform.secondarycity,"Ahmedabad", "Ahmedabad");
addOption(document.dealerform.secondarycity,"Anand", "Anand");
addOption(document.dealerform.secondarycity,"Bharuch", "Bharuch");
addOption(document.dealerform.secondarycity,"Bhavnagar", "Bhavnagar");
addOption(document.dealerform.secondarycity,"Gandhidham", "Gandhidham");
addOption(document.dealerform.secondarycity,"Himatnagar", "Himatnagar");
addOption(document.dealerform.secondarycity,"Jamnagar", "Jamnagar");
addOption(document.dealerform.secondarycity,"Junagadh", "Junagadh");
addOption(document.dealerform.secondarycity,"Mehsana", "Mehsana");
addOption(document.dealerform.secondarycity,"Modinagar", "Modinagar");
addOption(document.dealerform.secondarycity,"Rajkot", "Rajkot");
addOption(document.dealerform.secondarycity,"Surat", "Surat");
addOption(document.dealerform.secondarycity,"Vadodara", "Vadodara");
addOption(document.dealerform.secondarycity,"Vapi", "Vapi");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Haryana'){
addOption(document.dealerform.secondarycity,"Ambala", "Ambala");
addOption(document.dealerform.secondarycity,"Hissar", "Hissar");
addOption(document.dealerform.secondarycity,"Kaithal", "Kaithal");
addOption(document.dealerform.secondarycity,"Karnal", "Karnal");
addOption(document.dealerform.secondarycity,"Kurukshetra", "Kurukshetra");
addOption(document.dealerform.secondarycity,"Panchkula", "Panchkula");
addOption(document.dealerform.secondarycity,"Panipat", "Panipat");
addOption(document.dealerform.secondarycity,"Rewari", "Rewari");
addOption(document.dealerform.secondarycity,"Rohtak", "Rohtak");
addOption(document.dealerform.secondarycity,"Sirsa", "Sirsa");
addOption(document.dealerform.secondarycity,"Sonipat", "Sonipat");
addOption(document.dealerform.secondarycity,"Yamuna Nagar", "Yamuna Nagar");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Himachal Pradesh'){
addOption(document.dealerform.secondarycity,"Damtal", "Damtal");
addOption(document.dealerform.secondarycity,"Hamirpur", "Hamirpur");
addOption(document.dealerform.secondarycity,"Mandi", "Mandi");
addOption(document.dealerform.secondarycity,"Shimla", "Shimla");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Jammu & Kashmir'){
addOption(document.dealerform.secondarycity,"Jammu", "Jammu");
addOption(document.dealerform.secondarycity,"Srinagar", "Srinagar");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Jharkhand'){
addOption(document.dealerform.secondarycity,"Bokaro", "Bokaro");
addOption(document.dealerform.secondarycity,"Dhanbad", "Dhanbad");
addOption(document.dealerform.secondarycity,"Hazaribagh", "Hazaribagh");
addOption(document.dealerform.secondarycity,"Jamshedpur", "Jamshedpur");
addOption(document.dealerform.secondarycity,"Ranchi", "Ranchi");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Karnataka'){
addOption(document.dealerform.secondarycity,"Bangalore", "Bangalore");
addOption(document.dealerform.secondarycity,"Belgaum", "Belgaum");
addOption(document.dealerform.secondarycity,"Bellary", "Bellary");
addOption(document.dealerform.secondarycity,"Devanagere", "Devanagere");
addOption(document.dealerform.secondarycity,"Gulbarga", "Gulbarga");
addOption(document.dealerform.secondarycity,"Hassan", "Hassan");
addOption(document.dealerform.secondarycity,"Hubli", "Hubli");
addOption(document.dealerform.secondarycity,"Mangalore", "Mangalore");
addOption(document.dealerform.secondarycity,"Mysore", "Mysore");
addOption(document.dealerform.secondarycity,"Shimoga", "Shimoga");
addOption(document.dealerform.secondarycity,"Tumkur", "Tumkur");
addOption(document.dealerform.secondarycity,"Udupi", "Udupi");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Kerala'){
addOption(document.dealerform.secondarycity,"Allepey", "Allepey");
addOption(document.dealerform.secondarycity,"Calicut", "Calicut");
addOption(document.dealerform.secondarycity,"Cochin", "Cochin");
addOption(document.dealerform.secondarycity,"Kannur", "Kannur");
addOption(document.dealerform.secondarycity,"Kollam", "Kollam");
addOption(document.dealerform.secondarycity,"Kottayam", "Kottayam");
addOption(document.dealerform.secondarycity,"Malapuram", "Malapuram");
addOption(document.dealerform.secondarycity,"Palakkad", "Palakkad");
addOption(document.dealerform.secondarycity,"Pathanamtitta", "Pathanamtitta");
addOption(document.dealerform.secondarycity,"Thrissur", "Thrissur");
addOption(document.dealerform.secondarycity,"Trivandrum", "Trivandrum");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Maharashtra'){
addOption(document.dealerform.secondarycity,"Ahmednagar", "Ahmednagar");
addOption(document.dealerform.secondarycity,"Akola", "Akola");
addOption(document.dealerform.secondarycity,"Amaravati", "Amaravati");
addOption(document.dealerform.secondarycity,"Aurangabad", "Aurangabad");
addOption(document.dealerform.secondarycity,"Chandrapur", "Chandrapur");
addOption(document.dealerform.secondarycity,"Jalgaon", "Jalgaon");
addOption(document.dealerform.secondarycity,"Kolhapur", "Kolhapur");
addOption(document.dealerform.secondarycity,"Mumbai & Thane", "Mumbai & Thane");
addOption(document.dealerform.secondarycity,"Nagpur", "Nagpur");
addOption(document.dealerform.secondarycity,"Nanded", "Nanded");
addOption(document.dealerform.secondarycity,"Nashik", "Nashik");
addOption(document.dealerform.secondarycity,"Pune", "Pune");
addOption(document.dealerform.secondarycity,"Ratnagiri", "Ratnagiri");
addOption(document.dealerform.secondarycity,"Sangli", "Sangli");
addOption(document.dealerform.secondarycity,"Satara", "Satara");
addOption(document.dealerform.secondarycity,"Sholapur", "Sholapur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Manipur'){
addOption(document.dealerform.secondarycity,"Imphal", "Imphal");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Meghalaya'){
addOption(document.dealerform.secondarycity,"Shillong", "Shillong");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Mizoram'){
addOption(document.dealerform.secondarycity,"Aizwal", "Aizwal");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Madhya Pradesh'){
addOption(document.dealerform.secondarycity,"Bhopal", "Bhopal");
addOption(document.dealerform.secondarycity,"Chhindwara", "Chhindwara");
addOption(document.dealerform.secondarycity,"Gwalior", "Gwalior");
addOption(document.dealerform.secondarycity,"Indore", "Indore");
addOption(document.dealerform.secondarycity,"Jabalpur", "Jabalpur");
addOption(document.dealerform.secondarycity,"Ratlam", "Ratlam");
addOption(document.dealerform.secondarycity,"Sagar", "Sagar");
addOption(document.dealerform.secondarycity,"Satna", "Satna");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Nagaland'){
addOption(document.dealerform.secondarycity,"Dimapur", "Dimapur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Orissa'){
addOption(document.dealerform.secondarycity,"Behrampur", "Behrampur");
addOption(document.dealerform.secondarycity,"Bhubaneshwar", "Bhubaneshwar");
addOption(document.dealerform.secondarycity,"Cuttack", "Cuttack");
addOption(document.dealerform.secondarycity,"Rourkela", "Rourkela");
addOption(document.dealerform.secondarycity,"Sambhalpur", "Sambhalpur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Pondicherry'){
addOption(document.dealerform.secondarycity,"Pondicherry", "Pondicherry");
}
if(document.dealerform.secondarystate.value == 'Punjab'){
addOption(document.dealerform.secondarycity,"Abohar", "Abohar");
addOption(document.dealerform.secondarycity,"Amritsar", "Amritsar");
addOption(document.dealerform.secondarycity,"Bhatinda", "Bhatinda");
addOption(document.dealerform.secondarycity,"Firozpur", "Firozpur");
addOption(document.dealerform.secondarycity,"Hoshiarpur", "Hoshiarpur");
addOption(document.dealerform.secondarycity,"Jallandhar", "Jallandhar");
addOption(document.dealerform.secondarycity,"Khanna", "Khanna");
addOption(document.dealerform.secondarycity,"Ludhiana", "Ludhiana");
addOption(document.dealerform.secondarycity,"Moga", "Moga");
addOption(document.dealerform.secondarycity,"Mohali", "Mohali");
addOption(document.dealerform.secondarycity,"Muktsar", "Muktsar");
addOption(document.dealerform.secondarycity,"Pathankot", "Pathankot");
addOption(document.dealerform.secondarycity,"Patiala", "Patiala");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Rajasthan'){
addOption(document.dealerform.secondarycity,"Ajmer", "Ajmer");
addOption(document.dealerform.secondarycity,"Alwar", "Alwar");
addOption(document.dealerform.secondarycity,"Bhilwada", "Bhilwada");
addOption(document.dealerform.secondarycity,"Bikaner", "Bikaner");
addOption(document.dealerform.secondarycity,"Chittoragarh", "Chittoragarh");
addOption(document.dealerform.secondarycity,"Jaipur", "Jaipur");
addOption(document.dealerform.secondarycity,"Jodhpur", "Jodhpur");
addOption(document.dealerform.secondarycity,"Kota", "Kota");
addOption(document.dealerform.secondarycity,"Udaipur", "Udaipur");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Sikkim'){
addOption(document.dealerform.secondarycity,"Gangtok", "Gangtok");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Tamil Nadu'){
addOption(document.dealerform.secondarycity,"Chennai", "Chennai");
addOption(document.dealerform.secondarycity,"Coimbatore", "Coimbatore");
addOption(document.dealerform.secondarycity,"Erode", "Erode");
addOption(document.dealerform.secondarycity,"Madurai", "Madurai");
addOption(document.dealerform.secondarycity,"Nagarkoil", "Nagarkoil");
addOption(document.dealerform.secondarycity,"Namakkal", "Namakkal");
addOption(document.dealerform.secondarycity,"Salem", "Salem");
addOption(document.dealerform.secondarycity,"Sivakasi", "Sivakasi");
addOption(document.dealerform.secondarycity,"Thanjavur", "Thanjavur");
addOption(document.dealerform.secondarycity,"Tirunelveli", "Tirunelveli");
addOption(document.dealerform.secondarycity,"Tirupur", "Tirupur");
addOption(document.dealerform.secondarycity,"Trichy", "Trichy");
addOption(document.dealerform.secondarycity,"Tuticorin", "Tuticorin");
addOption(document.dealerform.secondarycity,"Vellore", "Vellore");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Tripura'){
addOption(document.dealerform.secondarycity,"Agartala", "Agartala");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Uttarakhand'){
addOption(document.dealerform.secondarycity,"Dehradun", "Dehradun");
addOption(document.dealerform.secondarycity,"Haldwani", "Haldwani");
addOption(document.dealerform.secondarycity,"Roorkie", "Roorkie");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Uttar Pradesh'){
addOption(document.dealerform.secondarycity,"Agra", "Agra");
addOption(document.dealerform.secondarycity,"Aligarh", "Aligarh");
addOption(document.dealerform.secondarycity,"Allahabad", "Allahabad");
addOption(document.dealerform.secondarycity,"Bareilly", "Bareilly");
addOption(document.dealerform.secondarycity,"Bullandshar", "Bullandshar");
addOption(document.dealerform.secondarycity,"Faizabad", "Faizabad");
addOption(document.dealerform.secondarycity,"Gorakhpur", "Gorakhpur");
addOption(document.dealerform.secondarycity,"Jhansi", "Jhansi");
addOption(document.dealerform.secondarycity,"Kanpur", "Kanpur");
addOption(document.dealerform.secondarycity,"Lucknow", "Lucknow");
addOption(document.dealerform.secondarycity,"Mathura", "Mathura");
addOption(document.dealerform.secondarycity,"Meerut", "Meerut");
addOption(document.dealerform.secondarycity,"Moradabad", "Moradabad");
addOption(document.dealerform.secondarycity,"Muzafarnagar", "Muzafarnagar");
addOption(document.dealerform.secondarycity,"Shajahanpur", "Shajahanpur");
addOption(document.dealerform.secondarycity,"Varanasi", "Varanasi");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'West Bengal'){
addOption(document.dealerform.secondarycity,"Asansol", "Asansol");
addOption(document.dealerform.secondarycity,"Durgapur", "Durgapur");
addOption(document.dealerform.secondarycity,"Kharagpur", "Kharagpur");
addOption(document.dealerform.secondarycity,"Kolkata", "Kolkata");
addOption(document.dealerform.secondarycity,"Shivasagar", "Shivasagar");
addOption(document.dealerform.secondarycity,"Siliguri", "Siliguri");
addOption(document.dealerform.secondarycity,"Other", "Other");
}
if(document.dealerform.secondarystate.value == 'Other'){
addOption(document.dealerform.secondarycity,"Other", "Other");
}

}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

