How do I repair water-damaged hardwood floors?
I had a similar problem in a home I used to own - we pulled up the carpets and found that there were spots where the floor was black underneath.  

We sanded the floors to remove the varnish, and then used bleach to fix the discoloration in the hardwood floor.  It turned out really well.

Here are more detailed instructions: http://www.oldhouseweb.com/how-to-advice/how-to-bleach-stains-on-wood-floors.shtml 

Do not breathe in the bleach fumes!

P.S.  Let the wood dry before starting this.