
function BrowserStats() {
  var userAgent = " " + navigator.userAgent.toLowerCase();
  // determine nn/ie, rounded version number and platform
  this.nn = userAgent.indexOf( "mozilla" ) > 0;
  // "compatible" versions of mozilla are not netscape
  if( userAgent.indexOf( "compatible" ) > 0 )
    this.nn = false;
  this.ie = userAgent.indexOf( "msie" ) > 0;
  this.version = navigator.appVersion;
  this.major = parseInt( this.version );
  this.mac = userAgent.indexOf( "mac" ) > 0;
  // ie 5 reports itself as 4
  if( this.ie ) {
    if( userAgent.indexOf( "msie 5" ) > 0 )
      this.major = 5;
  }
  return this;
}

var browser = new BrowserStats();

// font platform resize
var platformCSS;
if( browser.mac && browser.major >= 5 ) {
  platformCSS = "ieadjust.css";
} else if( browser.mac ){
  platformCSS = "v4adjustMac.css";
}
if( !browser.mac && browser.ie ) {
  platformCSS = "ieadjust.css";
}

if( platformCSS ){
  document.write( "<link rel='stylesheet' href='styles/" + platformCSS + "'type='text/css'>" );
}

// netscape browser resize fix

if( browser.nn ) {
  widthCheck = window.innerWidth;
  heightCheck = window.innerHeight;
  window.onresize = resizeFix;
}

function resizeFix() {
  if( widthCheck != window.innerWidth || heightCheck != window.innerHeight )
    window.location.reload( true )
}
