All network parameters are saved in a configuration file, which drastically reduces the task of switching between networks.
The source code is available here and the project is also listed in Freshmeat
Note that this script requires root privileges in order to update your network options. You may run it for example with:
gksu perl Applications/guifi/guifi.pl