function addEvent_imc(elm, evType, fn, useCapture) { // cross-browser event handling by Scott Andrew if(elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if(elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } }function addListeners_imc(e) { if(!document.getElementById) return; var calcula_btn = document.getElementById('calcula_btn_imc'); addEvent_imc(calcula_btn, 'click', imc, false); }function imc(e) { var peso = parseFloat(document.getElementById('peso_imc').value); var altura_m = parseFloat(document.getElementById('altura_m_imc').value); var altura_cm = parseFloat(document.getElementById('altura_cm_imc').value); var altura = (altura_m * 100 + altura_cm)/100; var imc = peso/(altura*altura); if(isNaN(imc)) { alert('use apenas numeros para suas medidas'); return false; } imc = Math.round(imc*100)/100; alert('Seu IMC e ' + imc); } addEvent_imc(window, 'load', addListeners_imc, false); TAPETE AVULSO COM FLORESfunction addEvent_imc(elm, evType, fn, useCapture) { // cross-browser event handling by Scott Andrew if(elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if(elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } }function addListeners_imc(e) { if(!document.getElementById) return; var calcula_btn = document.getElementById('calcula_btn_imc'); addEvent_imc(calcula_btn, 'click', imc, false); }function imc(e) { var peso = parseFloat(document.getElementById('peso_imc').value); var altura_m = parseFloat(document.getElementById('altura_m_imc').value); var altura_cm = parseFloat(document.getElementById('altura_cm_imc').value); var altura = (altura_m * 100 + altura_cm)/100; var imc = peso/(altura*altura); if(isNaN(imc)) { alert('use apenas numeros para suas medidas'); return false; } imc = Math.round(imc*100)/100; alert('Seu IMC e ' + imc); } addEvent_imc(window, 'load', addListeners_imc, false); function addEvent_imc(elm, evType, fn, useCapture) { // cross-browser event handling by Scott Andrew if(elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if(elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } }function addListeners_imc(e) { if(!document.getElementById) return; var calcula_btn = document.getElementById('calcula_btn_imc'); addEvent_imc(calcula_btn, 'click', imc, false); }function imc(e) { var peso = parseFloat(document.getElementById('peso_imc').value); var altura_m = parseFloat(document.getElementById('altura_m_imc').value); var altura_cm = parseFloat(document.getElementById('altura_cm_imc').value); var altura = (altura_m * 100 + altura_cm)/100; var imc = peso/(altura*altura); if(isNaN(imc)) { alert('use apenas numeros para suas medidas'); return false; } imc = Math.round(imc*100)/100; alert('Seu IMC e ' + imc); } addEvent_imc(window, 'load', addListeners_imc, false); JOGO DE BANHEIRO COM FLOR MARGARIDAfunction addEvent_imc(elm, evType, fn, useCapture) { // cross-browser event handling by Scott Andrew if(elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if(elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } }function addListeners_imc(e) { if(!document.getElementById) return; var calcula_btn = document.getElementById('calcula_btn_imc'); addEvent_imc(calcula_btn, 'click', imc, false); }function imc(e) { var peso = parseFloat(document.getElementById('peso_imc').value); var altura_m = parseFloat(document.getElementById('altura_m_imc').value); var altura_cm = parseFloat(document.getElementById('altura_cm_imc').value); var altura = (altura_m * 100 + altura_cm)/100; var imc = peso/(altura*altura); if(isNaN(imc)) { alert('use apenas numeros para suas medidas'); return false; } imc = Math.round(imc*100)/100; alert('Seu IMC e ' + imc); } addEvent_imc(window, 'load', addListeners_imc, false); CENTRINHO DE MESA -function addEvent_imc(elm, evType, fn, useCapture) { // cross-browser event handling by Scott Andrew if(elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true; } else if(elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r; } else { elm['on' + evType] = fn; } }function addListeners_imc(e) { if(!document.getElementById) return; var calcula_btn = document.getElementById('calcula_btn_imc'); addEvent_imc(calcula_btn, 'click', imc, false); }function imc(e) { var peso = parseFloat(document.getElementById('peso_imc').value); var altura_m = parseFloat(document.getElementById('altura_m_imc').value); var altura_cm = parseFloat(document.getElementById('altura_cm_imc').value); var altura =