
////////// detect.js //////////
//
//  Figure out which Viewers are available
//
//  This script returns the following variables:

var MapGuideControl   = "FALSE";  // [TRUE/FALSE] MapGuide Control usable ?
var MapGuidePlugin    = "FALSE";  // [TRUE/FALSE] MapGuide Plugin installed ?

// Note: navigator.appVersion on Win98 will show up as "Win95"
//

if ((navigator.appVersion.indexOf("WinNT")   != -1) ||
    (navigator.appVersion.indexOf("Win95")   != -1) ||
    (navigator.appVersion.indexOf("Win98")   != -1) ||
    (navigator.appVersion.indexOf("Windows") != -1))
{
    if (navigator.appName.indexOf("Netscape") != -1)
    {
        if (navigator.plugins && navigator.plugins["Autodesk MapGuide"])
            MapGuidePlugin = "TRUE";
    }
    else if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1)
    {
        // IE won't tell us if the control is installed, so we just assume
        // that either it is or that it can be downloaded on demand.

        MapGuideControl = "TRUE";
    }
}


