function sus(f, i, v, t) {
	f.subcaste.options[i] = new Option(v,t );
}

function subcastedropdown(f) {
var userAgent=navigator.appName + ' ' + navigator.appVersion;
var agentInfo=userAgent.substring(0, 5);
if (agentInfo == 'WebTV') {
	return true;
}
v = f.religion.value;
//alert (v);
if (v == 'Hindu') {
	f.subcaste.options.length = 0;
	f.subcaste.selectedIndex = -1;
	f.subcaste.options[0] = new Option('Any', 'Any');
	sus(f,1,'- Ambalavasi','- Brahmin');
	sus(f,2,'- Brahmin','- Brahmin');
	sus(f,3,'- Chettiar','- Chettiar');
	sus(f,4,'- Deevara','- Deevara');
	sus(f,5,'- Ezhava','- Ezhava');
	sus(f,6,'- Ezhuthachan','- Ezhuthachan');
	sus(f,7,'- Iyengar','- Iyengar');
	sus(f,8,'- Iyer','- Iyer');
	sus(f,9,'- Kshatriya','- Kshatriya');
	sus(f,10,'- Kudumbi','- Kudumbi');
	sus(f,11,'- Namboodiri','- Namboodiri');
	sus(f,12,'- Variar','- Variar');
	sus(f,13,'- Menon','- Menon');
	sus(f,14,'- Nadar','- Nadar');
	sus(f,15,'- Nair','- Nair');
	sus(f,16,'- Nair Vaniya','- Nair Vaniya');
	sus(f,17,'- Nambiar','- Nambiar');
	sus(f,18,'- Panicker','- Panicker');
	sus(f,19,'- Pillai','- Pillai');
	sus(f,20,'- Thiyya','- Thiyya');
	sus(f,21,'- Tribe','- Tribe');
	sus(f,22,'- Velethadathu Nair','- Velethadathu Nair');
	sus(f,23,'- Vilakkithala Nair','- Vilakkithala Nair');
	sus(f,24,'- Vishwakarma','- Vishwakarma');
	sus(f,25,'- Yadava','- Yadava');
	sus(f,26,'- Pisharadi','- Pisharadi');
	} else if (v == 'Muslim') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Muslim','Muslim');       
	} else if (v == 'Jain') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Jain','Jain');       
	} else if (v == 'Budhist') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Buddhist','Buddhist');       
	} else if (v == 'Parsi') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Parsi','Parsi');       
	} else if (v == 'Sikh') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Sikh','Sikh');       
	} else if (v == 'Christian') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'- Born Again','- Born Again');  
		sus(f,2,'- Catholic','- Catholic') ; 
		sus(f,3,'- CMS','- CMS');  
		sus(f,4,'- CSI','- CSI');  
		sus(f,5,'- Evangelical','- Evangelical');  
		sus(f,6,'- Jacoite','- Jacoite') ; 
		sus(f,7,'- Marthoma','- Marthoma');  
		sus(f,8,'- Nadar','- Nadar');  
		sus(f,9,'- Protestant','- Protestant');  
		sus(f,10,'- Syrian','- Syrian') ; 
		sus(f,11,'- Anglo Indians','- Anglo Indians') ; 
	} else if (v == 'Other') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Other','Other') ;  
	} else if (v == 'No Religion') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'No Religion','No Religion') ;  
	} else if (v == 'Inter Caste') {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 'Any');
        sus(f,1,'Inter Religion','Inter Religion');  		
	} else {
		f.subcaste.options.length = 0;
		f.subcaste.selectedIndex = -1;
		f.subcaste.options[0] = new Option('Any', 0);
	}
}