Your page should work fine as long as you include the <script src="safety.
js"></script> bits somewhere in the HTML (head or at the top of the body section) and keep the form field names (And form) with the same name.
Each field needs to have onchange=calc() in it's definition.
Otherwise let me know if you hit any issues!