20 lines
656 B
JavaScript
20 lines
656 B
JavaScript
|
// globals, Copyright 2001-2005 Michael Foster (Cross-Browser.com)
|
||
|
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
|
||
|
|
||
|
var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xNN4,xUA=navigator.userAgent.toLowerCase();
|
||
|
if(window.opera){
|
||
|
var i=xUA.indexOf('opera');
|
||
|
if(i!=-1){
|
||
|
var v=parseInt(xUA.charAt(i+6));
|
||
|
xOp7Up=v>=7;
|
||
|
xOp6Dn=v<7;
|
||
|
}
|
||
|
}
|
||
|
else if(navigator.vendor!='KDE' && document.all && xUA.indexOf('msie')!=-1){
|
||
|
xIE4Up=parseFloat(navigator.appVersion)>=4;
|
||
|
xIE4=xUA.indexOf('msie 4')!=-1;
|
||
|
xIE5=xUA.indexOf('msie 5')!=-1;
|
||
|
}
|
||
|
else if(document.layers){xNN4=true;}
|
||
|
xMac=xUA.indexOf('mac')!=-1;
|