What is temp? If you're talking about SpeedRun_TEMP i doubt that this is a good idea. This will remove random bitmaps from the array.
I was talking about the three "bmap_create("button1.tga")". It's not only that you create three bitmaps where one would suffice, it's also that you create these bitmaps every time the function gets called. After calling it 1.000 times you will have 997 unused bitmaps in memory that are irrevertably lost and cannot be freed by anything else than closing the engine.