You'll need Tiger on CD's, that model doesn't have a DVD player.

Here's what you need to do once you get the CD installer. Read the whole thing but a few posts down is detail on XPF.

Or if you only have the DVD installer, pull the hard drive, put it into a machine that has a DVD drive, install it there, then move the hard drive back to the iMac.

Which iMac is it exactly? What is the serial number of the machine from Apple System Profiler, or on the data tag on the bottom of the machine I think. Knowing that would make it easier to determine the caveats of what you want to experiment with.