My iMac G5 (17", 2.0 Ghz, ALS) just died recently with similar symptoms.
First it started crashing alot. Then it started crashing just after booting. I decided to reinstall but when I booted from the Leopard disk the installation got partway through and then hung every time. I booted from its original Tiger disk and the OS installed but the iMac would only boot to a blue screen afterwards.
I took it apart and had a nose around and found a dead capacitor on the logic board (presumably part of the GPU since booting to a blue screen usually means a GPU problem).
Price to fix it: 900.
Price to replace it: 1000.
Guess which one I'm gonna do?
So anyway, have a poke around inside and look for 'sploding capacitors, they look a bit like popped popcorn kernels. Unfortunately, if you can't see any that doesn't necessarily mean that they're all good, but if you do find one or more at least you will know the cause of your problems.