You'll need a bootable 10.3 install disk. Open Disk Utiltiy when booted from that disk and Choose "Erase." There are also options to write zeros so that you can really clear the HD. After that, run the OS X installer from that same disk. Once 10.3 is installed, either use Software Update (under the Apple menu) or go to Apple's web site and download the Combo Updater for 10.3.9 and install that. After that, providing that the iMac has successfully booted from the internal HD at any stage in this process, reinstall your other software applications.