First lets isolate the proble:
1: Does this happen with just one particular application or with any application, if yes then try reinstalling App.
2: Does the system give you a hard time turning on, ie. does it sometimes take 3 or 4 times of pressing the pwer button on the system befor it actually starts up, this is a good indication of power supply going,
3: Can you hear if the CPU fan in the tower is dieing out or making new, strange sounds at system startup or while using the system, may indicate that the system is over heating. This may also be the issue even if the CPU fan is ok if the room that the system is in is very hot.
personally, it sounds similar to a dieing power supply, if proven, purchase a new tower with a powersupply, ussually the tower is an additional $10 or so from the power supply price.
write me if this does or does not help,
micheal@techemail.com good luck to ya,