You have some great answers already, but I will throw in my two cents. If you feel you have to buy a foreclosure, work with a good buyer's agent and don't expect to get it for pennies on the dollar. That shouldn't deter you from still working on getting a good price, particularly if there are not a lot of other interested buyers. When making an offer, keep in mind the lender/bank's first counter offer is usually full price or close to it, particularly with FDMC, that cuts you out of one more counter, so plan on you final price based on that. I always recommend and inspection and a home warranty, even if you have to pay for it yourself. This can save a lot of headache down the road. If you find problems with the home, even though it is an "as is" sale, the Seller may consider a credit back to you if it is not something they already had identified as an issue or if it is a big ticket item or a safety issue. If you have a full blown written inspection, this becomes a problem for the listing agent (at least in CA it does) as they are ethically bound to provide you with that report, so this will be a problem for the next buyer and maybe you can convince them they should address it now rather than later with another buyer at a lower price!
Overall, be fierce and try to be as nonemotional about it as you can, because if you don't the bank will!