Take a look at this. Apologies for the image rotation but i couldn't be bothered rotating it. On the bottom is a 3GS battery and on the top a 3G. You can tell the difference by looking at the voltage (circled).
If you replace an iPhone 3G battery with a 3GS battery and vice versa, you will inevitably have issues with the overall functionality of the phone.
[image|128621|size=thumbnail]