var agent    = navigator.userAgent.toLowerCase();
var ver      = parseInt(navigator.appVersion);   
var briNotSupp   = 1;
var briIEx86     = 2;
var briMOZx86    = 3;
var briMOZCoolLogic    = 4;
 
function checkVersion()
{
    document.Login.VER.value=ver;
    if (isIEx86())
    {
        document.Login.BRI.value=briIEx86;
    }
    else
    {
        if (isMozillax86())
            document.Login.BRI.value=briMOZx86;
        else
            if (isMozillaCool())
                document.Login.BRI.value=briMOZCoolLogic;
            else
                document.Login.BRI.value=briNotSupp;
    }
    document.Login.SCR.value="1";
    return (true);
}


function isIEx86()
{
    if (agent.indexOf("msie") != -1 &&
        agent.indexOf("win") != -1 &&
        ver >= 3)
    {
        return true;
    }
    return false;
}

function isMozillax86()
{
    if (agent.indexOf("mozilla") != -1 &&
        agent.indexOf("win") != -1 &&
        agent.indexOf("spoofer") == -1 &&
        agent.indexOf("compatible") == -1 &&
        ver >= 3)
    {
        return true;
    }
    return false;
}

function isMozillaCool()
{
    if (agent.indexOf("mozilla") != -1 &&
        agent.indexOf("linux") != -1 &&
        agent.indexOf("coollinux") != -1 &&
        ver >= 3)
    {
        return true;
    }
    return false;
}

