A question for the steam experts

In the animation at this link:
(scroll down to the locomotive animation)
http://travel.howstuffworks.com/steam1.htm

It shows a steam loco in motion. The piston is moving in and out
and the loco proceeds forward. I get this. My questions is how does
the engineer make the loco go in reverse. This may sound dumb
on my part, but it seems to my that in reverse the piston would
still be moving in and out. What determines which direction the
wheels turn?

I have looked at this animation and my head hurts. Someone please
help! [:D] Thanks, Dave

Nevermind… I got an answer over on the MRR forum
http://www.trains.com/community/forum/topic.asp?TOPIC_ID=46488
Dave