Inspired by a blog entry on a mathematical captcha system (to stop blog spammers) I've written a some JavaScript that uses pairs of random numbers to estimate the value of π.
Basically I generate a pair of random numbers and then use a binary greatest common denominator algorithm to determine if a pair of numbers are coprime. Recording the percentage of coprime to non-coprime pairs of random integers you can jump through a few mathematical hoops to estimate the value of π.