If you are wondering how this was done, hey this is called scripting, Client-side scripting.
Time to start your VBScript
Take a look into your source code and see how this little functionality was achieved using MSVBScript.