The highest version of OSX a tray-loading G3 iMac can run is 10.3 Panther. It us MUCH more stable than OS 10.2 so I recommending that you consider it instead.
Proper full installation disks are getting hard to find and are expensive, sometimes more than the value of a used G3 iMac. When I looked, there are a number of sites offering a pirated version for download. DO NOT fall for this. These seldom work and may give you a case of some computer illness you don't want. Look for Full Retail Install disks, black with a silver X:
Grey system install/restore disks from another Mac model will probably fail to work. Avoid them.
Amazon offerings for Panther disks--note the prices:
http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Delectronics&field-keyw ords=mac+x+panther&rh=n%3A172282%2Ck%3Amac+x+panther
This link may prove helpful:
http://support.apple.com/kb/HT2356
Panther is supposed to run on 256MB RAM but, in my experience, its "happy" minimum RAM is 512MB. There's an additional expense (about US$35 from my trusted RAM vendor) if you don't already have that much.