Connecting iMac to Analog Apple 24 " Monitor

I am looking for a solution other than the $100 Apple cable. Is there a cable with the mini display connection (for back of iMac) and on the other end with a 30 pin (female) DVI connector that would connect with the cord that comes out of the Apple analog monitor? Or, do I need 2 cords to make this work, and if so, what would they be?