//-------------------------------- the following is added since 4/28/04

// return MSIE version or -1 if not IE
function getIEVer() {
  var ieVer = -1;
  if (navigator.appName == "Microsoft Internet Explorer") {
    var ua = navigator.userAgent;
    var msie = ua.substring(ua.indexOf("MSIE") +4);
    ieVer = parseFloat(msie);
  }
  return ieVer;
}

// return Mozilla version or -1 if not Mozilla
// Note: Netscape 6 = Mozilla 0.9; Netscape 7 = Mozilla 1.4
function getMzVer() {
  var mzVer = -1;
  if (navigator.appName == "Netscape") {
    var ua = navigator.userAgent;
    if (ua.indexOf("Safari") > -1) {
      mz = ua.substring(ua.indexOf("Safari/") +7)
      mzVer = parseFloat(mz);
      if (mzVer <= 85.8 ) mzVer = 0;
    }
    else if (ua.indexOf("rv:") == -1) {
      mzVer = 0; // earlier versions of Netscape
    } 
    else {
      if (ua.indexOf("Camino") > -1 ||
          ua.indexOf("Firebird") > -1) {
        mzVer = 0; // Netscape variations not to support now
      }
      else {
        mz = ua.substring(ua.indexOf("rv:") +3);
        mzVer = parseFloat(mz);
      }
    }
  }
  return mzVer;
}

function isLinux() {
  var platform = navigator.platform;
  var linux = platform.indexOf("Linux") > -1;
  return linux;
}

function isPC() {
  var pc = navigator.platform == "Win32";
  return pc;
}

function isMAC() {
  var mac = (navigator.platform == "MacPPC" ) || (navigator.platform == "MacIntel" ) ;
  return mac;
}

function isSun() {
  var platform = navigator.platform;
  var sunos = platform.indexOf("SunOS") > -1;
  return sunos;
}
