iMac seems to lose power while booting
my iMac G5 seems to lose power while booting. This suddenly happened without me changing anything, so I guess it's a hardware problem, I'd just like to know where exactly the problem is.
So when I booted my iMac a few days ago, it got to the point where one can see the Apple logo and the little loadingwheel. Then the monitor turned blank and the iMac rebooted. This happened like 5 times and then it booted perfectly. The next few days I had the same problem, but after another day or so it got to the point where one can see the logo and the loadingwheel again and just hung there (but there weren't any power failures this time). Nothing happened after that. I booted with verbose mode on and into single-user mode, but I didn't see any errors. I reinstalled OS X and had the power problem again, but after a few reboots it worked again. Two days later I had the same problem, nothing happened after seeing the loadingwheel. I assumed that the powerfailure damaged some files and because of that it couldn't boot anymore. I reinstalled OS X again, this time I enabled journaling for my partition though. OS X boots again now, but only after 5 to 7 power failures before that. I hope that the journaling will avoid file damages now, we'll see...
anyways, what could that be? Power supply unit? If so, does anyone know how much it is to replace it?
Thanks in advance
iMac G5, Mac OS X (10.5.6)