A pretty simple javascript function to parse the user agent string. The proper way to check for features is to use feature detection, but in some rare cases, you might want to look at the browser and version (as was my case, where I was using a third party iframe plugin that only worked at certain browser versions, so I needed to check before I started the "widget".)
This is free software from Levyco Development, LLC. http://www.levycodev.com.