1 function browserVersion(types) {
2 var other = 1;
3 for (i in types) {
4 var v = types[i] ? types[i] : i;
5 if (USERAGENT.indexOf(v) != -1) {
6 var re = new RegExp(v + '(\\/|\\s|:)([\\d\\.]+)', 'ig');
7 var matches = re.exec(USERAGENT);
8 var ver = matches != null ? matches[2] : 0;
9 other = ver !== 0 && v != 'mozilla' ? 0 : other;
10 } else {
11 var ver = 0;
12 }
13 eval('BROWSER.' + i + '= ver');
14 }
15 BROWSER.other = other;
16 }