Internet Detection

Anyone:
I am trying to create a cd running application with flash and want to know if it is possible for an app to detect if the user has an internet connection. On the release of a button, users with the connection would be directed to a page online that would be updated with the latest information and those without the internet would launch a local .htm page with the information as of the projects completion.

If anyone know how to do this, or if it is even possible, I would really appreciate the input.

Thank you all

Evan
Video / Design / Motion