Late 2006 iMac Issue: Logic Board or Hard Drive?
If the hard drive replacement method has continued to fail, I'd guess that either: A) The hard drive is not actually broken, or B) The computer somehow makes the hard drive go bad. I've taken that model of iMac apart before, and the inside is fairly cramped for space. That leads me to think that your processor may overheat and "hang", causing it to go black, or stop doing whatever process it's on and spin the "beach ball". If you really want to keep using your 9 year old machine, I'd suggest taking it to a repair shop that can repair Macs. They may find that it has a faulty processor or cooling system for the processor, or something else. I'm not sure how much that would cost, but in my opinion, it may be time to upgrade. Since you don't want to spend the price of a new Mac, you could look into purchasing a used computer. It's hard to transition to a Windows or Linux machine for some people, so if you've gotten used to Mac OSX, stick with it. I've seen advertisements for aluminum iMacs from 2008 or so for as little as $400 at local computer stores. If you're comfortable with Craigslist, you could look for one there, and it may be cheaper. However Craigslist doesn't have warranties. Read a little about purchasing a used computer before you do so.