Sounds like a standard "soft fail" setup - any big disruption of electricity supply would fry any programmer settings - the system automatically resets itself when power returns to normal and reverts to factory default programmer settings.
Unless you want to buy surge protectors and an Uninterruptable Power Supply (UPS) system, you will have to live with it. I live with it but it doesn't happen often (once in a couple of years).
Chas, September 2006