Quite useful for mobile users who work at different locations and require different proxy server settings for each location, just point your Automatic Proxy Configuration URL to your local proxy.pac file and it automatically pics up if it should use a proxy server or not.
function FindProxyForURL(url, host)
{
if (isPlainHostName(host) ||
dnsDomainIs(host, ".foobar"))
return "DIRECT";
else
if (isInNet(myIpAddress(), "192.168.99.0", "255.255.0.0"))
return "PROXY 192.168.99.2:3128; DIRECT";
else
return "DIRECT";
}