Calculates an individual's blood alcohol content based on the quantity of beverages consumed, the alcohol percentage in each drink, the person's weight, and the time spent consuming the drink.
FLUID OUNCES CONSUMED
(Beer ~ 12 oz. Wine Glass ~ 4 oz. 1 Shot ~ 1.5 oz)
<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin function
solveBAC(form){ var
ounces =eval(form.ounces.value); var
percent =eval(form.percent.value); var
weight =eval(form.weight.value); var
hours =eval(form.hours.value);
var
result =(ounces
*
percent *0.075/
weight)-(hours
*0.015); if(result
<0){ message="There is a negligible amount of
alcohol in your system. You are not legally intoxicated."; result ="-- neglible amount --";
} else{ if(result
=="NaN") mesage ="Please try again."; if(result
>0.08) message="In MOST and possibly ALL states
you would be considered intoxicated and arrested for DUI."; if(result
<0.08) message="You are not legally intoxicated";
} form.message.value=message; form.bacamount.value=
result +" %";
} // End --> </script> <table>
<tr><td> <ul>
<li>FLUID
OUNCES CONSUMED<br> (Beer ~ 12 oz. Wine Glass ~ 4 oz. 1
Shot ~ 1.5 oz)</li>
<li>YOUR
WEIGHT (Lbs)</li>
<li>ALCOHOL
PERCENTAGE IN BEVERAGE<br> (Beer ~ 4-4.5% Wine ~ 15-20% 1 Shot ~
30-50%)</li>
<li>HOURS
CONSUMING DRINK</li>
</ul> </td>
</tr>
</table>