k... let me get this straight, you want a pic in the middle, aka 'selectedpicture,gif'
and the rest are borders... well why dont you use a table with 9 cells to organize it, this is really wierd, cuz it cant strech.
instead of echo, try use print.
in the form tag, put it into <php> tags, and set action to $PHP_SELF, this will refresh the page... and submit the form, im guessing onchange does that, but i think you should add a submit button for testing purposes. then change it. other than that, it should work fine.
email me if you need further help with tables, php, etc.