


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();
var isPageLoaded = false;

// 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='/Shared/" + platformCSS + "'type='text/css'>" );
}

// focus browser window onload
if( window.focus() ) self.focus();

// rollovers
function leftRollover( arg_imgName ) {
  if( document.images ) {
    document[arg_imgName].src = eval( arg_imgName + "_on.src" );
  }
}

function leftRolloff( arg_imgName ) {
  if( document.images ) {
    document[arg_imgName].src = eval( arg_imgName + "_off.src" );
  }
}

function rollover( arg_imgName ) {
  doRollover( arg_imgName, "on" );
}

function rolloff( arg_imgName ) {
  doRollover( arg_imgName, "off" );
}

function multiRollover( arg_imgName, arg_uniqToken ) {
  doMultiRollover( arg_imgName, "on", arg_uniqToken );
}

function multiRolloff( arg_imgName, arg_uniqToken ) {
  doMultiRollover( arg_imgName, "off", arg_uniqToken );
}

function doRollover( arg_imgName, arg_on ) {
  doMultiRollover( arg_imgName, arg_on, "" );
}

function doMultiRollover( arg_imgName, arg_on, arg_uniqToken ) {
  if( document.images && arg_imgName ) {
    if( isPageLoaded ) {   // Check if page is loaded
      if( arg_on != "on" )
        arg_on = "off";
      
      var imgSrc = document[arg_imgName + arg_uniqToken].src;      
      var imgExtension = imgSrc.substring( imgSrc.lastIndexOf( "."  ), imgSrc.length );
      var currentState = ( imgSrc.indexOf( "on" + imgExtension ) != -1 ) ? "on" : "off";
      var imgPrefix = imgSrc.substring( 0,  ( imgSrc.length - currentState.length - imgExtension.length - 1 ));

      imgSrc = imgPrefix + "_" + arg_on + imgExtension;     
      document[arg_imgName + arg_uniqToken].src = imgSrc;
    }
  }
}