document.addEventListener("DOMContentLoaded",()=>{bmi22_start2();});var bmi22_items=[];var loadLanguages=[];var loadLanguagesCounter=[];var calculators=[];function bmi22_start2(){var i=0;document.querySelectorAll("a[data-content]").forEach((e)=>{if(e.getAttribute('href')=="https://bmi22.pl"){calculators[i]={};calculators[i].element=e;calculators[i].dane=e.getAttribute('data-content').split(",");if(calculators[i].dane[0]=="auto"){calculators[i].language=navigator.language.split('-')[0];calculators[i].languageUrl='https://widget.bmi22.pl/languages/'+navigator.language.split('-')[0]+'.json';} else{calculators[i].language=calculators[i].dane[0];calculators[i].languageUrl='https://widget.bmi22.pl/languages/'+calculators[i].dane[0]+'.json';} if(loadLanguages[calculators[i].language]===null||loadLanguages[calculators[i].language]===undefined){loadLanguages[calculators[i].language]={};loadLanguages[calculators[i].language].url=calculators[i].languageUrl;loadLanguages[calculators[i].language].ended=false;loadLanguagesCounter[loadLanguagesCounter.length]=calculators[i].language;} i++;}});loadLanguagesCounter.forEach((e)=>{fetch(loadLanguages[e].url).then(response=>{if(!response.ok){throw new Error('Network response was not ok');} return response.json();}).then(data=>{loadLanguages[e].ended=true;loadLanguages[e].dane=data;checkStart();}).catch(error=>{data={"calc":"BMI Calculator","subtitle":"Enter height and weight to get BMI result","subtitle2":"To obtain the BMI result, enter height and weight and, if applicable, also provide your child's age and gender","sex":"Gender","female":"Female","male":"Male","centil":"Centyl","percentile":"Percentyl","weight":"Weight (kg)","height":"Height (cm)","weight_imp":"Weight (lb.)","height_imp":"Height (in)","age":"Age","ybmi":"Your BMI","starvation":"Starvation","emaciation":"Emaciation","underweight":"Underweight","correct":"Normal Weight","overweight":"Overweight","obesity1":"Obesity Class I","obesity2":"Obesity Class II","obesity3":"Obesity Class III (severe)"};loadLanguages[e].ended=true;loadLanguages[e].dane=data;checkStart();});});} function checkStart(){var counter=loadLanguagesCounter.length;var count=0;loadLanguagesCounter.forEach((e)=>{if(loadLanguages[e].ended){count++;}});if(counter==count){bmi22_init();}} function bmi22_start(){var lang=navigator.language.split('-')[0];const url='https://widget.bmi22.pl/languages/'+lang+'.json';function bmi22_loadJSON(url){fetch(url).then(response=>{if(!response.ok){throw new Error('Network response was not ok');} return response.json();}).then(data=>{bmi22_init(data);}).catch(error=>{data={"calc":"BMI Calculator","subtitle":"Enter height and weight to get BMI result","subtitle2":"To obtain the BMI result, enter height and weight and, if applicable, also provide your child's age and gender","sex":"Gender","female":"Female","male":"Male","centil":"Centyl","percentile":"Percentyl","weight":"Weight (kg)","height":"Height (cm)","weight_imp":"Weight (lb.)","height_imp":"Height (in)","age":"Age","ybmi":"Your BMI","starvation":"Starvation","emaciation":"Emaciation","underweight":"Underweight","correct":"Normal Weight","overweight":"Overweight","obesity1":"Obesity Class I","obesity2":"Obesity Class II","obesity3":"Obesity Class III (severe)"};bmi22_init(data);console.error('There has been a problem with your fetch operation:',error);});} bmi22_loadJSON(url);} var bmi_resizeObserver;try{bmi_resizeObserver=new ResizeObserver((entries)=>{for(const entry of entries){var contentBoxSize='';if(entry.contentBoxSize){contentBoxSize=entry.contentBoxSize[0].inlineSize;}else{contentBoxSize=entry.contentRect.width;} if(contentBoxSize<420){entry.target.classList.remove('flex');} else{entry.target.classList.add('flex');}}});}catch(error){} function bmi22_init(){var i=1;document.querySelectorAll("a[data-content]").forEach((e)=>{if(e.getAttribute('href')=="https://bmi22.pl"){var dane=e.getAttribute('data-content').split(",");var newID="bmi22_"+i;const newEl=document.createElement("div");newEl.setAttribute("data-type",'BMI-Calculator');newEl.id=newID;newEl.innerHTML='';var l='';if(dane[0]=="auto"){l=navigator.language.split('-')[0];} else{l=dane[0];} var lang=loadLanguages[l].dane;var style=document.createElement('style');style.innerHTML="#bmi22_"+i+"{ font-size: 14px; font-family:'Arial'; max-width:1024px}";style.innerHTML+=" #bmi22_"+i+"_card {min-width:120px}";if(dane[4]!=0){style.innerHTML+=" #bmi22_"+i+" .bmi22_container {border:"+dane[4]+"px solid "+dane[5]+";}";} style.innerHTML+=" #bmi22_"+i+" .bmi22_container {border-radius:"+dane[6]+"px;}";if(dane[7]!=0){style.innerHTML+=" #bmi22_"+i+" .bmi22_container {padding:"+dane[7]+"px}";} else{style.innerHTML+=" #bmi22_"+i+" .bmi22_container {padding:5px}";} style.innerHTML+=" #bmi22_"+i+" .bmi22_container {background-color:"+dane[9]+"}";style.innerHTML+=" #bmi22_"+i+" .bmi22_container * {color:"+dane[8]+"}";style.innerHTML+=" #bmi22_"+i+" .bmi22_container input[type=number] {background-color:"+dane[11]+"}";style.innerHTML+=" #bmi22_"+i+" .bmi22_container .border-slate-300 {border-color:"+dane[10]+"}";style.innerHTML+=" #bmi22_"+i+" .block {display: block;}";style.innerHTML+=" #bmi22_"+i+" small {font-size:80%}";style.innerHTML+=" #bmi22_"+i+" .flex {display: flex}";style.innerHTML+=" #bmi22_"+i+" .justify-between {justify-content: space-between;}";style.innerHTML+=" #bmi22_"+i+" .tracking-wide {letter-spacing: .025em;}";style.innerHTML+=" #bmi22_"+i+" .font-medium {font-weight: 500;}";style.innerHTML+=" #bmi22_"+i+" blockquote, #bmi22_"+i+" dd, #bmi22_"+i+" dl, #bmi22_"+i+" figure, #bmi22_"+i+" h1, #bmi22_"+i+" h2, #bmi22_"+i+" h3, #bmi22_"+i+" h4, #bmi22_"+i+" h5, #bmi22_"+i+" h6, #bmi22_"+i+" hr, #bmi22_"+i+" p, #bmi22_"+i+" pre {margin: 0;}";style.innerHTML+=" #bmi22_"+i+" h1, #bmi22_"+i+" h2, #bmi22_"+i+" h3, #bmi22_"+i+" h4, #bmi22_"+i+" h5, #bmi22_"+i+" h6 {font-size: inherit;font-weight: inherit;}";style.innerHTML+=" #bmi22_"+i+" .py-2 {padding-bottom: 0.5rem;padding-top: 0.5rem;}";style.innerHTML+=" #bmi22_"+i+" .px-3 {padding-left: 0.75rem;padding-right: 0.75rem;}";style.innerHTML+=" #bmi22_"+i+" .bg-transparent {background-color: transparent;}";style.innerHTML+=" #bmi22_"+i+" .border {border-width: 1px;}";style.innerHTML+=" #bmi22_"+i+" .rounded-lg {border-radius: 0.5rem;}";style.innerHTML+=" #bmi22_"+i+" .w-full {width: 100%;}";style.innerHTML+=" #bmi22_"+i+" .mt-15 {margin-top: 0.375rem;}";style.innerHTML+=" #bmi22_"+i+" .form-input, #bmi22_"+i+" .form-multiselect, #bmi22_"+i+" .form-select, #bmi22_"+i+" .form-textarea {contain: paint;}";style.innerHTML+=" #bmi22_"+i+" .form-input, #bmi22_"+i+" .form-multiselect, #bmi22_"+i+" .form-select, #bmi22_"+i+" .form-textarea {-webkit-appearance: none;-moz-appearance: none;appearance: none;letter-spacing: .025em;outline: 2px solid transparent;outline-offset: 2px;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, #bmi22_"+i+" .form-checkbox:before, #bmi22_"+i+" .form-input, #bmi22_"+i+" .form-multiselect, #bmi22_"+i+" .form-radio, #bmi22_"+i+" .form-radio:before, #bmi22_"+i+" .form-select, #bmi22_"+i+" .form-switch, #bmi22_"+i+" .form-switch:before, #bmi22_"+i+" .form-textarea {transition-duration: .2s;transition-property: all;transition-timing-function: cubic-bezier(.4,0,.2,1);}";style.innerHTML+=" #bmi22_"+i+" button, #bmi22_"+i+" input, #bmi22_"+i+" optgroup, #bmi22_"+i+" select, #bmi22_"+i+" textarea {font-feature-settings: inherit;color: inherit;font-family: inherit;font-size: 100%;font-variation-settings: inherit;font-weight: inherit;line-height: inherit;margin: 0;padding: 0;}";style.innerHTML+=" #bmi22_"+i+" *, #bmi22_"+i+" :after, #bmi22_"+i+" :before {border: 0 solid #e5e7eb;box-sizing: border-box;}";style.innerHTML+=" #bmi22_"+i+" :after, :before {--tw-content: \"\";}";style.innerHTML+=" #bmi22_"+i+" .w-10 {width: 2.5rem;}";style.innerHTML+=" #bmi22_"+i+" .h-5 {height: 1.25rem;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-radio, .form-switch -webkit-print-color-adjust: exact;print-color-adjust: exact;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-checkbox:focus, .form-radio, .form-radio:focus, .form-switch, .form-switch:focus {outline: 2px solid transparent;outline-offset: 2px;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-radio, .form-switch {-webkit-print-color-adjust: exact;print-color-adjust: exact;}";style.innerHTML+=" #bmi22_"+i+" .form-switch {--thumb-border: 2px;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-checkbox:focus, .form-radio, .form-radio:focus, .form-switch, .form-switch:focus {outline: 2px solid transparent;outline-offset: 2px;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-radio, .form-switch {-webkit-appearance: none;-moz-appearance: none;appearance: none;cursor: pointer;flex-shrink: 0;overflow: hidden;position: relative;-webkit-user-select: none;-moz-user-select: none;user-select: none;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox, .form-checkbox:before, .form-input, .form-multiselect, .form-radio, .form-radio:before, .form-select, .form-switch, .form-switch:before, .form-textarea {transition-duration: .2s;transition-property: all;transition-timing-function: cubic-bezier(.4,0,.2,1);}";style.innerHTML+=" #bmi22_"+i+" button, input, optgroup, select, textarea {font-feature-settings: inherit;color: inherit;font-family: inherit;font-size: 100%;font-variation-settings: inherit;font-weight: inherit;line-height: inherit;margin: 0;padding: 0;}";style.innerHTML+=" #bmi22_"+i+" .form-switch:before {border-radius:999999px; background-color:#FFF; content: var(--tw-content);height: calc(100% - var(--thumb-border)*2);left: var(--thumb-border);position: absolute;top: var(--thumb-border);width: calc(50% - var(--thumb-border)*2);}";style.innerHTML+=" #bmi22_"+i+" .bg-slate-300 {background-color:#EEE; border:1px solid #CCC;}";style.innerHTML+=" .form-switch:checked:before {--tw-translate-x: calc(100% + var(--thumb-border)*2);content: var(--tw-content);transform: translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); right: 3px !important;left: auto !important;}";style.innerHTML+=" #bmi22_"+i+" .hover:hover {border-color: #94a3b8;}";style.innerHTML+=" #bmi22_"+i+" .py-2:hover {padding-bottom: 0.5rem;padding-top: 0.5rem;}";style.innerHTML+=" #bmi22_"+i+" .px-3:hover {padding-left: 0.75rem;padding-right: 0.75rem;}";style.innerHTML+=" #bmi22_"+i+" .bg-transparent:hover {background-color: transparent;}";style.innerHTML+=" #bmi22_"+i+" .border-slate-300:hover {border-color: #cbd5e1;}";style.innerHTML+=" #bmi22_"+i+" .border:hover {border-width: 1px;}";style.innerHTML+=" #bmi22_"+i+" .rounded-lg:hover {border-radius: 0.5rem;}";style.innerHTML+=" #bmi22_"+i+" .w-full:hover {width: 100%;}";style.innerHTML+=" #bmi22_"+i+" .mt-15:hover {margin-top: 0.375rem;}";style.innerHTML+=" #bmi22_"+i+" .text-slate-700 {color: #334155;}";style.innerHTML+=" #bmi22_"+i+" .text-3xl {font-size: 1.875rem;line-height: 2.25rem;}";style.innerHTML+=" #bmi22_"+i+" .text-center {text-align: center;}";style.innerHTML+=" #bmi22_"+i+" .w-1 {width: 8.333333%;}";style.innerHTML+=" #bmi22_"+i+" .w-2 {width: 16.666667%;}";style.innerHTML+=" #bmi22_"+i+" .w-3 {width: 25%;}";style.innerHTML+=" #bmi22_"+i+" .h-2 {height: 0.5rem;}";style.innerHTML+=" #bmi22_"+i+" .mt-4 {margin-top: 1rem;}";style.innerHTML+=" #bmi22_"+i+" .mt-1 {margin-top: 0.25rem;}";style.innerHTML+=" #bmi22_"+i+" .invisible {opacity:0}";style.innerHTML+=" #bmi22_"+i+" .rounded-full {border-radius: 9999px;}";style.innerHTML+=" #bmi22_"+i+" .bg-primary {background-color: #4f46e5;}";style.innerHTML+=" #bmi22_"+i+" .bg-info {background-color: #0ea5e9;}";style.innerHTML+=" #bmi22_"+i+" .bg-success {background-color: #10b981;}";style.innerHTML+=" #bmi22_"+i+" .bg-warning {background-color: #ff9800;}";style.innerHTML+=" #bmi22_"+i+" .bg-error {background-color: #ff5724;}";style.innerHTML+=" #bmi22_"+i+" .bg-error-2 {background-color: #ff5740;}";style.innerHTML+=" #bmi22_"+i+" .bg-error-3 {background-color: #ff5754;}";style.innerHTML+=" #bmi22_"+i+" .bg-primary-30 {background-color: rgba(79,70,229,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-info-30 {background-color: rgba(14,165,233,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-success-30 {background-color: rgba(16,185,129,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-warning-30 {background-color: rgba(255,152,0,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-error-30 {background-color: rgba(225,87,36,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-error-2-30 {background-color: rgba(225,87,36,.2);}";style.innerHTML+=" #bmi22_"+i+" .bg-error-3-30 {background-color: rgba(225,87,36,.2);}";style.innerHTML+=" #bmi22_"+i+" .border-1 {border-width: 1px;}";style.innerHTML+=" #bmi22_"+i+" .border-2 {border-width: 2px;}";style.innerHTML+=" #bmi22_"+i+" .border-primary {border-color: #4f46e5;}";style.innerHTML+=" #bmi22_"+i+" .border-info {border-color: #0ea5e9;}";style.innerHTML+=" #bmi22_"+i+" .border-success {border-color: #10b981;}";style.innerHTML+=" #bmi22_"+i+" .border-warning {border-color: #ff9800;}";style.innerHTML+=" #bmi22_"+i+" .border-error {border-color: #ff5724;}";style.innerHTML+=" #bmi22_"+i+" .border-error-2 {border-color: #ff5740;}";style.innerHTML+=" #bmi22_"+i+" .border-error-3 {border-color: #ff5754;}";style.innerHTML+=" #bmi22_"+i+" .w-35 {width: 0.875rem;}";style.innerHTML+=" #bmi22_"+i+" .h-35 {height: 0.875rem;}";style.innerHTML+=" #bmi22_"+i+" .d-none {display:none}";style.innerHTML+=" #bmi22_"+i+" .space-x-1>:not([hidden])~:not([hidden]) {--tw-space-x-reverse: 0;margin-left: calc(0.25rem*(1 - var(--tw-space-x-reverse)));margin-right: calc(0.25rem*var(--tw-space-x-reverse));}";style.innerHTML+=" #bmi22_"+i+" .space-x-2>:not([hidden]) {--tw-space-x-reverse: 0; margin-left: calc(0.5rem*(1 - var(--tw-space-x-reverse))); margin-right: calc(0.5rem*var(--tw-space-x-reverse));}";style.innerHTML+=" #bmi22_"+i+" .bmi22_container { }";style.innerHTML+=" #bmi22_"+i+" .selector {width:20px; height:10px; margin-left:auto; margin-right:auto; }";style.innerHTML+=" #bmi22_"+i+" .arrow {border: solid black;border-width: 0 3px 3px 0;display: inline-block;padding: 3px;; display:block; margin-top:4px; width:8px; margin-left:auto; margin-right:auto}";style.innerHTML+=" #bmi22_"+i+" .right {transform: rotate(-45deg);-webkit-transform: rotate(-45deg);}";style.innerHTML+=" #bmi22_"+i+" .left {transform: rotate(135deg);-webkit-transform: rotate(135deg);}";style.innerHTML+=" #bmi22_"+i+" .up {transform: rotate(-135deg);-webkit-transform: rotate(-135deg)}";style.innerHTML+=" #bmi22_"+i+" .down {transform: rotate(45deg);-webkit-transform: rotate(45deg);}";style.innerHTML+=" #bmi22_"+i+" .card {border:1px solid #EEE; border-radius:5px; padding:10px;}";style.innerHTML+=" #bmi22_"+i+" .form-input:hover, #bmi22_"+i+" .form-multiselect:hover, #bmi22_"+i+" .form-select:hover, #bmi22_"+i+" .form-textarea:hover {contain: paint;}";style.innerHTML+=" #bmi22_"+i+" .form-input:hover, #bmi22_"+i+" .form-multiselect:hover, #bmi22_"+i+" .form-select:hover, #bmi22_"+i+" .form-textarea:hover {-webkit-appearance: none;-moz-appearance: none;appearance: none;letter-spacing: .025em;outline: 2px solid transparent;outline-offset: 2px;}";style.innerHTML+=" #bmi22_"+i+" .form-checkbox:hover, #bmi22_"+i+" .form-checkbox:before:hover, #bmi22_"+i+" .form-input:hover, #bmi22_"+i+" .form-multiselect:hover, #bmi22_"+i+" .form-radio:hover, #bmi22_"+i+" .form-radio:before:hover, #bmi22_"+i+" .form-select:hover, #bmi22_"+i+" .form-switch:hover, #bmi22_"+i+" .form-switch:before:hover, #bmi22_"+i+" .form-textarea:hover {transition-duration: .2s;transition-property: all;transition-timing-function: cubic-bezier(.4,0,.2,1);}";style.innerHTML+=" #bmi22_"+i+" button:hover, #bmi22_"+i+" input:hover, #bmi22_"+i+" optgroup:hover, #bmi22_"+i+" select:hover, #bmi22_"+i+" textarea:hover {font-feature-settings: inherit;color: inherit;font-family: inherit;font-size: 100%;font-variation-settings: inherit;font-weight: inherit;line-height: inherit;margin: 0;padding: 0;}";style.innerHTML+=" #bmi22_"+i+" *, #bmi22_"+i+" :after, #bmi22_"+i+" :before {--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgba(59,130,246,.5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;}";style.innerHTML+=" #bmi22_"+i+" *, #bmi22_"+i+" :after, #bmi22_"+i+" :before {border: 0 solid #e5e7eb; box-sizing: border-box;}";var head=document.head||document.documentElement.childNodes[0]||document.getElementsByTagName('head')[0];style.id="dynamic_"+i+"_style";try{(elem=document.getElementById("dynamic_"+i+"_style")).parentNode.removeChild(elem)} catch(error){} head.appendChild(style);var tmpHTML='';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.calc+'
';tmpHTML+=' '+lang.subtitle+':';tmpHTML+='

';var kg=69;var cm=177;if(dane[3]==1){kg=(kg*2.2046226218).toFixed(2);cm=(cm*0.3937007874).toFixed(2);} tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.starvation+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' < 16';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.emaciation+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 16 < > 17';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.underweight+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 17 < > 18,5';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.correct+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 18,5 < > 25';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.overweight+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 25 < > 30';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.obesity1+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 30 < > 35';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.obesity2+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 35 < > 40';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+='
';tmpHTML+='

';tmpHTML+=' '+lang.obesity3+'';tmpHTML+='

';tmpHTML+='
';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='

';tmpHTML+=' 40+';tmpHTML+='

';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+=' ';tmpHTML+='
';tmpHTML+=' ';newEl.innerHTML+=tmpHTML;e.after(newEl);e.remove();bmi_resizeObserver.observe(document.getElementById('bmi22_'+i+'_form'));if(dane[3]=="0"){document.querySelectorAll('.bmi22_imperial').forEach((e)=>{e.classList.add('d-none');});document.querySelectorAll('.bmi22_metric').forEach((e)=>{e.classList.remove('d-none');});} else{document.querySelectorAll('.bmi22_imperial').forEach((e)=>{e.classList.remove('d-none');});document.querySelectorAll('.bmi22_metric').forEach((e)=>{e.classList.add('d-none');});} document.querySelectorAll('#bmi22_'+i+'_scale').forEach((e)=>{e.addEventListener("change",function(){var i=e.getAttribute('data-i');var kg1=document.getElementById('bmi22_'+i+'_waga').value;var cm1=document.getElementById('bmi22_'+i+'_wzrost').value;if(e.checked){document.querySelectorAll('.bmi22_imperial').forEach((e)=>{e.classList.remove('d-none');});document.querySelectorAll('.bmi22_metric').forEach((e)=>{e.classList.add('d-none');});document.getElementById('bmi22_'+i+'_waga').value=(kg1*2.2046226218).toFixed(2);document.getElementById('bmi22_'+i+'_wzrost').value=(cm1*0.3937007874).toFixed(2);} else{document.querySelectorAll('.bmi22_imperial').forEach((e)=>{e.classList.add('d-none');});document.querySelectorAll('.bmi22_metric').forEach((e)=>{e.classList.remove('d-none');});document.getElementById('bmi22_'+i+'_waga').value=(kg1/2.2046226218).toFixed(2);document.getElementById('bmi22_'+i+'_wzrost').value=(cm1/0.3937007874).toFixed(2);}});});document.querySelectorAll('#bmi22_'+i+'_waga').forEach((e)=>{bmi22_count(e.id);e.addEventListener("change",function(){bmi22_count(this.id);});e.addEventListener("keyup",function(){bmi22_count(this.id);});e.addEventListener("keydown",function(){bmi22_count(this.id);});});document.querySelectorAll('#bmi22_'+i+'_wzrost').forEach((e)=>{e.addEventListener("change",function(){bmi22_count(this.id);});e.addEventListener("keyup",function(){bmi22_count(this.id);});e.addEventListener("keydown",function(){bmi22_count(this.id);});});i++;}});} bmi22_start2();function bmi22_count(num){var n=num.split("_");var imperial=document.getElementById('bmi22_'+n[1]+'_scale').checked;if(imperial){var max1=(300*2.2046226218).toFixed(0);var max2=(300*0.3937007874).toFixed(0);document.getElementById('bmi22_'+n[1]+"_waga").setAttribute('max',parseInt(max1));document.getElementById('bmi22_'+n[1]+"_wzrost").setAttribute('max',parseInt(max2));document.getElementById('bmi22_'+n[1]+"_waga").setAttribute('step','0.1');document.getElementById('bmi22_'+n[1]+"_wzrost").setAttribute('step','0.1');} else{var max1=300;var max2=300;document.getElementById('bmi22_'+n[1]+"_waga").setAttribute('max',parseInt(max1));document.getElementById('bmi22_'+n[1]+"_wzrost").setAttribute('max',parseInt(max2));document.getElementById('bmi22_'+n[1]+"_waga").setAttribute('step','1');document.getElementById('bmi22_'+n[1]+"_wzrost").setAttribute('step','1');} if(parseFloat(document.getElementById('bmi22_'+n[1]+"_waga").value)<1&&document.getElementById('bmi22_'+n[1]+"_waga").value!==""){document.getElementById('bmi22_'+n[1]+"_waga").value=1;} else if(parseFloat(document.getElementById('bmi22_'+n[1]+"_waga").value)>max1){document.getElementById('bmi22_'+n[1]+"_waga").value=max1;} var waga=document.getElementById('bmi22_'+n[1]+"_waga").value;if(parseFloat(document.getElementById('bmi22_'+n[1]+"_wzrost").value)<1&&document.getElementById('bmi22_'+n[1]+"_wzrost").value!==""){document.getElementById('bmi22_'+n[1]+"_wzrost").value=1;} else if(parseFloat(document.getElementById('bmi22_'+n[1]+"_wzrost").value)>max2){document.getElementById('bmi22_'+n[1]+"_wzrost").value=max2;} var wzrost=document.getElementById('bmi22_'+n[1]+"_wzrost").value;if(document.getElementById('bmi22_'+n[1]+'_scale').checked){var BMI=(waga*703)/(wzrost*wzrost);} else{var BMI=waga/((wzrost/100)*(wzrost/100));} if(BMI>99){document.getElementById('bmi22_'+n[1]+"_wynik").innerHTML="---";} else if(BMI<10){document.getElementById('bmi22_'+n[1]+"_wynik").innerHTML="---";} else{document.getElementById('bmi22_'+n[1]+"_wynik").innerHTML=BMI.toFixed(1);} document.getElementById('bmi22_'+n[1]+"_card").classList.remove('bg-primary-30');document.getElementById('bmi22_'+n[1]+"_card").classList.remove('bg-info-30');document.getElementById('bmi22_'+n[1]+"_card").classList.remove('bg-success-30');document.getElementById('bmi22_'+n[1]+"_card").classList.remove('bg-warning-30');document.getElementById('bmi22_'+n[1]+"_card").classList.remove('bg-error-30');document.getElementById('bmi22_'+n[1]+"_16").classList.remove('bg-primary-30');document.getElementById('bmi22_'+n[1]+"_17").classList.remove('bg-primary-30');document.getElementById('bmi22_'+n[1]+"_18").classList.remove('bg-info-30');document.getElementById('bmi22_'+n[1]+"_25").classList.remove('bg-success-30');document.getElementById('bmi22_'+n[1]+"_30").classList.remove('bg-warning-30');document.getElementById('bmi22_'+n[1]+"_35").classList.remove('bg-error-30');document.getElementById('bmi22_'+n[1]+"_40").classList.remove('bg-error-30');document.getElementById('bmi22_'+n[1]+"_99").classList.remove('bg-error-30');document.getElementById('bmi22_'+n[1]+"_16_border").classList.remove('bg-primary');document.getElementById('bmi22_'+n[1]+"_17_border").classList.remove('bg-primary');document.getElementById('bmi22_'+n[1]+"_18_border").classList.remove('bg-info');document.getElementById('bmi22_'+n[1]+"_25_border").classList.remove('bg-success');document.getElementById('bmi22_'+n[1]+"_30_border").classList.remove('bg-warning');document.getElementById('bmi22_'+n[1]+"_35_border").classList.remove('bg-error');document.getElementById('bmi22_'+n[1]+"_40_border").classList.remove('bg-error');document.getElementById('bmi22_'+n[1]+"_99_border").classList.remove('bg-error');document.getElementById('bmi22_'+n[1]+"_16_border").classList.add('border-primary');document.getElementById('bmi22_'+n[1]+"_17_border").classList.add('border-primary');document.getElementById('bmi22_'+n[1]+"_18_border").classList.add('border-info');document.getElementById('bmi22_'+n[1]+"_25_border").classList.add('border-success');document.getElementById('bmi22_'+n[1]+"_30_border").classList.add('border-warning');document.getElementById('bmi22_'+n[1]+"_35_border").classList.add('border-error');document.getElementById('bmi22_'+n[1]+"_40_border").classList.add('border-error');document.getElementById('bmi22_'+n[1]+"_99_border").classList.add('border-error');document.getElementById('bmi22_'+n[1]+"_16_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_17_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_18_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_25_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_30_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_35_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_40_pointer").classList.add('invisible');document.getElementById('bmi22_'+n[1]+"_99_pointer").classList.add('invisible');if(BMI<10){} if(BMI<16){document.getElementById('bmi22_'+n[1]+"_16").classList.add('bg-primary-30');document.getElementById('bmi22_'+n[1]+"_16_border").classList.remove('border-primary');document.getElementById('bmi22_'+n[1]+"_16_border").classList.add('bg-primary');document.getElementById('bmi22_'+n[1]+"_16_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-primary-30');} else if(BMI<17){document.getElementById('bmi22_'+n[1]+"_17").classList.add('bg-primary-30');document.getElementById('bmi22_'+n[1]+"_17_border").classList.remove('border-primary');document.getElementById('bmi22_'+n[1]+"_17_border").classList.add('bg-primary');document.getElementById('bmi22_'+n[1]+"_17_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-primary-30');} else if(BMI<18.5){document.getElementById('bmi22_'+n[1]+"_18").classList.add('bg-info-30');document.getElementById('bmi22_'+n[1]+"_18_border").classList.remove('border-info');document.getElementById('bmi22_'+n[1]+"_18_border").classList.add('bg-info');document.getElementById('bmi22_'+n[1]+"_18_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-info-30');} else if(BMI<25){document.getElementById('bmi22_'+n[1]+"_25").classList.add('bg-success-30');document.getElementById('bmi22_'+n[1]+"_25_border").classList.remove('border-success');document.getElementById('bmi22_'+n[1]+"_25_border").classList.add('bg-success');document.getElementById('bmi22_'+n[1]+"_25_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-success-30');} else if(BMI<30){document.getElementById('bmi22_'+n[1]+"_30").classList.add('bg-warning-30');document.getElementById('bmi22_'+n[1]+"_30_border").classList.remove('border-warning');document.getElementById('bmi22_'+n[1]+"_30_border").classList.add('bg-warning');document.getElementById('bmi22_'+n[1]+"_30_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-warning-30');} else if(BMI<35){document.getElementById('bmi22_'+n[1]+"_35").classList.add('bg-error-30');document.getElementById('bmi22_'+n[1]+"_35_border").classList.remove('border-error');document.getElementById('bmi22_'+n[1]+"_35_border").classList.add('bg-error');document.getElementById('bmi22_'+n[1]+"_35_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-error-30');} else if(BMI<40){document.getElementById('bmi22_'+n[1]+"_40").classList.add('bg-error-30');document.getElementById('bmi22_'+n[1]+"_40_border").classList.remove('border-error');document.getElementById('bmi22_'+n[1]+"_40_border").classList.add('bg-error');document.getElementById('bmi22_'+n[1]+"_40_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-error-30');} else if(BMI<=99){document.getElementById('bmi22_'+n[1]+"_99").classList.add('bg-error-30');document.getElementById('bmi22_'+n[1]+"_99_border").classList.remove('border-error');document.getElementById('bmi22_'+n[1]+"_99_border").classList.add('bg-error');document.getElementById('bmi22_'+n[1]+"_99_pointer").classList.remove('invisible');document.getElementById('bmi22_'+n[1]+"_card").classList.add('bg-error-30');} else{}}