Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Look for the Compass application, try to record a video, or check the text on the back. The back text is shiny on the 3Gs and dull/grey on the 3G.
 
^ Yep, easiest way to tell is the chromed text on the back of the phone -- that means 3GS.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.