Just to make sure there are no issues with the startup volume and give it a clean bill of health, do a Repair Disk, Repair Permissions and Check for Preference File Corruption.
Repair Disk: boot from the installation DVD, once past the language selection initial screen, run Disk Utility off the Utilities menu and do Repair Disk. If any errors appear, repeat until none. If unable to get no errors, you will need something stronger, like Disk Warrior.
Repair Permissions: boot normally, run Disk Utility off the startup volume, do a Repair Permissions. Beware, Leopard takes an awfully long time to finish this. You don't need to repeat.
Check Preference Files: get a third-party utility such as [Onyx (free)|http://www.titanium.free.fr/pgs/english.html] or [MacPilot (shareware)|http://www.koingosw.com/products/macpilot.php]. If using Onyx, follow the path Verify/Preferences. If using MacPilot, follow the path Tools/Disk & Files/Verify Preferences Files Integrity.
You can also try purging all caches, user and system. Also, how old is the iMac? Cause the internal backup battery may be dead or dying, causing PRAM corruption.