<!--

var hod_AppTimer = 0;

// I'll leave this in just in case there are any
// old HTML pages around
function switchToJ2IfNecessary(newName) {
  return false;
}


function reportJavaVersion(jString) {
  var i = jString.indexOf(':');
  var jVend = jString.substring(0,i);
  var jVers = jString.substring(i+1);

  if (jVers.substring(0,3) >= '1.3') {
    clearTimeout(hod_AppTimer);
    setdetectandswitch(2);  // use OBJECT tag
  } else {
    setdetectandswitch(1);  // use APPLET tag
  }
}


function startAppletTimer() {
  // set delay so IE has time to load plugin, if installed
  hod_AppTimer = setTimeout("checkJavaAndBuild()",8000);
}

// All functions internal to this file are named either *_JS  or *_VB
// The JavaScript functions end in "_JS".
// The Visual Basic functions end in "_VB".
// If the function you want to use ends like this, I probably didn't want you calling it directly.


function checkJavaAndBuild()
{
  //alert('checkJavaAndBuild() called...');
  // If the java vendor is at least 1.3, this function will return true.

  // 0: No Java support present
  // 1: Use APPLET tag
  // 2: Use OBJECT tag

  var result = 0;
  if (isIE()) {
    var JavaVersion = JavaVersionOBJECT_VB();
    if (JavaVersion != null) {
      JavaVersion = JavaVersion.substring(0,3);

      var JavaVendor  = JavaVendorOBJECT_VB().substring(0,3);
      if (JavaVersion >= "1.3") {
        result = 2;    // should use the OBJECT tag
      }
    }

    // if we have no results so far, check for Java 1
    if (result == 0) {
      JavaVersion = JavaVersionApplet_VB();

      if (JavaVersion != null) {
        result = 1;        // should use the APPLET tag
      }
    }
  }

  // now that we know what Java we have, write it out
  setdetectandswitch(result);

}

function getBrowserType()
{
  var browser = navigator.userAgent.toLowerCase();
  var result = 'undefined';
  if (browser.indexOf('msie')!=-1)
    result = 'MSIE';
  else if (browser.indexOf('mozilla') != -1) {
    if (browser.indexOf('gecko') == -1) 
      result = 'NS4x';
    else 
      result = 'NS6x';
  }
  return result;

}


function isNetscape4x()
{
// Returns true if the browser running is Netscape 4.x
    return (getBrowserType() == 'NS4x');
}


function isNetscape6x()
{
// Returns true if the browser running is Netscape 6.x
    return (getBrowserType() == 'NS6x');
}


function isMac()
{
// Returns false unless the browser is running on Mac OS
    var browser = navigator.userAgent.toLowerCase();                                                
    return ((browser.indexOf('mac_powerpc') != -1) || (browser.indexOf('macintosh') != -1));
}


function isMacIE()
{
// Returns false unless the browser is Microsoft's Internet Explorer running on Mac OS
    return (isIE() && isMac());
}


function isMacNS()
{
// Returns false unless the browser is Netscape 6+ or Safari running on Mac OS
    return (isNetscape6x() && isMac());
}


function isIE()
{
// Returns false unless the browser is Microsoft's Internet Explorer
    return (getBrowserType() == 'MSIE');
}


function browserVendor_JS()
{
// Returns "Microsoft Internet Explorer" when the browser running is IE.
// Returns "Netscape" when the browser running is Netscape/Mozilla
    var browser=navigator.userAgent.toLowerCase();

    if (browser.indexOf('msie')!=-1) {
        var browserVersion=browser.substr(browser.indexOf('msie')+5,3);
        return("Microsoft Internet Explorer")
    } else
        return("Netscape");
}


function browserVersion_JS()
{
// Returns a string with the version of IE, or "6.x" for Netscape 6.x, or "4.x" for Netscape 4.x
    var browser=navigator.userAgent.toLowerCase();

    if (browser.indexOf('msie')!=-1) {
        var browserVersion=browser.substr(browser.indexOf('msie')+5,3);
        return(browserVersion);
    } else
        if (browser.indexOf('gecko')!=-1)
        return("6.x");
    else
        return("4.x");
}



function JavaVersionAPPLET_JS()
{
// Returns the version of the JRE/JVM when Java is invoked with a APPLET tag
//    alert("JavaVersionAPPLET_JS()");
        var javaVersion=document.detectappletAPPLET.getJavaVersion();
//    alert("JavaVersionAPPLET_JS reports JavaVersion = " + javaVersion);
    return javaVersion;
}

function JavaVersionEMBED_JS()
{
// Returns the version of the JRE when Java is invoked with a EMBED tag
    var javaVersion=document.detectappletEMBED.getJavaVersion();
    return javaVersion;
}

function JavaVersionOBJECT_JS()
{
// Returns the version of the JRE when Java is invoked with a OBJECT tag
//    alert("JavaVersionOBJECT_JS()");
    var javaVersion=document.detectappletOBJECT.getJavaVersion();
//    alert(javaVersion);
    return javaVersion;
}


function JavaVendorAPPLET_JS()
{
// Returns the Java vendor of the JRE/JVM when Java is invoked with a APPLET tag
    var javaVendor = document.detectappletAPPLET.getJavaVendor();
    return javaVendor;
}

function JavaVendorEMBED_JS()
{
// Returns the Java vendor of the JRE/JVM when Java is invoked with a EMBED tag
    var javaVendor=document.detectappletEMBED.getJavaVendor();
    return javaVendor;
}

function JavaVendorOBJECT_JS()
{
// Returns the Java vendor of the JRE/JVM when Java is invoked with a OBJECT tag
//    alert("JavaVendorOBJECT_JS()");
    var javaVendor = document.detectappletOBJECT.getJavaVendor();
//    alert(javaVendor);
    return javaVendor;
}


function OSCheck_JS()
{
// Returns the current Operating System the browser is running under.
    var OperatingSystem = navigator.platform;
    return OperatingSystem;
}


function IsJava1()
{
   if (isNetscape4x()) {
      return true;
   } else if (isNetscape6x()) {
      return false;
   } else {
      JavaVersion = JavaVersionAPPLET_VB();
      if (JavaVersion != null) {
         if (JavaVersion.substring(0,3) == "1.1") {  //is this 1.1.4 (IE)?
            return true;
         }
      }
      return false;
   }
}

// -->
