your problem is you have nothing at all in your script that WOULD make the image change. All it is is defines. there is nothing saying sit bmap should change to sit button bmp.

your missing such instructiuons to change/swap replace these 2 images.

button = 0, 0, sitbutton, null, null, null, null, null;

does nothing but define a button the size of the image sitbutton

it has the same result as if you would have made it a panel instead on top of the other panel.