First of all using an iframe just to show an image is (to say the least of it) unnecessary.
The most maintainable way to do this is to have an image placeholder in your parent page:
Then in each iframed document:
<img id='myPic' src='default.jpg'>
parent.document.getElementById( 'myPic' ).src = 'relatedimage.jpg';
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!