function set_elviaclaim_steptwo_reqest_withanswer(url) {
    url = replaceAll(url, "'", "`");     
    http_request = false;
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
        http_request = new XMLHttpRequest();
        //http_request.overrideMimeType('text/xml');
    } else if (window.ActiveXObject) { // IE
        try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }
    if (!http_request) {
        alert('Customer Request Error: Write Custimer Data');
        alertInhalt = '0';
        return false;
    } else {      
        //alert(url);
        alertInhalt = '1';
    }
    http_request.open('POST', url, true);
    //http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    http_request.onreadystatechange = sendRequest_elviaclaim_steptwo_response;
    http_request.send(null);
}

function sendRequest_elviaclaim_steptwo_response() {
    if (http_request.readyState==4 && http_request.status==200) {
        document.getElementById('form_validation').value = http_request.responseText;
    }
}
 
function elviaclaim_steptwo_validate_and_submit() {
    if (document.getElementById('form_validation').value == 'valid') {
        document.getElementById('form_validation').value = "valid_and_completed";
        document.forms['claimtwo_form'].submit();
    } else {
        set_translate_reqest_withanswer('/.core/js_translate.php?original='+encodeURIComponent('Bitte geben Sie die Daten vollständig ein, damit die Schadenerfassung bearbeitet werden kann.'), 'user_notice');
        if (document.getElementById('claim_steptwo_name_field').value.length == 0) {
            document.getElementById('claim_steptwo_name_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_name_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_name_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_name_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_name_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_name_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_firstname_field').value.length == 0) {
            document.getElementById('claim_steptwo_firstname_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_firstname_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_firstname_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_firstname_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_firstname_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_firstname_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_address_field').value.length == 0) {
            document.getElementById('claim_steptwo_address_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_address_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_address_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_address_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_address_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_address_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_zipcity_field').value.length == 0) {
            document.getElementById('claim_steptwo_zipcity_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_zipcity_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_zipcity_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_zipcity_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_zipcity_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_zipcity_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_phone_field').value.length == 0) {
            document.getElementById('claim_steptwo_phone_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_phone_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_phone_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_phone_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_phone_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_phone_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_email_field').value.length == 0) {
            document.getElementById('claim_steptwo_email_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_email_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_email_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_email_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_email_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_email_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }

        if (document.getElementById('claim_steptwo_owner_field').value.length == 0) {
            document.getElementById('claim_steptwo_owner_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_owner_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_owner_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_owner_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_owner_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_owner_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }
        var number_of_signs_in_bankfields = parseInt(document.getElementById('claim_steptwo_bankname_field').value.length) + 
                                            parseInt(document.getElementById('claim_steptwo_clearingno_field').value.length) + 
                                            parseInt(document.getElementById('claim_steptwo_accountno_field').value.length) + 
                                            parseInt(document.getElementById('claim_steptwo_bankaddress_field').value.length) + 
                                            parseInt(document.getElementById('claim_steptwo_bankcity_field').value.length);
        if (number_of_signs_in_bankfields < 7) {
            document.getElementById('claim_steptwo_bankname_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_bankname_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_bankname_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';

            document.getElementById('claim_steptwo_clearingno_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_clearingno_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_clearingno_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';

            document.getElementById('claim_steptwo_accountno_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_accountno_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_accountno_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';

            document.getElementById('claim_steptwo_bankaddress_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_bankaddress_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_bankaddress_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';

            document.getElementById('claim_steptwo_bankcity_field_left').src='/.file/input/txt_l_warning.gif';
            document.getElementById('claim_steptwo_bankcity_field_right').src='/.file/input/txt_r_warning.gif';
            document.getElementById('claim_steptwo_bankcity_field').style.backgroundImage='url(/.file/input/txt_bg_warning.gif)';
        } else {
            document.getElementById('claim_steptwo_bankname_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_bankname_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_bankname_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';

            document.getElementById('claim_steptwo_clearingno_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_clearingno_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_clearingno_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';

            document.getElementById('claim_steptwo_accountno_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_accountno_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_accountno_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';

            document.getElementById('claim_steptwo_bankaddress_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_bankaddress_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_bankaddress_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';

            document.getElementById('claim_steptwo_bankcity_field_left').src='/.file/input/txt_l.gif';
            document.getElementById('claim_steptwo_bankcity_field_right').src='/.file/input/txt_r.gif';
            document.getElementById('claim_steptwo_bankcity_field').style.backgroundImage='url(/.file/input/txt_bg.gif)';
        }
    }   
}

function elviaclaim_steptri_identicalorder_submit() {
    document.getElementById('form_validation').value = "identical";
    document.forms['claimtri_form'].submit();
}

function elviaclaim_steptri_orderedit_submit() {
    document.getElementById('form_validation').value = "orderedit";
    document.forms['claimtri_form'].submit();
}
 
