I have prepared a simulation of the Monty Hall problem on jsfiddle: http://jsfiddle.net/yGsHL/6/
Check it out if you are having trouble. The code should be simple enough to follow. Read the code comments and watch as Benedict Cumberbatch and Monty Hall battle it out for what I think is a Ducatti Veyron. I don't know. I'm not a car person. 2008 era Cumberbatch makes the initial choice and 2011 era Cumberbatch makes the switch.
Images courtesy Wikipedia and Pixabay.