var cssClasses = new Array('BW', 'BY', 'B', 'BR', 'HB', 'HH', 'HE', 'MV', 'NI', 'NW', 'RP', 'SL', 'SN', 'ST', 'SH', 'TH', 'NN');
var landkreisListe, landkreisListeLaenge;

function getList() {
	landkreisListeLaenge = document.formular.landkreis.length;
	landkreisListe = new Array(landkreisListeLaenge);
	for (var i = 0; i < landkreisListeLaenge; i++) {
		landkreisListe[i] = document.formular.landkreis.options[i];
	}
}

function getChoice() {
	document.formular.landkreis.selectedIndex  = 0;
	var listIndex = document.formular.bundesland.selectedIndex;
	var listValue = document.formular.bundesland.options[listIndex].value;
	hide(listValue);
}

function hide(cssClass) {
	if (document.formular.landkreis.length < landkreisListeLaenge) {
		for (var i = document.formular.landkreis.length-1; i >= 0 ; i--) {
			document.formular.landkreis.options[i] = null;
		} // Liste leeren
		for (var i = 0; i < landkreisListeLaenge; i++) {
			var temp = new Option(landkreisListe[i].text, landkreisListe[i].value, false, false); //Text | Value | defaultSelected | selected
			document.formular.landkreis.options[i] = temp;
			document.formular.landkreis.options[i].className = landkreisListe[i].className;
		}// Liste fuellen
	}
	for (var i = document.formular.landkreis.length-1; i >= 0 ; i--) {
		if (document.formular.landkreis.options[i].className && document.formular.landkreis.options[i].className != cssClass) {
			document.formular.landkreis.options[i] = null;
		}// spezifische Eintrage aus Liste loeschen
	}
}

