Always, always, always check the VIN with Car Fax before buying a used car. It may look perfect on the outside but if it has been underwater there is a very good chance the electrical system is shot. And if water got into the exhaust, the catalytic converter and muffler are probably shot as well and the inside of the engine may very well have be corroded.
carfax had a free trial a few months back. a bunch of people on another forum who had cars that had been in a major wreck put there cars in and they came up clean.
they can't know everything, but I guess its better than nothing