Its very likely a Power Supply failing. It will have to be replaced. On the iMac G5 there is a way of determining this (three lights) when the cover is off. I found the diagnostic on Apple. There may be such a procedure for yours. (Mine was replaced under warranty, twice!) PS's can be found on the web or removed from another such iMac. Winston