/*
 * ========== BASIC INFO SNIFF ====================
 *
 * This is not the most fully-featured browser sniff, but it determines enough
 * information to make the sort of simple decisions that we need to make.
 */

// initial info
var agt    = navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();

// version number
//   (IE and Mozilla spoof other browsers, so the real version number is sort of buried)
var version = parseInt(navigator.appVersion);

var iePos = appVer.indexOf('msie');
if (iePos != -1) {
  version = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
  version = parseInt(version);
}

var nav6Pos = agt.indexOf('netscape6');
if (nav6Pos !=-1) {
  version = parseFloat(agt.substring(nav6Pos+10))
  version = parseInt(version)
}

// browser type
var is_opera = (agt.indexOf("opera") != -1);
var is_webtv = (agt.indexOf("webtv") != -1);
var is_ie    = (iePos!=-1);
var is_nav   = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
             && (agt.indexOf('compatible') == -1) && !is_opera && !is_webtv);

// platform
var is_win = ( (agt.indexOf("win") != -1) || (agt.indexOf("16bit") != -1) );
var is_mac = ( agt.indexOf("mac") != -1 );


/*
 * ========== MOUSEOVER SNIFF ====================
 */

var doMouseovers = false;

if( is_nav || is_ie ) {
  doMouseovers = (version > 2);
} else if( is_opera ) {
  doMouseovers = true;
}

function hiLite( imgDocID, imgObjName )
{
  if (doMouseovers) {
    document.images[imgDocID].src = imgObjName;
  }
}

function hiLiteOff( imgDocID, imgObjName )
{
  if( doMouseovers ) {
    document.images[imgDocID].src = imgObjName;
  }
}
