Foolproof (maybe) JavaScript.