// ==============================================================================
//
// Client-side utility library
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Flag to test code path for legacy browsers
//
  var TEST_LEGACY = false;
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Flag to tell if this client supports the 'standard' browser technology
//
  var bClientIE4 = false;       // set to 'true' by GetClient(), if applicable
  var bClientNS4 = false;       // set to 'true' by GetClient(), if applicable
  var bClientOTH = false;       // set to 'true' by GetClient(), if applicable
  var sClient    = GetClient();
//
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Check if this browser is a Windows application and either IE4+ or NS4+
//
  function GetClient()
  { // Check each browser type:
    if (navigator.userAgent.indexOf("Win") == -1)
    { bClientOTH = true;
      return "OTH";
    }
    if (navigator.appVersion.substring(0,1) < 4)
    { bClientOTH = true;
      return "OTH";
    }
    if (navigator.appVersion.indexOf("MSIE") != -1)
    { bClientIE4 = true;
      return "IE4";
    }
    if (TEST_LEGACY)
    { bClientOTH = true;
      return "OTH";
    }
    if (navigator.appName.indexOf("Netscape") != -1)
    { bClientNS4 = true;
      return "NS4";
    }
    bClientOTH = true;
    return "OTH";
  }
//
// ==============================================================================

