Simple javascript code to detect browser type, version, and OS
To initialize and detect browser:
browserDetect.init();
Once initialized, info is stored in the browserDetect object
//Browser type
browserDetect.browser;
//Browser version
browserDetect.version;
//OS Type
browserDetect.OS;