First, your computer will require a firmware update:
http://docs.info.apple.com/article.html?artnum=60384. The update can only be installed while booted directly into OS 9.1 - 9.2.2.
You will need more RAM. You will not have satisfactory performance with less than 384 MBs of RAM. You will need at least 8 GBs of free space to install OS X.
Installing on a PowerBook G3 Series, an original Power Macintosh G3, or an iMac
If you see a message when you select the destination disk that you need to install Mac OS X on a partition completely within the first 8 GB of disk space, choose Open Disk Utility from the Installer menu, then click Partition to see the partitions of your disk. The first partition is the top one. Select it and make sure it is 8 GB or less in size. If the first partition is larger than 8 GB or your hard disk only has one partition that is larger than 8 GB, you need to partition your disk again. Partitioning the disk erases the entire hard disk, so be sure to back up your files first.
Panther is distributed on CDs not DVDs. You must boot the iMac directly from the Panther Installer Disc using the iMac's internal optical drive. You can purchase a Panther installer package on eBay or from www.applerescue.com. Panther comes on three CDs that have black labels with a large gray "X". Do not purchase anything offered on a single DVD or discs that have gray labels or discs that have the word "Upgrade" on the label. None of these will work.
Do not expect superior performance on your hardware. The iMac you have was designed long before OS X was ever released. It has neither the CPU nor video horsepower for OS X, and OS X will run slower than OS 9.
You may need to replace the internal PRAM backup battery if it's never been replaced. If the battery is weak or dead (likely after this much time) you may have considerable trouble trying to install OS X.