So I recently bought an iPhone 3GS which came unlocked and jailbroken (I do not know what program was used for this). All is working fine after syncing apps and music, but none of my apps have data in them, so I would like to "restore from backup" using my iPod touch backup, which holds all of the app data. Will this be a problem restoring from iOS4 on the itouch to iphone 3 on the 3GS?

Will I lose my unlock on the iphone 3GS? (Apple makes it sound like it will just mess with data, not firmware)

If so, what is the recommended program to unlock the 3GS firmware 3.1.3? Does it have to be the same program as the original unlock, or should it be?

I am trying to come up to speed on this whole unlocking process in case I do something stupid in the near future. If anyone can link me to a primer on the subject that would be great. A site like iphone-dev.org seems to assume the reader already knows the technical aspects.