I should have mentioned this earlier... but that specific error message you're seeing means that you're on the wireless but not being given an IP address on the actual LAN. There is either some kind of mismatch in how you've configured your wireless or whatever device on that network that serves up IP addresses (usually the router) is not doing its job. It is possible that the router is not configured to hand out IP addresses via DHCP, but that is a rare situation. Process of elimination will help us figure this out.
Quick experiment:
View the wireless networks and select advanced options from the lower left corner... this will bring up a menu that allows you to manage the wireless networks that you have configured on your laptop. Find your friend's network that you're trying to join on that list of networks and delete it so that you can configure it again from the beginning. This time, change the encryption password by one digit... make a 1 into a 2 or something simple like that. Clearly, this won't get you on the wireless network but it will help us understand this symptom.
After you set up this wireless network again with that one altered digit, if you're still able to join the network and still seeing the same error message as before, it shows that the problem COULD be that you're typing the wireless password incorrectly. Alternatively, if it does not allow you to join the network, it shows that you likely had the encryption code correct. If this is the case, change the encryption code back to what it should be and re-join the network and we will have eliminated a mis-typed code as the cause.
One more thing... is the wireless encryption code you're using a 26 character WEP key? If so, remember that a key like that is in hex form and there is no letter O in hex... it's always a zero.