/* Arclab Web Form Builder js */ var awf_activePage=0; var awf_activeID=''; var awf_boolSubmit=false; var awf_rundate=new Date(); var awf_xhr_captcha=null; var awf_xhr_submit=null; var awf_ID20=''; var awf_ID30=''; var awf_ID41=''; var awf_ID1=false; var awf_url='/abschleppen-billig.php'; function awf_Run(id) { var css=document.createElement('style'); css.innerHTML="/* Arclab Web Form Builder CSS */\r\n@font-face{font-family:\'Material Icons\';font-style:normal;font-weight:400;src:local(\'Material Icons\'),local(\'MaterialIcons-Regular\'),url(\'"+awf_url+"?font=woff\')format(\'woff\');}\r\n#awf *:before, #awf *:after {all:unset;}\r\n#awf *, #awf *:before, #awf *:after {white-space:normal;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;outline:0;outline-offset:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:auto;}\r\n#awf div:before, #awf div:after {clear:both;content:\".\";display:block;height:0;visibility:hidden;overflow:hidden;}\r\n#awf div, #awf p {display:block;margin:0;padding:0;border:0;width:100%;height:auto;}\r\n#awf img {margin:0;padding:0;border:0;vertical-align:middle;}\r\n#awf input, #awf select, #awf textarea, #awf button {display:inline-block;margin:0;padding:0;border-radius:0;}\r\n#awf textarea, #awf input[type=\"text\"], #awf input[type=\"button\"], #awf input[type=\"submit\"] {-webkit-appearance:none;border-radius:0;}\r\n#awf input[type=\"checkbox\"]+label, #awf input[type=\"radio\"]+label, #awf input[type=\"file\"]+label {margin:0;padding:0;border:0;}\r\n#awf {width:300px;background-color:yellow;color:black;}\r\n#awf input[type=\"text\"] {width:100%;height:2em;background-color:white;border:1px solid darkgray;box-shadow:none;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:normal;margin:0;padding:0 0.25em;}\r\n#awf input[type=\"text\"]:invalid {color:tomato;}\r\n#awf input[type=\"text\"]:focus {border:1px solid steelblue;color:black;}\r\n#awf input[type=\"text\"]:focus:invalid {border:1px solid tomato;}\r\n#awf input[type=\"text\"]::-webkit-input-placeholder {color:lightgray;text-transform:none !important;opacity:1}\r\n#awf input[type=\"text\"]:-moz-placeholder {color:lightgray;text-transform:none !important;opacity:1}\r\n#awf input[type=\"text\"]::-moz-placeholder {color:lightgray;text-transform:none !important;opacity:1}\r\n#awf input[type=\"text\"]:-ms-input-placeholder {color:lightgray;text-transform:none !important;opacity:1}\r\n#awf input[type=\"text\"]::-ms-input-placeholder {color:lightgray;text-transform:none !important;opacity:1}\r\n#awf input:disabled {background-color:#fdfdfd;border:1px solid lightgray;color:lightgray;}\r\n#awf .awf-obox {width:100%;height:2em;background-color:white;border:1px solid darkgray;box-shadow:none;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:normal;margin:0;padding:0 0.25em;}\r\n#awf .awf-obox {line-height:calc(2em - 2px);}\r\n#awf select {-webkit-appearance:none;-ms-appearance:none;appearance:none;}\r\n#awf select::-ms-expand {display:none;}\r\n#awf .awf-selico {width:auto;height:auto;background-color:transparent;color:dimgray;font-family:\'Material Icons\';font-size:1.4em;line-height:1;margin:0;padding:0.2em 0.2em 0 0;position:absolute;top:0;right:0;pointer-events:none;}\r\n#awf .awf-selico:before {content:\'\\E5CF\';}\r\n#awf .awf-selico:before {height:auto;width:auto;visibility:visible;}\r\n#awf select:focus::-ms-value {color:black;background-color:transparent;}\r\n#awf select:-moz-focusring {color:transparent;}\r\n#awf select:disabled::-ms-value {color:lightgray;}\r\n#awf select {width:100%;height:2em;background-color:white;border:1px solid darkgray;box-shadow:none;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:normal;margin:0;padding:0 1.8em 0 0.2em;}\r\n#awf select:required:invalid {color:lightgray;}\r\n#awf select:focus {border:1px solid steelblue;color:black;}\r\n#awf select:focus:required:invalid {border:1px solid tomato;color:black;}\r\n#awf select:disabled {background-color:#fdfdfd;border:1px solid lightgray;color:lightgray;}\r\n#awf input[type=\"checkbox\"] {opacity:0 !important;width:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important;outline:0 !important;position:absolute !important;}\r\n#awf input[type=\"checkbox\"]+label {display:inline-block;width:calc(1em + 2px);height:calc(1em + 2px);background-color:white;border:1px solid darkgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:1;text-align:center;vertical-align:middle;}\r\n#awf input[type=\"checkbox\"]+label:before {content:\' \';}\r\n#awf input[type=\"checkbox\"]+label+label {display:inline-block;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:2em;margin:0 1em 0 0.4em;padding:0;vertical-align:middle;}\r\n#awf input[type=\"checkbox\"]:checked+label {color:black;}\r\n#awf input[type=\"checkbox\"]:checked+label:before {content:\'\\E5CA\';}\r\n#awf input[type=\"checkbox\"]:invalid+label {border:1px solid tomato;color:tomato;}\r\n#awf input[type=\"checkbox\"]:focus+label {border:1px solid steelblue;color:steelblue;}\r\n#awf input[type=\"checkbox\"]:disabled+label {border:1px solid lightgray;color:lightgray;}\r\n#awf input[type=\"checkbox\"]:disabled+label+label {color:lightgray;}\r\n#awf .awf-cbi {display:inline-block;width:auto;vertical-align:top;}\r\n#awf input[type=\"radio\"] {opacity:0 !important;width:0 !important;margin:0 !important;padding:0 !important;box-shadow:none !important;outline:0 !important;position:absolute !important;}\r\n#awf input[type=\"radio\"]+label {display:inline-block;width:calc(1em + 2px);height:calc(1em + 2px);background-color:white;border:1px solid darkgray;color:darkgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:1;text-align:center;vertical-align:middle;}\r\n#awf input[type=\"radio\"]+label+label {display:inline-block;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:2em;margin:0 1em 0 0.4em;padding:0;vertical-align:middle;}\r\n#awf input[type=\"radio\"]:checked+label {color:black;}\r\n#awf input[type=\"radio\"]:checked+label:before {content:\'\\E5CD\';}\r\n#awf input[type=\"radio\"]:invalid+label {border:1px solid tomato;color:tomato;}\r\n#awf input[type=\"radio\"]:focus+label {border:1px solid steelblue;color:steelblue;}\r\n#awf input[type=\"radio\"]:disabled+label {color:lightgray;}\r\n#awf input[type=\"radio\"]:disabled+label+label {color:lightgray;}\r\n#awf .awf-rbi {display:inline-block;width:auto;vertical-align:top;}\r\n#awf input[type=\"file\"] {opacity:0 !important;width:0.1px !important;height:0.1px !important;margin:0 !important;padding:0 !important;box-shadow:none !important;outline:0 !important;position:absolute !important;}\r\n#awf input[type=\"file\"]+label {display:inline-block;background-color:whitesmoke;border:1px solid darkgray;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:2.5em;margin:0;padding:0 0.75em;max-width:100%;overflow:hidden;}\r\n#awf input[type=\"file\"]:invalid+label {color:tomato;}\r\n#awf input[type=\"file\"]:focus+label {border:1px solid steelblue;}\r\n#awf input[type=\"file\"]:hover+label {border:1px solid steelblue;}\r\n#awf input[type=\"file\"]:active+label {border:1px solid black;position:relative; top:1px;}\r\n#awf input[type=\"file\"]:disabled+label {background-color:whitesmoke !important;border:1px solid lightgray !important;color:gray !important;}\r\n#awf textarea {display:block;width:100%;background-color:white;border:1px solid darkgray;box-shadow:none;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:normal;margin:0;padding:0.25em;resize:none;overflow:auto;white-space:pre-wrap;}\r\n#awf textarea:invalid {color:tomato;}\r\n#awf textarea:focus {border:1px solid steelblue;color:black;}\r\n#awf textarea:focus:invalid {border:1px solid tomato;}\r\n#awf textarea::-webkit-input-placeholder {color:lightgray;}\r\n#awf textarea:-moz-placeholder {color:lightgray;}\r\n#awf textarea::-moz-placeholder {color:lightgray;}\r\n#awf textarea:-ms-input-placeholder {color:lightgray;}\r\n#awf textarea::-ms-input-placeholder {color:lightgray;}\r\n#awf textarea:read-only {display:block;width:100%;background-color:white;border:1px solid darkgray;box-shadow:none;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:normal;margin:0;padding:0.25em;resize:none;overflow:auto;white-space:pre-wrap;}\r\n#awf textarea:disabled {background-color:#fdfdfd;border:1px solid lightgray;color:lightgray;}\r\n#awf .awf-ico {font-family:\'Material Icons\';vertical-align:middle;line-height:1;font-weight:normal;}\r\n#awf button {background-color:whitesmoke;border:1px solid darkgray;border-radius:0;color:black;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:2.5em;margin:0;padding:0 0.75em;max-width:100%;overflow:hidden;}\r\n#awf button:focus, #awf button[type=\"button\"]:focus.awf-butprevious, #awf button[type=\"submit\"]:focus.awf-butnext, #awf button[type=\"submit\"]:focus.awf-butsubmit, #awf button[type=\"button\"]:focus.awf-butreset {border:1px solid steelblue;}\r\n#awf button:hover, #awf button[type=\"button\"]:hover.awf-butprevious, #awf button[type=\"submit\"]:hover.awf-butnext, #awf button[type=\"submit\"]:hover.awf-butsubmit, #awf button[type=\"button\"]:hover.awf-butreset {border:1px solid steelblue;}\r\n#awf button:active, #awf button[type=\"button\"]:active.awf-butprevious, #awf button[type=\"submit\"]:active.awf-butnext, #awf button[type=\"submit\"]:active.awf-butsubmit, #awf button[type=\"button\"]:active.awf-butreset {border:1px solid black;position:relative; top:1px;}\r\n#awf button:disabled, #awf button[type=\"button\"]:disabled.awf-butprevious, #awf button[type=\"submit\"]:disabled.awf-butnext, #awf button[type=\"submit\"]:disabled.awf-butsubmit, #awf button[type=\"button\"]:disabled.awf-butreset {background-color:whitesmoke !important;border:1px solid lightgray !important;color:gray !important;}\r\n#awf h1 {font-size:2.2em;font-weight:normal;line-height:normal;margin:0 0 0.5em 0;padding:0;}\r\n#awf h2 {font-size:1.8em;font-weight:normal;line-height:normal;margin:0 0 0.5em 0;padding:0;}\r\n#awf h3 {font-size:1.6em;font-weight:normal;line-height:normal;margin:0 0 0.5em 0;padding:0;}\r\n#awf h4 {font-size:1.4em;font-weight:normal;line-height:normal;margin:0 0 0.5em 0;}\r\n#awf h5 {font-size:1.2em;font-weight:bold;line-height:normal;margin:0 0 0.5em 0;padding:0;}\r\n#awf h6 {font-size:1.0em;font-weight:bold;line-height:normal;margin:0 0 0.5em 0;padding:0;}\r\n#awf hr {height:1px;background-color:darkgray;border:none;color:darkgray;margin:0.5em 0;padding:0;}\r\n#awf .awf-div {display:inline-block;vertical-align:top;}\r\n#awf .awf-spc {padding:0.5em;}\r\n#awf .awf-spc-inner {padding-left:0; margin-left:0; padding-right:0; margin-right:0; padding-bottom:0; margin-bottom:0;}\r\n#awf .awf-blank {height:1em;}\r\n#awf p {margin:0 0 0.5em 0;}\r\n#awf p:last-child {margin:0;}\r\n#awf label.awf-label {display:inline-block;width:100%;background-color:inherit;border:0;border-radius:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:2em;margin:0;padding:0;}\r\n#awf label.awf-labelreq:after {content:\' *\'; color:darkorange;}\r\n#awf label.awf-labelcust1 {color:dimgray;}\r\n#awf label.awf-labelcust2 {color:darkorange;}\r\n#awf label.awf-labelcust3 {color:steelblue;}\r\n#awf input[type=\"text\"].awf-glyphs-eb1 {padding:0 0.25em 0 2.25em;}\r\n#awf select.awf-glyphs-sel1 {padding:0.25em 0.25em 0.25em 2.25em;}\r\n#awf input[type=\"text\"].awf-glyphs-eb2 {padding:0 0.25em 0 10.25em;}\r\n#awf select.awf-glyphs-sel2 {padding:0.25em 0.25em 0.25em 10.25em;}\r\n#awf input[type=\"text\"].awf-glyphs-eb3 {padding:0 0.25em 0 2.25em;}\r\n#awf .awf-glyphs-eb1bk {display:table;width:2em;height:calc(2em - 2px);background-color:#f7f7f7;border-right:1px solid lightgray;position:absolute;top:1px;left:1px;overflow:hidden;border-top-right-radius:0;border-bottom-right-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-sel1bk {display:table;width:calc(2em - 2px);height:calc(2em - 2px);background-color:#f7f7f7;border-right:1px solid lightgray;position:absolute;top:1px;left:1px;overflow:hidden;border-top-right-radius:0;border-bottom-right-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-eb1gl {display:table-cell;width:100%;color:dimgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:normal;text-align:center;vertical-align:middle;}\r\n#awf .awf-glyphs-sel1gl {display:table-cell;width:100%;color:dimgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:normal;text-align:center;vertical-align:middle;}\r\n#awf .awf-glyphs-eb2bk {display:table;width:calc(10em - 1px);height:calc(2em - 2px);background-color:#f7f7f7;padding:0 0.5em;border-right:1px solid lightgray;position:absolute;top:1px;left:1px;overflow:hidden;border-top-right-radius:0;border-bottom-right-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-sel2bk {display:table;width:calc(10em - 1px);height:calc(2em - 2px);background-color:#f7f7f7;border-right:1px solid lightgray;position:absolute;top:1px;left:1px;overflow:hidden;border-top-right-radius:0;border-bottom-right-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-eb2gl {display:table-cell;width:100%;color:dimgray;line-height:normal;text-align:center;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}\r\n#awf .awf-glyphs-sel2gl {display:table-cell;width:100%;color:dimgray;line-height:normal;padding:0 0.5em;text-align:center;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}\r\n#awf .awf-glyphs-eb3bk {display:table;width:2em;height:2em;position:absolute;top:0px;left:0px;overflow:hidden;border-top-right-radius:0;border-bottom-right-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-eb4bk {display:table;width:2em;height:2em;position:absolute;top:0px;right:0px;overflow:hidden;border-top-left-radius:0;border-bottom-left-radius:0;table-layout:fixed;}\r\n#awf .awf-glyphs-eb3gl {display:table-cell;width:100%;color:dimgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:normal;text-align:center;vertical-align:middle;}\r\n#awf .awf-glyphs-eb4gl {display:table-cell;width:100%;color:dimgray;font-family:\'Material Icons\';font-size:1.4em;font-weight:normal;line-height:normal;text-align:center;vertical-align:middle;}\r\n#awf .awf-error {position:absolute;left:0px;top:0px;overflow:visible;display:block;opacity:0;-webkit-transition:opacity 0.1s;transition:opacity 0.1s;}\r\n#awf .awf-error-req-o {display:inline-block;width:auto;background-color:darkorange;border-radius:3px;line-height:normal;margin:0.75em 0 0 0.75em;white-space:nowrap;}\r\n#awf .awf-error-req-l {display:inline-block;color:white;font-family:\'Material Icons\';font-size:2em;padding:0.25em;vertical-align:middle;}\r\n#awf .awf-error-req-l:before {content:\'\\E001\';}\r\n#awf .awf-error-req-r {display:inline-block;color:white;padding:0 0.5em 0 0;vertical-align:middle;white-space:nowrap;}\r\n#awf .awf-error-inv-o {display:inline-block;width:auto;background-color:tomato;border-radius:3px;line-height:normal;margin:0.75em 0 0 0.75em;white-space:nowrap;}\r\n#awf .awf-error-inv-l {display:inline-block;color:white;font-family:\'Material Icons\';font-size:2em;padding:0.25em;vertical-align:middle;}\r\n#awf .awf-error-inv-l:before {content:\'\\E14B\';}\r\n#awf .awf-error-inv-r {display:inline-block;color:white;padding:0 0.5em 0 0;vertical-align:middle;white-space:nowrap;}\r\n#awf .awf-error-ext-o {display:inline-block;width:auto;background-color:tomato;border-radius:3px;line-height:normal;margin:0.75em 0 0 0.75em;white-space:nowrap;}\r\n#awf .awf-error-ext-l {display:inline-block;color:white;font-family:\'Material Icons\';font-size:2em;padding:0.25em;vertical-align:middle;}\r\n#awf .awf-error-ext-l:before {content:\'\\E14B\';}\r\n#awf .awf-error-ext-r {display:inline-block;color:white;padding:0 0.5em 0 0;vertical-align:middle;white-space:nowrap;}\r\n#awf #awf-ID15 {margin:0;padding:0;}\r\n#awf #awf-ID15-hr {margin:0.25em 0 0 0;padding:0;}\r\n#awf #awf-ID30 {height:10em;}\r\n#awf #awf-ID36 {margin:0;padding:0;}\r\n#awf #awf-ID38 {background-color:white;}\r\n"; document.head.appendChild(css); document.getElementById(id).innerHTML="\r\n
\r\n"; var form=document.getElementById('awf'); form.noValidate=true; form.onsubmit=function(event){event.preventDefault();awf_Validate();return false;}; awf_SP(1); } function awf_SP(page) { if(page===1) { awf_activePage=1; awf_activeID='awf-ID1'; document.getElementById("awf").innerHTML="
\r\n
\r\n
\r\n

Soforthilfe


\r\n
\r\n
\r\n

0176 - 624 186 71

\r\n
\r\n
\r\n\r\n
\r\n
Die Eingabe ist ungültig.
\r\n
\r\n
\r\n
\r\n
Die Eingabe ist ungültig.
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
Die Eingabe ist ungültig.
\r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
"; awf_SetString('awf-ID20',awf_ID20); awf_SetTA('awf-ID30',awf_ID30); awf_CheckTA('awf-ID30',awf_ID30,'',''); awf_SetString('awf-ID41',awf_ID41); if(awf_ID1)awf_Scroll('awf',true); awf_ID1=true; } awf_Update(null); } function awf_PageOutputVal() { awf_OutputVal('awf-ID20',awf_ID20); awf_OutputVal('awf-ID30',awf_ID30); awf_OutputVal('awf-ID41',awf_ID41); } function awf_Validate() { if(awf_activePage===1) { if(awf_isLost('awf-ID20')) return; if(!awf_isDisabled('awf-ID20') && awf_isVisible('awf-ID20')) { if(awf_isInvalid('awf-ID20')){awf_ShowError('awf-ID20-error-inv','awf-ID20');return;} } if(awf_isLost('awf-ID41')) return; if(!awf_isDisabled('awf-ID41') && awf_isVisible('awf-ID41')) { if(awf_isInvalid('awf-ID41')){awf_ShowError('awf-ID41-error-inv','awf-ID41');return;} } if(awf_isLost('awf-ID30')) return; if(!awf_isDisabled('awf-ID30') && awf_isVisible('awf-ID30')) { if(awf_isInvalid('awf-ID30')){awf_ShowError('awf-ID30-error-inv','awf-ID30');return;} } } awf_ValidateRC(); } function awf_ValidateRC() { awf_Submit(); } function awf_FS(submit) { awf_boolSubmit=submit; } function awf_Submit() { if(!awf_boolSubmit && awf_activePage<1) { awf_SP(awf_activePage+1); return; } if(awf_boolSubmit || awf_activePage===1) { document.getElementById('awf-fieldset').disabled='disabled'; var fd=new FormData(); fd.append('ID20',awf_ID20); fd.append('ID30',awf_ID30); fd.append('ID41',awf_ID41); awf_xhr_submit=new XMLHttpRequest();awf_xhr_submit.open('POST',awf_url+'?submit=awf'); awf_xhr_submit.onreadystatechange=function(){if(awf_xhr_submit.readyState===4){if(awf_xhr_submit.status===200){awf_Success(awf_xhr_submit.responseText);}else{awf_Error(awf_xhr_submit.statusText);}}}; awf_xhr_submit.send(fd); } } function awf_Back() { if(awf_activePage>1) {awf_SP(awf_activePage-1);} } function awf_Reset() { location.reload(); } function awf_Success(resp) { if(resp!=='OK'){awf_Error(resp);return;} document.getElementById("awf").innerHTML="
\r\n
\r\n
\r\n
Vielen Dank für Ihre Nachricht.
Die Formulardaten wurden erfolgreich übermittelt.
\r\n
\r\n
\r\n
"; awf_Update(null); awf_Scroll('awf',true); } function awf_Error(err) { document.getElementById("awf").innerHTML="
\r\n
\r\n
\r\n
Bei der Verarbeitung der Formulardaten ist ein Fehler aufgetreten
Bitte wiederholen Sie den Vorgang.
\r\n
\r\n
\r\n
"; awf_Update(null); var c=document.createComment(err);document.getElementById("awf").appendChild(c); awf_Scroll('awf',true); } function awf_Update(ele) { if(ele!==null) { switch(ele.id) { case 'awf-ID20':{awf_ID20=awf_Transform(0,ele.value);} break; case 'awf-ID30':{awf_ID30=awf_Transform(0,ele.value);awf_CheckTA('awf-ID30',ele.value,'','');} break; case 'awf-ID41':{awf_ID41=awf_Transform(0,ele.value);} break; } } awf_PageOutputVal(); } function awf_isLost(id) { return (document.getElementById(id)===null); } function awf_isRequired(id) { return (document.getElementById(id).validity.valueMissing); } function awf_isInvalid(id) { return (!document.getElementById(id).validity.valid); } function awf_isDisabled(id) { return (document.getElementById(id).disabled); } function awf_ShowError(id,focus) { var ele=document.getElementById(id); if(ele===null)return; if(!awf_isErrorInView(ele))awf_Scroll(id,false); ele.style.zIndex='100'; ele.style.opacity='1'; setTimeout(function(){awf_HideError(ele,focus);},2000); } function awf_Scroll(id,isp) { var scr=document.getElementById(id); if(scr) { scr.scrollIntoView(); if((scr.getBoundingClientRect().bottom+100=100)&&(ele.getBoundingClientRect().bottom<=window.innerHeight)); } function awf_SetString(id,value) { var ele=document.getElementById(id); if(ele)ele.value=value; } function awf_SetNum(id,value,decpl,decsp) { var ele=document.getElementById(id); if(ele) { if(value===''){ele.value='';return;} value=value.replace(decsp,'.');var str=Number(value).toFixed(decpl);str=str.replace('.',decsp); ele.value=str; } } function awf_FmtNum(value,decpl,decsp) { var str=Number(value).toFixed(decpl);str=str.replace('.',decsp); return str; } function awf_SToN(str) { str=str.replace(',','.'); return Number(str); } function awf_SetTA(id,value) { var ele=document.getElementById(id); if(ele)ele.value=value; } function awf_SetRadio(name,value) { var r=document.getElementsByName(name); if(r) { for(var i=0;i-1); } } function awf_Transform(mode,val) { switch(mode) { case 0:{return val.trim();} break; case 1:{return val.trim().toLowerCase();} break; case 2:{return val.trim().toUpperCase();} break; default:{return val;} break; } } function awf_SetValid(id,valid) { var ele=document.getElementById(id); if(!ele)return; if(valid)ele.setCustomValidity(''); else ele.setCustomValidity('Invalid'); } function awf_OutputVal(classid,value) { var els=document.getElementsByClassName(classid+'-out'); Array.prototype.forEach.call(els,function(ele){ if(value==='')value=' '; if(ele.nodeName.toUpperCase()==='SPAN')ele.innerText=value; }); } function awf_CheckNum(id,value,min,max,decpl,decsp) { if(value===''){awf_SetValid(id,true);return true;} value=value.replace(decsp,'.'); var pat=/^-?\d+\.?\d*$/; if(!pat.test(value)){awf_SetValid(id,false);return false;} var num=Number(value).toFixed(decpl); if(num.toString()!==value){awf_SetValid(id,false);return false;} if(min!==''){if(numNumber(max)){awf_SetValid(id,false);return false;}} awf_SetValid(id,true); return true; } function awf_CheckTA(id,value,min,max) { if(value===''){awf_SetValid(id,true);return true;} if(min!==''){if(value.lengthNumber(max)){awf_SetValid(id,false);return false;}} awf_SetValid(id,true); return true; } function awf_SetRadioValid(id,num,valid) { for(var i=0;iNumber(max))return false;} return true; } function awf_GetCBValue(id,num) { var val=[]; for(var i=0;imax){awf_SetValid(id,false);return;} if(files!==null&&files.length>0) { for(var i=0;ifs){awf_SetValid(id,false);return;} var regex=new RegExp('(.*?)\.('+ext+')$'); if(!regex.test(f.name.toLowerCase())){awf_SetValid(id,false);return;} } } awf_SetValid(id,true); } function awf_GetFUNames(files) { if(files===null||files.length===0)return ''; var n=''; for(var i=0;i0)n+=',';n+=f.name; } return n; } function awf_AddZeroTen(i) { var x=i.toString(); if(i<10)x='0'+x; return x; } function awf_MakeDTString(of,y,m,d,hh,mm) { var out=''; switch(of) { case 0:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=m+'/'+d+'/'+y;}break; case 1:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=m+'/'+d+'/'+y+' '+hh+':'+mm;}break; case 2:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=d+'.'+m+'.'+y;}break; case 3:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=d+'.'+m+'.'+y+' '+hh+':'+mm;}break; case 4:if(!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=hh+':'+mm;}break; case 5:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)){out=y+'-'+m+'-'+d;}break; case 6:if(!awf_isEmpty(m)&&!awf_isEmpty(d)&&!awf_isEmpty(y)&&!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=y+'-'+m+'-'+d+' '+hh+':'+mm+':00';}break; case 7:if(!awf_isEmpty(hh)&&!awf_isEmpty(mm)){out=hh+':'+mm+':00';}break; } return out; } function awf_isEmpty(s) { return(!s||s.length===0); } function awf_SetDT(id,y,m,d,hh,mm) { var ele=document.getElementById(id+'-year');if(ele)ele.value=y; ele=document.getElementById(id+'-month');if(ele)ele.value=m; ele=document.getElementById(id+'-day');if(ele)ele.value=d; ele=document.getElementById(id+'-hour');if(ele)ele.value=hh; ele=document.getElementById(id+'-min');if(ele)ele.value=mm; } function awf_isYMDValid(y,m,d) { if(!y&&!m&&!d)return true; if(!y||!m||!d)return false; var dt=new Date(y,m-1,d); return(dt&&(dt.getMonth()+1==m)); } function awf_isHHMMValid(hh,mm) { if(!hh&&!mm)return true; if(!hh||!mm)return false; return true; } function awf_isYMDHHMMValid(y,m,d,hh,mm) { if(!y&&!m&&!d&&!hh&&!mm)return true; if(!y||!m||!d||!hh||!mm)return false; return true; } function awf_CalcAge(y,m,d) { var now=new Date(); var d1=new Date(now.getFullYear(),now.getMonth(),now.getDate()); var d2=new Date(y,m-1,d); var a=d1.getFullYear()-d2.getFullYear(); var m=d1.getMonth()-d2.getMonth(); if(m<0||(m===0&&d1.getDate()=dt1&&dt0<=dt2); } function awf_ShowContainer(id) { var ele=document.getElementById(id); if(ele){if(ele.style.display!=='block')ele.style.display='block';} } function awf_HideContainer(id) { var ele=document.getElementById(id); if(ele){if(ele.style.display!=='none')ele.style.display='none';} } function awf_isVisible(id) { var ele=document.getElementById(id); if(!ele)return false; return !!(ele.offsetWidth||ele.offsetHeight||ele.getClientRects().length); }