I am a real estate attorney in Chicago. First let me say that I agree with the other posters that you should contact a realtor to help you in this area. I made this video a while back for a friend who asked a similar question (so ignore the fact that I am talking to Steve). I haven't trodded it out in a while, but it should still be good http://www.hg-legal.com/tutorials/steve/steve.htm
If you are not a member of the Naperville Library to get access to the information in the video (which is the same information that you would pay for on the web, but the library offers for free) many many libraries offer access to this information in a similar way, so just check with your local library.
If you are looking to purchase a foreclosure I would be happy to help you from the legal perspective.