I don't want to sound like a Locale shill, but you might accomplish this with similar programs (as opposed to remembering to toggle a widget all the time).
At home or work I can connect my droid to WiFi. I have a "standby" mode that, when I set my phone on the table, it turns off WiFi (and then when I pick it back up, WiFi will be enabled in 5-10 seconds - just in time to send that email or surf the web). When I'm not at home or the office, my default setting turns WiFi off and GPS on (haven't played with it much, but your phone can determine your location generally thru 3G, so you really don't need WiFi and GPS on that I've seen, other than GPS for using maps/navigation).
Although the battery usage cited here seems high. With my screen set to never sleep, Wifi always on will drain 5-8% of the battery which equates to only 2-3 hours over the course of a day. I should say in my case my home WiFi is in range, so my guess is the OP's case it had to be searching for a signal frequently which is why it drained so much battery.