// JavaScript Document
<!-- 
function calcullorentz(lorentz) { 

var taille=document.lorentz.taille.value;
var theone
for (i=0;i<document.lorentz.lorentzsexe.length;i++){
if (document.lorentz.lorentzsexe[i].checked==true)
theone=i
}

if (theone==0 )
{
document.lorentz.ideal.value=Math.round((taille-100-((taille-150)/4))*100)/100 ;
document.lorentz.exces.value=Math.round(((taille-100-((taille-150)/4))+(taille-100-((taille-150)/4))*0.1)*100)/100 ;}
else
{
document.lorentz.ideal.value=Math.round((taille-100-((taille-150)/2))*100)/100 ;
document.lorentz.exces.value=Math.round(((taille-100-((taille-150)/2))+(taille-100-((taille-150)/2))*0.1)*100)/100 ;
}
}  
<!-- hide this script tag's contents from old browsers
//Body Mass calculator- by John Scott (johnscott03@yahoo.com)
//Visit JavaScript Kit (http://javascriptkit.com) for script
//Credit must stay intact for use
function ClearForm(form){
    form.weight.value = "";
    form.height.value = "";
    form.bmi.value = "";
    form.my_comment.value = "";
}
function bmi(weight, height) {
          bmindx=weight/eval(height*height);
          return bmindx;
}
function checkform(form) {
       if (form.weight.value==null||form.weight.value.length==0 || form.height.value==null||form.height.value.length==0){
            alert("\nMerci de remplir tous les champs.");
            return false;
       }
       else if (parseFloat(form.height.value) <= 0||
                parseFloat(form.height.value) >=500||
                parseFloat(form.weight.value) <= 0||
                parseFloat(form.weight.value) >=500){
                alert("\nSaisie non valide ! \n\nExemple :\n- Votre poids : 85 \n- Votre taille : 180");
                ClearForm(form);
                return false;
       }
       return true;
}
function computeform(form) {
       if (checkform(form)) {
       yourbmi=Math.round(bmi(form.weight.value, form.height.value/100));
       form.bmi.value=yourbmi;
         if (yourbmi >=40) {
          form.my_comment.value="Obésité grade III : Obésité massive";
       }
       else if (yourbmi >=35 && yourbmi <40) {
          form.my_comment.value="Obésité grade II : Obésité sévère";
       }
    
    else if (yourbmi >=30 && yourbmi <35) {
          form.my_comment.value="Obésité grade I : Obésité modérée";
       }
       else if (yourbmi >=25 && yourbmi <30) {
          form.my_comment.value="Surpoids";
       }
       else if (yourbmi >=18.5 && yourbmi <25) {
          form.my_comment.value="Normal";
       }
       else if (yourbmi >=17 && yourbmi <18.5) {
          form.my_comment.value="Dénutrition grade I";
       }
       else if (yourbmi >=16 && yourbmi <17) {
          form.my_comment.value="Dénutrition grade II";
       }
       else if (yourbmi >=13 && yourbmi <16) {
          form.my_comment.value="Dénutrition grade III";
       }
       else if (yourbmi >=10 && yourbmi <13) {
          form.my_comment.value="Dénutrition grade IV";
       }
       else if (yourbmi <10) {
          form.my_comment.value="Dénutrition grade V";
       }
       }
       return;
}

//  -->
