Browser name, version number, operating system
VaR browserdetect = {init: function () {This. browser = This. searchstring (this. databrown) | "an unknown Browser"; this. version = This. searchversion (navigator. useragent) | this. searchversion (navigator. appversion) | "an unknown version"; this. OS = This. searchstring (this. dataos) | "an unknown OS" ;}, searchstring: function (data) {for (VAR I = 0; I <data. length; I ++) {var datastring = data [I]. string; var data Prop = data [I]. prop; this. versionsearchstring = data [I]. versionsearch | data [I]. identity; If (datastring) {If (datastring. indexof (data [I]. substring )! =-1) return data [I]. identity;} else if (dataprop) return data [I]. identity ;}, searchversion: function (datastring) {var Index = datastring. indexof (this. versionsearchstring); If (Index =-1) return; return parsefloat (datastring. substring (index + this. versionsearchstring. length + 1) ;}, databrowser: [{string: navigator. useragent, substring: "Chrome", identity: "Chrome"}, {string: navigator. useragent, substring: "omniweb", versionsearch: "omniweb/", identity: "omniweb" },{ string: navigator. vendor, substring: "apple", identity: "safari", versionsearch: "version" },{ prop: window. opera, identity: "Opera", versionsearch: "version"}, {string: navigator. vendor, substring: "ICAB", identity: "ICAB" },{ string: navigator. vendor, substring: "KDE", identity: "Konqueror"}, {string: navigator. useragent, substring: "Firefox", identity: "Firefox"}, {string: navigator. vendor, substring: "Camino", identity: "Camino"}, {// for newer netscapes (6 +) string: navigator. useragent, substring: "Netscape", identity: "Netscape"}, {string: navigator. useragent, substring: "MSIE", identity: "Internet Explorer", versionsearch: "MSIE" },{ string: navigator. useragent, substring: "gecko", identity: "Mozilla", versionsearch: "rv"}, {// for older netscapes (4-) string: navigator. useragent, substring: "Mozilla", identity: "Netscape", versionsearch: "Mozilla"}], dataos: [{string: navigator. platform, substring: "win", identity: "Windows"}, {string: navigator. platform, substring: "Mac", identity: "Mac"}, {string: navigator. useragent, substring: "iPhone", identity: "iPhone/iPod"}, {string: navigator. platform, substring: "Linux", identity: "Linux"}]}; browserdetect. init ();