var theTopics = new Array();

theTopics[1] = new Array('Background to Family Separation','Social Assistance Programmes','Family Support Interventions','Health and Nutrition Programmes','Education Programmes');

theTopics[2] = new Array('Topic One','Topic Two','Topic Three');

theTopics[3] = new Array('Topic One','Topic Two','Topic Three');

theTopics[4] = new Array('Topic One','Topic Two');

theTopics[5] = new Array('Topic One','Topic Two','Topic Three');

theTopics[6] = new Array('Topic One','Topic Two','Topic Three','Topic Four');

// value of each populated select option is set to 1, 2, 3.. and so on
function populate() {
	which = document.search.themes.options[document.search.themes.options.selectedIndex].value;
	document.search.topics.options.length = 0;
	if (which == "") {
		document.search.topics.options[0] = new Option('Select a Theme Above','',true,false);
	} else {
		document.search.topics.options[0] = new Option('Select a Topic','',true,false);
		for (i = 1; i < theTopics[which].length+1; i++) {
			document.search.topics.options[i] = new Option(theTopics[which][i-1],i,false,false);
		}
	}
}

