That could very well be a power supply too. My powermac did the same thing and it turned out to be a powersupply. All i had to do was call apple, take it the shop about 30 miles from here, and 2 hours later it was good to go.
Thanks for the tip, I'll look into power supply as well. But when I ran Apple Diagnostics disc, it said everything was fine. I guess that doesn't check power supply.