I started using MarcoPolo recently to switch networks on my Macbook when moving between home and work. I also wanted to turn the firewall on and off easily, but could not find and scripts to switch the Leopard firewall between "Allow all incoming connections" (my definition of OFF) and "Allow only essential services" (ON).
So here is the ON script: If you are not using Growl for notifications, then remove the register_growl and growlnote subs and their associated calls.
Once you have the "ON" script working, to create the "OFF" script, just change Allow only essential services to Allow all incoming connections as noted in the commented lines -- simple.
[robg adds: I tried both scripts, and they worked as described. Copy the above into Script Editor and paste, then save it as Firewall Off. Follow the instructions to switch the functionality, and then save the modified version as Firewall On. With some tweaking, I think it'd be possible to do this in one script by first checking the status of the firewall. I'll leave that version as an exercise for someone with more AppleScript skills than I, though.]

