Original by Robert Campbell at http://www.math.umbc.edu/~campbell/NumbThy/Class/Programming/JavaScript.html

Here's the source!