You should consider getting a UPS, uninterruptible power supply. I personally use APC as my vendor of choice but there are many others like it.

Google around for some reviews and find the one that works best for you.