// (C) Netscape Communications 1999.  
// Permission granted to reuse and distribute.
// Revised 17 May 99 to add is_nav5up and is_ie5up (see below). 

// Edited heavily (by Marlin Ouverson) for this site to:
//   eliminate tests unneeded here & add global sniff-related functions.

// Complete original was from: 
// http://developer.netscape.com/docs/examples/javascript/browser_type.html

// Convert all characters to lowercase to simplify testing:
var agt=navigator.userAgent.toLowerCase(); 

// *** BROWSER VERSION *** 
// Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 

// Note: Opera, WebTV, and AOL are exceptions in some ways; 
// this sniffer does not differentiate between them.
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_nav4  = (is_nav && (is_major == 4));
var is_nav4up  = (is_nav && (is_major >= 4));
var is_nav6up  = (is_nav && (is_major >= 6));

var is_ie    = (agt.indexOf("msie") != -1);
var is_ie4up = (is_ie  && (is_major >= 4));


// *** OS version ***
var is_mac   = (agt.indexOf("mac")!=-1);


// NN resize-bug workaround (not originally with above code)
if (is_nav4) {
    var origWidth = innerWidth;
    var origHeight = innerHeight;
}

function reDo() {
  if (!is_nav4) { return; }

  if (innerWidth != origWidth || innerHeight != origHeight) {
      location.reload(); }
    }

function myvoid() {}

