I can't answer this definitively, however, I can say that a foreclosure will be reflected on your credit report and many potential employers do request a credit check when seeking new candidates, however, that being said, I do not think that a foreclosure would prevent you from being hired.
Employers check credit for a number of reasons, including fraud or dishonest behavior, to verify that your application information is correct, and to check responsibility. If you have been responsible with paying your bills up until recently (or within the past couple of years) a potential employer will see that you had some hard times and were not able to make your payments. Also, the longer that time goes by, the less impact it will have, especially if you continue to pay all your other bills on time. So I wouldn't worry about it too much. Good luck to you.