// Techniques from Ultimate client-side JavaScript client sniff.
// (C) Netscape Communications 1999.  Permission granted to reuse and distribute.
//http://developer.netscape.com/tech/javascript/index.html?content=/docs/examples/javascript/browser_type.html

var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);

// Netscape 4.0+ detection (includes Mozilla)
var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
    && (agt.indexOf('webtv') == -1));
var is_nav4up = (is_nav && (is_major >= 4));

// MS IE 4.0+ detection
var is_ie    = (agt.indexOf("msie") != -1);
var is_ie4up = (is_ie  && (is_major >= 4));