I'd like to take credit for that but I can't. Looky what I dug up.

http://reef.diesyst.com/flashcalc/flashcalc.html