// This function returns a true if the current browser is a Netscape browser
// otherwise, it returns false
function isNetscape() {
    result = true;
    if (navigator.appName != "Netscape") {
        result = false;
        }
    // Let's make extra sure!
    if (navigator.appVersion.indexOf("MSIE") != -1) {
        result = false;
        }
    return result;
    }

// This function returns a true if the current browser is Internet Explorer
// otherwise, it returns false
function isIE() {
    result = true;
    if (navigator.appName != "Microsoft Internet Explorer") {
        result = false;
        }
    // Let's make extra sure!
    if (navigator.appVersion.indexOf("MSIE") == -1) {
        result = false;
        }
    return result;
    }

// This function returns the version number of a Netscape browser
function getNetscapeVersion() {
    // assume that we've got bad version info...
    var versionNum = -1;
    var fParen = navigator.appVersion.indexOf( "(");
    if (fParen != -1) {
        versionNum = navigator.appVersion.substring( 0, fParen);
        versionNum = parseFloat( versionNum);
        }
    else {
        alert( "Could not determine version number!\nThe appVersion property contains:\n" + navigator.appVersion);
        }
    return versionNum;
    }

// This function returns the version number of an IE browser
function getIEversion() {
    // assume we've got bad version info...
    var versionNum = -1;
    var msieFlag = navigator.appVersion.indexOf( "MSIE");
    if (msieFlag != -1) {
        // find the semi-colon...
        var msieVersionEnd = navigator.appVersion.indexOf( ";", msieFlag);
        versionNum = navigator.appVersion.substring( msieFlag + 4, msieVersionEnd);
        versionNum = parseFloat( versionNum);
        }
    else {
        alert( "Could not determine version number!\nThe appVersion property contains:\n" + navigator.appVersion);
        }
    return versionNum;
    }

// This function tells us if the browser is running on an Macintosh
function isMac() {
    var result = false; // assume the worst
    var platform = navigator.platform.substring(0, 3).toUpperCase();
    if (platform == "MAC") {
        result = true;
        }
    return result;
    }

// This function tells us if the browser is running on a Windows PC
function isWin() {
    var result = false; // assume the worst
    var platform = navigator.platform.substring(0, 3).toUpperCase();
    if (platform == "WIN") {
        result = true;
        }
    return result;
    }

// This function tells us if the browser is running on a Linux box
function isLinux() {
    var result = false; // assume the worst
    var platform = navigator.platform.substring(0, 3).toUpperCase();
    if (platform == "LIN") {
        result = true;
        }
    return result;
    }
