/**
 * Passt die Unigebaeude-Auswahlliste an den ausgewaehlten Fachbereich an
 * 
 * @author Geocoding
 * @version 28.02.2010
 */

function editUni_building() {

	// aktiviert oder deaktiviert die Auswahlliste entsprechend der
	// Fachbereichsauswahl
	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "default")
		document.form.uni_building.disabled = true;
	else
		document.form.uni_building.disabled = false;

	// Passt den Inhalt der Liste der Fachbereichswahl an

	// Liste neutralisieren
	document.form.uni_building.length = 0; // Liste loeschen...
	document.form.uni_building.options[0] = new Option("Gebäude", "default"); // ...und
																				// Defaultwert
																				// neu
																				// schreiben.


	// Initialisieren der Gebaeudelistenintraege
	
	// Universitaet
	geb01 = new Option("01", "01");
	geb02 = new Option("02", "02");
	geb03 = new Option("03", "03");
	geb04 = new Option("04", "04");
	geb05 = new Option("05", "05");
	geb07 = new Option("07", "07");
	geb08 = new Option("08", "08");
	geb09 = new Option("09", "09");
	geb10 = new Option("10", "10");
	geb11 = new Option("11", "11");
	geb12 = new Option("12", "12");
	geb13 = new Option("13", "13");
	geb14 = new Option("14", "14");
	geb15 = new Option("15 (\"EW-Gebäude\")", "15");
	geb16 = new Option("16", "16");
	geb17 = new Option("17", "17");
	geb18 = new Option("18", "18");
	geb19 = new Option("19", "19");
	geb20 = new Option("20", "20");
	geb21 = new Option("21", "21");
	geb22 = new Option("22", "22");
	geb24 = new Option("24", "24");
	geb25 = new Option("25", "25");
	geb26 = new Option("26", "26");
	geb27 = new Option("27", "27");
	geb28 = new Option("28", "28");
	geb29 = new Option("29", "29");
	geb30 = new Option("30", "30");
	geb31 = new Option("31 (AVZ)", "31");
	geb32 = new Option("32-34", "32-34");
	geb35 = new Option("35-39", "35-39");
	geb41 = new Option("41", "41");
	geb42 = new Option("42", "42");
	geb43 = new Option("43", "43");
	geb44 = new Option("44", "44");
	geb45 = new Option("45", "45");
	geb46 = new Option("46", "46");
	geb47 = new Option("47", "47");
	geb54 = new Option("54", "54");
	geb61 = new Option("61/62", "61/62");
	geb64 = new Option("64 (Tropengewächshaus)", "64");
	geb66 = new Option("66 (\"Reithalle\")", "66");
	geb67 = new Option("67", "67");
	geb68 = new Option("68", "68");
	geb69 = new Option("69", "69");
	geb70 = new Option("70", "70");
	geb71 = new Option("71", "71");
	geb91 = new Option("91", "91");
	geb92 = new Option("92", "92");
	geb93 = new Option("93", "93");
	
	// Fachhochschule
	gebaa = new Option("AA", "Fachhochschulgebäude AA");
	gebab = new Option("AB", "Fachhochschulgebäude AB");
	gebac = new Option("AC", "Fachhochschulgebäude AC");
	gebad = new Option("AD", "Fachhochschulgebäude AD");
	gebca = new Option("CA (Gästehaus)", "Fachhochschulgebäude CA");
	gebcb = new Option("CB (Präsidium)", "Fachhochschulgebäude CB");
	gebcc = new Option("CC (ZSB)", "Fachhochschulgebäude CC");
	gebcd = new Option("CD (Internationales Büro)", "Fachhochschulgebäude CD");
	gebce = new Option("CE", "Fachhochschulgebäude CE");
	gebcf = new Option("CF", "Fachhochschulgebäude CF");
	gebcg = new Option("CG (Mehrzweckhalle)", "Fachhochschulgebäude CG");
	gebch = new Option("CH", "Fachhochschulgebäude CH");
	gebcj = new Option("CJ", "Fachhochschulgebäude CJ");
	gebck = new Option("CK", "Fachhochschulgebäude CK");
	gebcl = new Option("CL", "Fachhochschulgebäude CL");
	gebcm = new Option("CM (Cafeteria)", "Fachhochschulgebäude CM");
	gebcn = new Option("CN", "Fachhochschulgebäude CN");
	gebf = new Option("F", "Fachhochschulgebaeude F");
	gebfa = new Option("FA (Institut für Musik)", "Fachhochschulgebäude FA");
	gebfb = new Option("FB", "Fachhochschulgebäude FB");
	gebsb = new Option("SB", "Fachhochschulgebäude SB");
	gebsc = new Option("SC", "Fachhochschulgebäude SC");
	gebsd = new Option("SD", "Fachhochschulgebäude SD");
	gebse = new Option("SE", "Fachhochschulgebäude SE");
	gebsf = new Option("SF", "Fachhochschulgebäude SF");
	gebsg = new Option("SG", "Fachhochschulgebäude SG");
	gebsh = new Option("SH", "Fachhochschulgebäude SH");
	gebsi = new Option("SI", "Fachhochschulgebäude SI");

	// Hinzufuegen der jeweils zutreffenden Gebaeudelisteneintraege

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "all_uni") {
		document.form.uni_building.options[document.form.uni_building.length] = geb01;
		document.form.uni_building.options[document.form.uni_building.length] = geb02;
		document.form.uni_building.options[document.form.uni_building.length] = geb03;
		document.form.uni_building.options[document.form.uni_building.length] = geb04;
		document.form.uni_building.options[document.form.uni_building.length] = geb05;
		document.form.uni_building.options[document.form.uni_building.length] = geb07;
		document.form.uni_building.options[document.form.uni_building.length] = geb08;
		document.form.uni_building.options[document.form.uni_building.length] = geb09;
		document.form.uni_building.options[document.form.uni_building.length] = geb10;
		document.form.uni_building.options[document.form.uni_building.length] = geb11;
		document.form.uni_building.options[document.form.uni_building.length] = geb12;
		document.form.uni_building.options[document.form.uni_building.length] = geb13;
		document.form.uni_building.options[document.form.uni_building.length] = geb14;
		document.form.uni_building.options[document.form.uni_building.length] = geb15;
		document.form.uni_building.options[document.form.uni_building.length] = geb16;
		document.form.uni_building.options[document.form.uni_building.length] = geb17;
		document.form.uni_building.options[document.form.uni_building.length] = geb18;
		document.form.uni_building.options[document.form.uni_building.length] = geb19;
		document.form.uni_building.options[document.form.uni_building.length] = geb21;
		document.form.uni_building.options[document.form.uni_building.length] = geb22;
		document.form.uni_building.options[document.form.uni_building.length] = geb24;
		document.form.uni_building.options[document.form.uni_building.length] = geb25;
		document.form.uni_building.options[document.form.uni_building.length] = geb26;
		document.form.uni_building.options[document.form.uni_building.length] = geb27;
		document.form.uni_building.options[document.form.uni_building.length] = geb28;
		document.form.uni_building.options[document.form.uni_building.length] = geb29;
		document.form.uni_building.options[document.form.uni_building.length] = geb30;
		document.form.uni_building.options[document.form.uni_building.length] = geb31;
		document.form.uni_building.options[document.form.uni_building.length] = geb32;
		document.form.uni_building.options[document.form.uni_building.length] = geb35;
		document.form.uni_building.options[document.form.uni_building.length] = geb41;
		document.form.uni_building.options[document.form.uni_building.length] = geb42;
		document.form.uni_building.options[document.form.uni_building.length] = geb43;
		document.form.uni_building.options[document.form.uni_building.length] = geb45;
		document.form.uni_building.options[document.form.uni_building.length] = geb46;
		document.form.uni_building.options[document.form.uni_building.length] = geb47;
		document.form.uni_building.options[document.form.uni_building.length] = geb61;
		document.form.uni_building.options[document.form.uni_building.length] = geb64;
		document.form.uni_building.options[document.form.uni_building.length] = geb66;
		document.form.uni_building.options[document.form.uni_building.length] = geb67;
		document.form.uni_building.options[document.form.uni_building.length] = geb68;
		document.form.uni_building.options[document.form.uni_building.length] = geb69;
		document.form.uni_building.options[document.form.uni_building.length] = geb70;
		document.form.uni_building.options[document.form.uni_building.length] = geb71;
		document.form.uni_building.options[document.form.uni_building.length] = geb91;
		document.form.uni_building.options[document.form.uni_building.length] = geb92;
		document.form.uni_building.options[document.form.uni_building.length] = geb93;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "all_fh") {
		document.form.uni_building.options[document.form.uni_building.length] = gebaa;
		document.form.uni_building.options[document.form.uni_building.length] = gebab;
		document.form.uni_building.options[document.form.uni_building.length] = gebac;
		document.form.uni_building.options[document.form.uni_building.length] = gebad;
		document.form.uni_building.options[document.form.uni_building.length] = gebca;
		document.form.uni_building.options[document.form.uni_building.length] = gebcb;
		document.form.uni_building.options[document.form.uni_building.length] = gebcc;
		document.form.uni_building.options[document.form.uni_building.length] = gebcd;
		document.form.uni_building.options[document.form.uni_building.length] = gebce;
		document.form.uni_building.options[document.form.uni_building.length] = gebcf;
		document.form.uni_building.options[document.form.uni_building.length] = gebcg;
		document.form.uni_building.options[document.form.uni_building.length] = gebch;
		document.form.uni_building.options[document.form.uni_building.length] = gebcj;
		document.form.uni_building.options[document.form.uni_building.length] = gebck;
		document.form.uni_building.options[document.form.uni_building.length] = gebcl;
		document.form.uni_building.options[document.form.uni_building.length] = gebcm;
		document.form.uni_building.options[document.form.uni_building.length] = gebcn;
		document.form.uni_building.options[document.form.uni_building.length] = gebf;
		document.form.uni_building.options[document.form.uni_building.length] = gebfa;
		document.form.uni_building.options[document.form.uni_building.length] = gebfb;
		document.form.uni_building.options[document.form.uni_building.length] = gebsb;
		document.form.uni_building.options[document.form.uni_building.length] = gebsc;
		document.form.uni_building.options[document.form.uni_building.length] = gebsd;
		document.form.uni_building.options[document.form.uni_building.length] = gebse;
		document.form.uni_building.options[document.form.uni_building.length] = gebsf;
		document.form.uni_building.options[document.form.uni_building.length] = gebsg;
		document.form.uni_building.options[document.form.uni_building.length] = gebsh;
		document.form.uni_building.options[document.form.uni_building.length] = gebsi;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb01") {
		document.form.uni_building.options[document.form.uni_building.length] = geb04;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb02") {
		document.form.uni_building.options[document.form.uni_building.length] = geb02;
		document.form.uni_building.options[document.form.uni_building.length] = geb04;
		document.form.uni_building.options[document.form.uni_building.length] = geb05;
		document.form.uni_building.options[document.form.uni_building.length] = geb18;
		document.form.uni_building.options[document.form.uni_building.length] = geb45;
		document.form.uni_building.options[document.form.uni_building.length] = geb46;

	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb03") {
		document.form.uni_building.options[document.form.uni_building.length] = geb01;
		document.form.uni_building.options[document.form.uni_building.length] = geb15;
		document.form.uni_building.options[document.form.uni_building.length] = geb17;
		document.form.uni_building.options[document.form.uni_building.length] = geb24;
		document.form.uni_building.options[document.form.uni_building.length] = geb31;
		document.form.uni_building.options[document.form.uni_building.length] = geb43;
		document.form.uni_building.options[document.form.uni_building.length] = geb91;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb04") {
		document.form.uni_building.options[document.form.uni_building.length] = geb32;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb05") {
		document.form.uni_building.options[document.form.uni_building.length] = geb32;
		document.form.uni_building.options[document.form.uni_building.length] = geb35;
		document.form.uni_building.options[document.form.uni_building.length] = geb61;
		document.form.uni_building.options[document.form.uni_building.length] = geb64;
		document.form.uni_building.options[document.form.uni_building.length] = geb67;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb06") {
		document.form.uni_building.options[document.form.uni_building.length] = geb31;
		document.form.uni_building.options[document.form.uni_building.length] = geb66;
		document.form.uni_building.options[document.form.uni_building.length] = geb69;
		document.form.uni_building.options[document.form.uni_building.length] = geb91;
		document.form.uni_building.options[document.form.uni_building.length] = geb92;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb07") {
		document.form.uni_building.options[document.form.uni_building.length] = geb07;
		document.form.uni_building.options[document.form.uni_building.length] = geb41;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb08") {
		document.form.uni_building.options[document.form.uni_building.length] = geb15;
		document.form.uni_building.options[document.form.uni_building.length] = geb31;
		document.form.uni_building.options[document.form.uni_building.length] = geb54;
		document.form.uni_building.options[document.form.uni_building.length] = geb70;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb09") {
		document.form.uni_building.options[document.form.uni_building.length] = geb22;
		document.form.uni_building.options[document.form.uni_building.length] = geb29;
		document.form.uni_building.options[document.form.uni_building.length] = geb45;
		document.form.uni_building.options[document.form.uni_building.length] = geb47;
	}

	if (document.form.uni_fb.options[document.form.uni_fb.selectedIndex].value == "fb10") {
		document.form.uni_building.options[document.form.uni_building.length] = geb20;
		document.form.uni_building.options[document.form.uni_building.length] = geb22;
		document.form.uni_building.options[document.form.uni_building.length] = geb25;
		document.form.uni_building.options[document.form.uni_building.length] = geb27;
		document.form.uni_building.options[document.form.uni_building.length] = geb28;
		document.form.uni_building.options[document.form.uni_building.length] = geb44;
	}

}
