I will bet you that it is the battery on your main board.
Do you have a old one to try out? It's the same battery in most old macs.
I have seen the problem with two of our new G4's. Almost guaranteed to be your fix. You can probably get a new one in your electro/camera shop.