The imac is from 2005 and running on ML.
Impossible! Only Intel iMacs can run ML. All 2005 iMacs are PPCs. You will need to determine the correct model of your iMac prior to doing any troubleshooting. Check out the following & do the necessary:
http://support.apple.com/kb/HT1159 Mac OS X versions (builds) for computers
http://support.apple.com/kb/HT1758 How to identify iMac models