A very simple solution is already there in Windows XP. When you go to the TCP/IP properties of your network connection, you have two tabs, General and Alternate Configuration.
You can set the first connection as your static IP office connection, and the alternate configuration with the DHCP home connection.
Hope this helps.
You’ll actually want to setup the General connection as the DHCP address and the alternate as the Static IP. If you set the General to the static IP the network will always connect.