There are limits in the wi-fi specs based on the frequency used by the wireless router
and the computer; older Macs would be using a different specification than newer,
as they would not be able to use the higher 5MHz band some offer. Also, the speed
of the data stream would be slower with an older Mac or iDevice than a new one.
Note, too, the security protocol and frequency difference over time may limit what
your old Mac can do with the new router. The new device should be backward
compatible with the Mac; so if the new router offers 802.11a-c, and the iMac G5
can use 802.11/b/g, there should be a way to set it up in Sys Pref settings...
The older WEP should not be used, & later OS X versions use WPA+ or better.
The fastest data speed would be to use an Ethernet cable, instead of wireless.
This is most secure and also most reliable, too.
Good luck & happy computing! 🙂