Here's one idea if you're really keen on getting the computer working or getting data off the drive:
You can take the hard drive out, put it in a USB enclosure (they're ~$25 at you nearest computer store), and mount it onto another Mac (there's a work around for PC, but I'll hope for the best). Then run disk utility on that computer.
Disk utility will be able to tell you if your hard disk is completely done, or whether you can salvage it.
If you're unlucky, you'll need to reinstall OS X (that is the OS, right?). In which case, you can partition the drive (still attached via USB) into two partitions. The first is your main partition and the second is an install partition that we'll use to bootstrap the computer. The second partition doesn't need to be big. Just enough to copy an Mac OS X Installation DVD/CD to it.
Now you can "restore" a Mac OS X install CD to the second partition. This will be a bootable partition! Remove hard drive from USB enclosure, reinstall into iMac, and restart. Hopefully it will boot off of the install partition and you'll be able to reinstall mac os x on the first partition. You can then remove the second partition.