You want to use the Featured Post Thumbnail:
http://wpcanyon.com/tutorials/how-to-use-the-post-thumbnail-feature-in-wordpress-2-9/
http://markjaquith.wordpress.com/2009/12/23/new-in-wordpress-2-9-post-thumbnail-images/
http://codex.wordpress.org/Function_Reference/the_post_thumbnail
In your functions.php, define an image size with add_image_size(), then display it in the footer like this:
the_post_thumbnail('footer-image');
Keep all of the loop inside of your main template file and do not split it across multiple files. That’s really messy, and as you’ve figured out, very prone to error.