function ConfirmEmptyField(ControlID, msg) {
    if (document.getElementById(ControlID)) {
        if (document.getElementById(ControlID).value.length < 1) {
            return confirm(msg);
        }
        else {
            return true;
        }
    }
    else {
        return true;
    }
}

function OpenInNewWindow(href, windowname) {
    window.open(href, windowname, 'width=920,height=700,location=no,scrollbars=yes,resizable=yes,toolbar=no,,status=no');
}


$(document).ready(function () {
    $('.req').keyup(function () {
        if ($(this).val().length == 0)
        { $(this).css("background-color", "#ed8613"); } else { $(this).css("background-color", ""); }
    });
});


function DoSaveRechnungsBtt_ClientClick() {
    var val = Page_ClientValidate('BenutzerdatenInputs');
    if (!val) {
        var i = 0;
        for (; i < Page_Validators.length; i++) {
            if (!Page_Validators[i].isvalid) {
                $("#" + Page_Validators[i].controltovalidate)
                             .css("background-color", "#ed8613");
            }
            else {
                $("#" + Page_Validators[i].controltovalidate)
                             .css("background-color", "");
            }
        }
    }
    $('.req').each(function () {
        if ($(this).val().length == 0)
        { $(this).css("background-color", "#ed8613"); } else { $(this).css("background-color", ""); }
    });

    return val;
}
