/* Minification failed. Returning unminified contents.
(1,10): run-time error CSS1031: Expected selector, found 'setCookie('
(1,10): run-time error CSS1025: Expected comma or open brace, found 'setCookie('
(7,10): run-time error CSS1031: Expected selector, found 'getCookie('
(7,10): run-time error CSS1025: Expected comma or open brace, found 'getCookie('
(27,10): run-time error CSS1031: Expected selector, found 'checkCookie('
(27,10): run-time error CSS1025: Expected comma or open brace, found 'checkCookie('
(50,10): run-time error CSS1031: Expected selector, found 'checkCookieSingle('
(50,10): run-time error CSS1025: Expected comma or open brace, found 'checkCookieSingle('
 */
function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
    var expires = "expires=" + d.toGMTString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(cname) {
    var investor = cname + "=";
    var country = cname + "=";
    var decodedCookie = decodeURIComponent(document.cookie);
    var ca = decodedCookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') {
            c = c.substring(1);
        }
        if (c.indexOf(investor) == 0) {
            return c.substring(investor.length, c.length);
        }
        if (c.indexOf(country) == 0) {
            return c.substring(country.length, c.length);
        }
    }
    return "";
}
//index
function checkCookie() {
    var investor = getCookie("investor");
    var country = getCookie("country");
    var v_selectedLang = getCookie("langPreference");

    if (investor != "" && country != "" && v_selectedLang != "") {
        //alert("Investor " + investor);
        jQuery('#modal-funds').hide();
        jQuery('#main-table').show();
    } else {
        jQuery('#modal-funds').show();
        jQuery('#main-table').hide();
    }
    if (v_selectedLang == "it-IT") {
        $("#lnkflag-en").show();
        $("#lnkflag-it").hide();
    }
    if (v_selectedLang == "en-GB") {
        $("#lnkflag-en").hide();
        $("#lnkflag-it").show();
    }
}
//detail
function checkCookieSingle() {
    var investor = getCookie("investor");
    var country = getCookie("country");
    if (investor != "" && country != "") {
        jQuery('#single-view').show();
    } else {
        window.location = "https://www.banorcapital.com/wpnew/html";
    }
}
