That sounds so frustrating.

Using a power strip/surge protector is definitely a good idea. If you're already doing that, it could be that your power supply (the box in the back of the case that holds the fan and the power cord) is failing. Especially if the shutoffs happen more often when you open large programs or run your peripherals (e.g. printer or scanner), that might be the problem.
My previous computer did the exact same thing -- twice, actually -- and giving it a new power supply fixed it both times.
Most office supply stores have a 14-day money-back guarantee, so you'd probably have time to try out a replacement and see if it helps.
