function setBranche(){
	var branche = document.getElementById("branche");
	var functie = document.getElementById("functie");
	if (branche != null && functie != null){
		var name = branche.options[branche.selectedIndex].value;
		functie.options.length = 0;
		var option = null;
		if(name == "Horeca"){
			functie.options.add(createOption("Eigenaar"));
			functie.options.add(createOption("Horecamanager"));
			functie.options.add(createOption("Bedrijfsleider"));
			functie.options.add(createOption("Chef-kok"));
			functie.options.add(createOption("Anders"));
		} else if (name == "Bedrijven"){
			functie.options.add(createOption("Directeur/Eigenaar"));
			functie.options.add(createOption("Facilitair manager"));
			functie.options.add(createOption("Anders"));
		} else if (name == "Zorg"){
			functie.options.add(createOption("Directeur"));
			functie.options.add(createOption("Hoofd zorg"));
			functie.options.add(createOption("Chef-kok"));
			functie.options.add(createOption("Anders"));
		} else if (name == "Onderwijs"){
			functie.options.add(createOption("Directeur"));
			functie.options.add(createOption("Facilitair manager"));
			functie.options.add(createOption("Cateraar"));
			functie.options.add(createOption("Anders"));
		} else if (name == "Catering"){
			functie.options.add(createOption("Directeur / Eigenaar"));
			functie.options.add(createOption("Cateringmanager"));
			functie.options.add(createOption("Anders"));
		}else if (name == "Cafetaria"){
			functie.options.add(createOption("Eigenaar"));
			functie.options.add(createOption("Bedrijfsleider"));
			functie.options.add(createOption("Anders"));
		}  else {
			functie.options.add(createOption("Selecteer een branche"));
		}
	}
}


function createOption(name){
	var option = document.createElement('option');
	option.text = name;
	option.value = name;
	return option;
}