As a PHP dummy, using just code duplication, I got partway by using the following line:
<img id="frontphoto" src="<?php echo TEMPLATE_DIR; ?>/img/<?php echo PAGE_TITLE; ?>.jpg" width="760" height="175" alt="logo" />
where the original was before,
<img id="frontphoto" src="<?php echo TEMPLATE_DIR; ?>/img/front.jpg" width="760" height="175" alt="logo" />
Using PAGE_TITLE is a lot easier than PAGE_ID, however I need help on the syntax which should say
Pseudo code
IF PAGE_TITLE.jpg exist then PAGE_TITLE.jpg else default_banner.jpg
if you get the idea. How would then be coded in PHP?