I've been messing with different MacBooks (haven't tried iMac unfortunately, but I think it'll be similar) and it's definitely possible to install Windows on an external drive. I haven't tried this with Windows XP (I think you'll have to give up on that), I used only Windows 7 / Windows 8. There're at least two options:
1. BIOS emulation mode. Use this guide as a reference: http://bleeptobleep.blogspot.ca/2013/02/mac-install-windows-7-or-8-on-external.h tml
This one will make it work even on a USB 2.0/3.0 drive (although it worked for me with one USB3.0 enclosure but refused to boot from another). I also assume it'll work with FireWire as long as necessary drivers are installed.
2. native EFI mode. Use my last post as a reference: http://forums.macrumors.com/showthread.php?t=1414769
This method most likely won't work with USB or FireWire, only Thunderbolt which your iMac doesn't have.
It's definitely not supported by Apple so officials won't help you here 😉 Another way to do it is cloning partitions from one disk to another, which I never tried. I also read about crazy things that involved VMWare Fusion etc.