Someone wrote a little app that toggles it, but honestly, if you care that much about it to ask, just leave the hidden files visible all the time. I've found it to be the path of least confusion.
http://www.apple.com/downloads/dashboard/developer/hiddenfil...