Please help Code is below
[CODE=javascript]<script type="text/javascript">
function BMI(h,w)
{
if (h.length==0 || w.length==0)
{return ("")}
if (h>0 && w>0)
{return Math.round((w/Math.pow(h,2))* 703)}
return ("")
}
function BMIPER(b,d,e,a, g)
{
if (d.length==0 || e.length==0)
{return ("")}
if (d>0 && e>0 && g=="M" && a<15)
{return Math.round((1.5 1*b)-(0.70*a)-(3.6*1)+1.4)}
if (d>0 && e>0 && g=="F" && a<15)
{return Math.round((1.5 1*b)-(0.70*a)-(3.6*0)+1.4)}
if (d>0 && e>0 && g=="F" && a>14)
{return Math.round((1.2 0*b)-(0.23*a)-(10.8*0)+5.4)}
if (d>0 && e>0 && g=="M" && a>14)
{return Math.round((1.2 0*b)-(0.23*a)-(10.8*0)+5.4)}
return ("")
}
function Calc_BMI()
{
for (i = 0; i <= 13; i++)
document.getEle mentById("bmi_" +i).value = BMI(document.ge tElementById("h gt_"+i).value, document.getEle mentById("wgt_" +i).value)
}
function Calc_BMIper()
{
for (z = 0; z <= 13; z++)
document.getEle mentById("bmi_p er_"+z).value = BMIPER(document .getElementById ("bmi_"+z).valu e, document.getEle mentById("hgt_" +z).value, document.getEle mentById("wgt_" +z).value, document.getEle mentById("age_" +z), document.getEle mentById("gen") .value)
}
</script>[/CODE]
[CODE=javascript]<script type="text/javascript">
function BMI(h,w)
{
if (h.length==0 || w.length==0)
{return ("")}
if (h>0 && w>0)
{return Math.round((w/Math.pow(h,2))* 703)}
return ("")
}
function BMIPER(b,d,e,a, g)
{
if (d.length==0 || e.length==0)
{return ("")}
if (d>0 && e>0 && g=="M" && a<15)
{return Math.round((1.5 1*b)-(0.70*a)-(3.6*1)+1.4)}
if (d>0 && e>0 && g=="F" && a<15)
{return Math.round((1.5 1*b)-(0.70*a)-(3.6*0)+1.4)}
if (d>0 && e>0 && g=="F" && a>14)
{return Math.round((1.2 0*b)-(0.23*a)-(10.8*0)+5.4)}
if (d>0 && e>0 && g=="M" && a>14)
{return Math.round((1.2 0*b)-(0.23*a)-(10.8*0)+5.4)}
return ("")
}
function Calc_BMI()
{
for (i = 0; i <= 13; i++)
document.getEle mentById("bmi_" +i).value = BMI(document.ge tElementById("h gt_"+i).value, document.getEle mentById("wgt_" +i).value)
}
function Calc_BMIper()
{
for (z = 0; z <= 13; z++)
document.getEle mentById("bmi_p er_"+z).value = BMIPER(document .getElementById ("bmi_"+z).valu e, document.getEle mentById("hgt_" +z).value, document.getEle mentById("wgt_" +z).value, document.getEle mentById("age_" +z), document.getEle mentById("gen") .value)
}
</script>[/CODE]
Comment