function set_focus() {
        // Setzt den Focus auf die Benutzereingabe
        document.inputForm.name.focus();
}
function set_login_focus() {
        // Setzt den Focus auf die Benutzereingabe
        document.loginForm.username.focus();
}
function set_fb_filter_focus() {
    // Setzt den Focus auf die Benutzereingabe
    document.inputForm.FBFilter.focus();
}
function set_hrz_filter_focus() {
    // Setzt den Focus auf die Benutzereingabe
    document.inputForm.HRZFilter.focus();
}
function starte_suche() {
        // Startet die Seite mit dem Suchergebnis
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 500;
        var y = 50;
        var win = open("","Ergebnisliste",
                    "width=380,height=500,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }

	win.focus();
        return true;
}
function starte_volleintrag() {
        // Startet die Seite fuer Volleintraege
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 400;
        var y = 50;
        var win = open("","Volleintrag",
                    "width=500,height=580,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }

        win.focus();
        return true;
}
function starte_export() {
        // Startet die Seite fuer Volleintraege
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 300;
        var y = 50;
        var win = open("","Export",
                    "width=700,height=580,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }

        win.focus();
        return true;
}
function starte_fachbereiche() {
        // Startet die Seite fuer Fachbereiche
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 400;
        var y = 50;
        var win = open("","Fachbereiche",
                    "width=500,height=580,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }
        document.inputForm.fbr.checked = true;

        win.focus();
        return true;
}
function starte_hauptreisezonen() {
        // Startet die Seite fuer Hauptreisezonen
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 400;
        var y = 50;
        var win = open("","Hauptreisezonen",
                    "width=500,height=580,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }
        document.inputForm.hrz.checked = true;

        win.focus();
        return true;
}
function oeffne_hilfe() {
        // Öffnet die Hilfeseiten und das Hotline-Formular
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 - 200;
        var y = 50;
        var win = open("","Hilfe",
                    "width=475,height=440,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }

        win.focus();
        return true;
}
function oeffne_korrektur() {
        // Öffnet die Korrektur-Formulare
        var w = screen.availWidth;
        var h = screen.availHeight;
        var x = w/2 -400;
        var y = 50;
        var win = open("","Korrektur",
                    "width=600,height=580,directories=no,location=no," +
                    "left=" + x + ",top=" + y + "," +
                    "screenX=" + x + ",screenY=" + y + "," +
                    "menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no");

        with (win.document) {
            write("<html><head></head><body></body></html>");
        }

        win.focus();
        return true;
}
function check_avt() {
    // Falls die Checkbox "Angestellte Vertretungen" aktiviert wurde,
    // wird die Checkbox "Selstständige Vertretungen" deaktiviert.
    if (document.inputForm.avt.checked == true)
        document.inputForm.svt.checked = false;
}
function check_svt() {
    // Falls die Checkbox "Selststãndige Vertretungen" aktiviert wurde,
    // wird die Checkbox "Angestellte Vertretungen" deaktiviert.
    if (document.inputForm.svt.checked == true)
        document.inputForm.avt.checked = false;
}
function check_vlfa() {
    // Falls die Checkbox "mit Fremdauslieferungen" aktiviert wurde,
    // wird die Checkbox "ohne Fremdauslieferungen" deaktiviert.
    if (document.inputForm.vlfa.checked == true)
        document.inputForm.vlofa.checked = false;
}
function check_vlofa() {
    // Falls die Checkbox "ohne Fremdauslieferungen" aktiviert wurde,
    // wird die Checkbox "mit Fremdauslieferungen" deaktiviert.
    if (document.inputForm.vlofa.checked == true)
        document.inputForm.vlfa.checked = false;
}
function check_vlmv() {
    // Falls die Checkbox "mit Vertretungen" aktiviert wurde,
    // wird die Checkbox "ohne Vertretungen" deaktiviert.
    if (document.inputForm.vlmv.checked == true)
        document.inputForm.vlov.checked = false;
}
function check_vlov() {
    // Falls die Checkbox "ohne Vertretungen" aktiviert wurde,
    // wird die Checkbox "mit Vertretungen" deaktiviert.
    if (document.inputForm.vlov.checked == true)
        document.inputForm.vlmv.checked = false;
}
function check_us() {
    // Falls ein Umsatz angewählt wurde, so wird
    // auch der untergeordnete Schalter aktiviert

    if (document.inputForm.us1.checked == true ||
        document.inputForm.us2.checked == true ||
        document.inputForm.us3.checked == true ||
        document.inputForm.us4.checked == true)
            document.inputForm.vlmu.checked = true

    if (document.inputForm.us1.checked == false &&
        document.inputForm.us2.checked == false &&
        document.inputForm.us3.checked == false &&
        document.inputForm.us4.checked == false)
            document.inputForm.vlmu.checked = false
}
function highlight_row(cell) {
	// Aufhellen der aktuellen Zeile

        var row = cell.parentNode;
	if (row == null)
		return;
	for (var z=0; z < row.childNodes.length; z++){
		var a_cell = row.childNodes[z];
		if (a_cell != null && a_cell.style != null)
			a_cell.style.backgroundColor='#C5C5C5';
	}
}
function clear_row(cell) {
    // Aufhellen der aktuellen Zeile

        var row = cell.parentNode;
	if (row == null)
		return;
	for (var z=0; z < row.childNodes.length; z++){
		var a_cell = row.childNodes[z];
		if (a_cell != null && a_cell.style != null)
			a_cell.style.background='none';
	}
}
function enable_subitems() {
	// Aktivieren/Deaktivieren der Radiobuttons für den Volleintragsexport
	for (var i = 0; i <= 3; i++) {
		document.inputForm.listoptionen[i].disabled = !(document.inputForm.liste.checked);
 	}
}