Detecting if a specified network is available

I have just got into university and they have the network set up that I need to login (not the windows login but a web based login) each time I start up my computer in order have any application access the Internet.

What I am wanting to do is create a program to automate the login process (easy enough).
But I want to try and make sure that my program is fairly professional, so I want it to check if the computer is connected to the university network before trying to login.

I was wondering whether anyone has any idea's on how I would be able to detect the name of the network (or some other unique identifier for the network) so that I can have my program perform this check.

Thanks for any help in advance
Regards
Satal Keto
[774 byte] By [Satal Keto] at [2007-11-20 10:58:43]