Before taking the old imac in for service, you may choose to call ahead and ask if they will repair a mac that old; some Specialist independent service providers will, and some won't. And that one is way old for an Apple Store; but a genius bar may help a little in determining what is wrong. That also may depend on location. A diagnosis at a Store with a genius should be free in US or Canada, call ahead to a Store and ask about an appointment, and if they can help check out an older Mac. But they won't fix the old models at an Apple Store, or some authorized specialists, when they can't get parts.
Good luck & happy computing! 🙂