
function GetFeatureBitmask()
{
    //-->get global variable set in license.inc client-side code...
    return g_nEnabledFeatureMask;
}

function GetFeatures()
{
    //-->get global variable set in license.inc client-side code...
    return g_oFeatures;
}

function IsFeatureEnabled(sFeatureName)
{
    return _IsFeatureEnabled(sFeatureName, GetFeatureBitmask());
}

function _IsFeatureEnabled(sFeatureName, nFeatureBitmask)
{
    //-->Bitwise AND to determine if feature is in bitmask...
    var nFeatureValue = GetFeatures()[sFeatureName];
    if(nFeatureValue & nFeatureBitmask)
    {
        return true;
    }
    return false;
}