Detect if unity is installed via javascript in browser? (firefox, chrome)

In a browser (i'll be supporting firefox and chrome) I want to have a javascript function that returns true or false if unity is installed. Or perhaps a version number VS undefined/null/false or 0 if not installed.

How can i do this?

The first code snippet on this page http://unity3d.com/support/documentation/Manual/Detecting%20the%20Unity%20Web%20Player%20using%20browser%20scripting.html

with the 2nd being the usage example