You likely are on an encrypted (most probable WEP) network.If so, make sure your "key" is set to the proper bit setting. ex:40, 64, 128, 256, but encryption. For example, if they are using 64 bit encryption (usual) and you use a 40 bit key (same key legnth, not like 128 and 256) you will be able to connect, but not browse the network. make sure you are set to the proper decyphering bit key.( the network administrator will know). OR, your computer may have been affected with spyware, which have corrupted your "windows sockets". I'll save you the explanation, but a quick, safe fix is available here- http://www.researchtechs.com/xp-winsock-fix.htm
i use it several times a day on peoples computers, it is a very handy tool and saves you ripping out protols and re-inserting them.