Determine Connection Method - Newbie

I have a PowerBook. I take it to work & back to home.
After booting at each location, I need to do a lot of changing of settings, preferences, startup apps, default printer, etc.
As a first step, I would like to have PB, on boot, check which/what connection it has.
What I am trying to do is along these lines:

IF (WorkConnection)
THEN do a whole bunch of stuff
ELSE
IF (HomeConnection)
THEN do a whole bunch of other stuff
ELSE
Well, I would have to do setup/config manually.

My (WorkConnection) is to a Win2K network through LAN using smb (Go->Connect to Server and enter address - of course I have saved in Favorite so I do not have to actually type each time)

My (HomeConnection) is through Airport to cable modem

I do not have a problem actually connecting at each location, I just need a script that detects which connection is present/active, to which I could then add what other things I need done, what other settings/preferences I want.

So as a start, need to detect the connection and test which one it is.

I am newbie to Mac & AppleScript, any help would be greatfully appreciated. If it is step by step I would really love it.

I have searched around (forums, applecript.com, etc. etc.) and most of the stuff references only AppleTalk or is OS 9 or before - which I might be able to get to work, but as I am new and using OS X, do not want to go off in wrong direction.

I do understand programming & a fair amount about networking, just weak on OS X & AppleScript.
Thanks!

OK. I did manage to piece osmething together:

try
tell application “Internet Connect”
set myCurrentConfig to name of configuration 1
quit
end tell
display dialog "Current Config: " & myCurrentConfig buttons {“OK”}
on error
display dialog “Current Config: error” buttons {“OK”}
end try

3 questions now.
When this runs, it opens Internet Connect, hence the “quit”
How can I do this so that Internet Connect does not open?

I do I get it to “capture” which Airport network it is connected to (I lied above, I also go to a third location) so I need to know “Aiport” vs LAN, but if Airport which network.
I could not find the property to which I need to refer.

Should I be doing this in NSL?