I would like to display an image based on the page ID.
The issue I am having is with child pages. I would like to have a method for identifying if the current page is a child of a certian page no matter how many levels deep.
Example.
Home -> Programs -> Baseball
If Programs or Baseball or anything below baseball, display image X
Else
Image Y
Take a look at the parent/child functions available in the WordPress Codex such as : http://codex.wordpress.org/Function_Reference/get_post_ancestors
get_post_ancestors seems like your best bet, from there you can impart what ever logic you may need to select and (dis)quality results in your script.
There are other selection tools in the codex that might do better.