The money you take out is TAX FREE,
any money you take out can be put back in the following year.
if you put in 5000 Jan 1 2009, cashed out 1 000 000 Dec 31 2009 then Jan 1 2010 you shoudl be able to put in 1 005 000. and never pay any tax on any of it.
That is my understanding and im pretty sure its correct.