function toggleCheckAll() {
    var oAllCheckbox = document.getElementById('checkAll');
    var bChecked = false;
    if (true == oAllCheckbox.checked) {
        bChecked = true;
    }

    var arCheckboxes = Form.getInputs('common_anfrage', 'checkbox');
    for (var i=0; i < arCheckboxes.length; i++) {
        oCheckBox = arCheckboxes[i];
        if ('checkAll' != oCheckBox.id) {
            oCheckBox.checked = bChecked;
        }
    }
}

function changeCheckboxState(sCheckboxID) {
    oCheckBox = document.getElementById(sCheckboxID);
    if (false == oCheckBox.checked) {
        oAllCheckbox = document.getElementById('checkAll');
        oAllCheckbox.checked = false;
    }
}



function checkSelection() {
        var form = document.getElementById('common_anfrage');

        var isOneChecked = false;
        var arCheckboxes = Form.getInputs('common_anfrage', 'checkbox');

        for (var i=0; i < arCheckboxes.length; i++) {
            oCheckBox = arCheckboxes[i];
            if (true == oCheckBox.checked) {
                isOneChecked=true;
                break;
            }
        }

        if ( isOneChecked==false) {
            alert ("Sie haben keine Unterkunft markiert.");
            window.scrollTo(0,0)
        }
        return isOneChecked;
}


