...the CMOS battery was dead because it wasn't correctly saving the settings. It's also possible the power supply is going bad.

What happens when you hold the power button in for 10-15 seconds? Does the computer then shut down entirely? Or does it restart again after it has shut down?

I would start by replacing the CMOS battery which is only about $5 and can be done easily by you.

It also appears like the XP operating system may have been an "upgrade" from a previous operating system. Is that the case here? If so, you may need to upgrade the BIOS? Have you ever flashed the BIOS with the upgraded version for XP?

Hope this helps.