browser detection in javascript

I need help writing a browser detection script in javascript

Something Similar to below, but so I can have many more browsers and the option to load indepedent html's depending on the browser, I would like the ability to add browsers such as netscape, IE, safari, firefox, opera and chrome...

Thanks Bob
People still use netscape?
Netscape 8 and 9 were just a rebranded, bug-fixed version of firefox.
You're asking about Netscape when the first thing on there is WebTV? :p
Haha, some people might still use windows 98 with their TV card...
Though quite how it got the internet through a TV card I shall never know.

Original thread: https://assemblergames.com/threads/browser-detection-in-javascript.28585/