reading your script, I'm assuming you want the 'sitbutton' image to be replaced by the 'sleepbutton' image.
the problem is, no place in your script at all does anything to replace the 'sitbutton' image
all you have is some image defines, panel defines ( one with a button define ), video settings and a MAIN fucntion that loads the level contestentry_wmb, sets framerate to 40 max, nulls out on_d, and sets poly clip_size to 0
so, where is your function, operations or what ever script to swap the define button images and the call to initiate that operation?