function result()
{
	var taille = _.$("taille").value/100;
	taille = taille / 3.28;
	var poids  = _.$("poids").value;
	poids = poids / 2.2;;
	if( (taille == '') || (poids == ''))
	{
		alert("Fields 'Height' and 'Weight' must be given.");
		return(false);
	}
	var total = poids / Math.pow(taille,2);
	_.$("total").innerHTML = Math.round(total);
	
	var shouldbe = Math.round(2.2*18.5*Math.pow(taille,2)) + " - " + Math.round(2.2*24.9*Math.pow(taille,2)) + " lb";
	_.$("shouldbe").innerHTML = shouldbe;
	
	_.dis(_.$("resultatIMC"),1);
	
	/*
	var com = 0;
	alert(com);
	for(com=0; com<=4; com++);
	{
		alert(com);
		_.dis(_.$("com"+com),0);
	}
	*/
	_.dis(_.$("com"+1),0);
	_.dis(_.$("com"+2),0);
	_.dis(_.$("com"+3),0);
	_.dis(_.$("com"+4),0);
	_.dis(_.$("shoulbepar"),0);
	
	com = 4;
	if(total<30){com = 3;}
	if(total<25){com = 2;}
	if(total<18.5){com = 1;}
	
	_.dis(_.$("com"+com),1);
	
	
	if( (total<18.5) || (total>25) )
	{
		_.dis(_.$("shoulbepar"),1);
	}

	
}
function init()
{
	_.ael(_.$("calcul"), "click", result);
}
_.ael(_.w, "load", init);