Our 17" IMAC G5 (2005) had been dying a slow death. First the sleep function failed, then it periodically wouldn't start. The question - was it time for a new MAC?
After diagnosing (correctly, yeah!) that the problem was the power supply, we decided that it was worth repairing the IMAC and keeping . . .