2006 was on the end of the switchover IIRC, it's possible you have a G5 or an Intel Mac, Apple System Profiler will tell you the model number or use Mactracker to see the model info. mactracker.ca
Mactracker also links to the support documents per model, so follow that links & there will be an explanation of how to replace the PRAM battery (assuming it is user serviceable part).
I don't think a failing PRAM battery would cause this issue, so you will want to look at logs around the time of the last force shutdown. There may be a panic log. Look in Console (/Applications/Utilities) for logs. Start recording the date & time of these failures, finding the appropriate log messages is a major part of the job.
It may also be worth running Apple Hardware Test if you have the original (grey) install disks, or you can download the AHT.iso & burn to a CD.
When you have the correct model info look at the list of AHT iso's & grab the correct one…
https://github.com/upekkha/AppleHardwareTest
Using Apple Hardware Test
An additional RAM tester tool -> http://www.kelleycomputing.net/rember/
Some other things to consider
OS X Mavericks: Reset your computer’s PRAM
Intel-based Macs: Resetting the System Management Controller (SMC)
OS X: About kernel panics
I'd also try booting in safe mode to see if it dies - bear in mind many things will not work in safe mode the OS has disabled many non-essential extensions so graphics may be 'laggy' etc. Test as much as you can, (it could also be temperature related so test when the Mac is hot & cold).
I'd also make an external installation to test booting from. If that disk is 100% OK you can consider the internal disk(s) as part of the issue - verify & repair the HD. Back them up beforehand !