-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (89 loc) · 4.43 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<!-- index.html -->
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/bacForm.css">
<script src="scripts/bacFormDriver.js"></script>
<script src="scripts/bacFormValidate.js"></script>
<script src="scripts/bacCalculate.js"></script>
<title>Widmark BAC Calculator</title>
</head>
<body>
<main>
<header>
<h2>BAC Calculator and Resources</h2>
</header>
<hr class="solid" />
<div class="results-wrapper">
<div class="results-padding-block"></div>
<div id="results" class="results">
<h3>Responsible Alcohol Consumption<br>
</h3>
<p>There are on average 2,300 deaths attributed to alcohol poisoning every year in the U.S</p>
<p>Many who consume alcoholic beverages engage in binge drinking, which can dramatically increase
the chances of chronic illness such as heart disease, liver disease, or stroke. This website intends to
help provide insight on the relative BAC (Blood Alcohol Content) based on individual's consumption of such beverages. Additionally, it is
useful to know what BAC content numbers can mean for the average consumer.
</p>
<h3>Widmark's Formula</h3>
<p>Swedish researcher Erik Widmark divised an equation to determine the <em>maximum</em> BAC content given a person's weight, number of
ounces consumed, and sex. Additionally, the time elapsed since consumption can also be factored in to provide an estimate for how alcohol
slowly begins to exit one's bloodstream.
</p>
<h4>The equation used in calculations is:</h4>
<p class="bold">BAC = [Alcohol consumed in grams / (Body weight in grams x R)] X 100 (where R represents a sex-based constant)</p>
<p style="text-align: center;"><em>Note: BAC can vary based on consumption frequency. Such numbers are estimates and not 100% accurate.</em></p>
<div class="results-wrapper-form">
<div class="results-padding-block-form"></div>
<div class="results-form">
<div id="formContent">
<h3>Providing the information below can determine your relative BAC:</h3>
<form id="bacForm" onsubmit="bacFormDriver();return false">
<div>
<label id="sexLabel">Please choose a sex:</label>
<select id="sex" name="sex">
<option id="sexMale" value="male">Male</option>
<option id="sexFemale" value="female">Female</option>
</select>
</div>
<br/>
<div>
<label id="drinkCountLabel">Enter the number of drinks consumed (e.g. 1 beer, 1 shot, 1 glass of wine is a "drink"):</label>
<input id="drinks" type="number"></input>
</div>
<br/>
<div>
<label id="weightLabel">Please enter your weight in pounds (lbs):</label>
<input id="weight" name="weight" type="number"></input>
</div>
<br/>
<div>
<label id="timeLabel">(Optional) Please enter the time since the last drink was consumed in hours:</label>
<input id="time" name="time" step="any" type="number"></input>
</div>
<br/>
<div>
<input class="form-buttons" id="submit" type="submit" value="What is my BAC?"></td>
<input class="form-buttons" type="reset" value="Reset form"></td>
</div>
</form>
</div>
<textarea id="resultsArea" value="" class="standard"></textarea>
<label id="bacRec"></label>
</div>
<div class="results-padding-block-form"></div>
</div>
</div>
<div class="results-padding-block"></div>
</div>
<hr class="solid"/>
<footer>
<h3>Resources for you to access:</h3>
<a href="pages/help.html">Get Help Now</a>
<br/>
<a href="pages/about.html">About Us</a>
</footer>
</main>
</body>
</html>