I found this in a bit of Javascript used by a banking site today:
// Ultimate client-side JavaScript client sniff. Version 3.03 // (C) Netscape Communications 1999-2001. // Permission granted to reuse and distribute.
Obviously the “Ultimate client-side JavaScript client sniffer” was written 3 or 4 years ago, and still works flawlessly. I bet it handles everything from Safari to Firefox without a hitch!