Check out the following page.

You will get an alert, nothing existing. But then check out the code and figure out how it is done.

Have fun!