Do you have a proxy managing add-on installed?
That could affect it...
I used to get the same problem when going between school and home (i'd have to disable and enable using a proxy)
Best thing i can advise is installing:
https://addons.mozilla.org/en-US/firefox/addon/6709
then going into the options (tools/add-ons/proxyswitch/options) and then setting it to turn the proxy off when firefox is started... then you can just click the little switch icon to turn the proxy back on....
i don't know what the actual problem is though, have you got anything installed that would affect the proxy?