function bmicalculate()
{

  var peso =  parseFloat(document.bmi.peso.value);
  var peso1 = parseFloat(document.bmi.peso1.value);
  var volume = parseFloat(document.bmi.volume.value);
  var volume1 = parseFloat(document.bmi.volume1.value);
  var dato = document.bmi.dato.value;


if  (document.bmi.dato.value==0)
 {
     alert("Per favore inserisci il valore da convertire");
     return;
    } 


 e=dato*((peso/peso1)/(volume/volume1));


risultato=e;
 
 document.bmi.result.value = Math.round(risultato*1000000000000)/1000000000000;

 } 
 

function bmiclear()

{
  document.bmi.bmi.value = "";
  document.bmi.result.value = "";
}


