function popupNotify () {
    var rcookie = readCookie();
    if (rcookie == true)
    {
        var div = document.getElementById("notifymsg");
        div.setAttribute("class", "popupNotifyMsg");
        div.setAttribute("className", "popupNotifyMsg");
    }
    else
    {
        openInlineNotify();
    }
}

function closePopup () {
    var div = document.getElementById("notifymsg");
    var check = document.getElementById("notifymsgremember");
    if (check.checked == true)
    {
        setCookie();
    }
    
    //div.style.display="none";
    switchOff(div, {afterFinish: function () {openInlineNotify();}, duration: 1.0});
    //openInlineNotify();
}

function openInlineNotify () {
    var div = document.getElementById("eventHead");
    //div.setAttribute("class", "inlineNotifyMsg");
    //div.setAttribute("className", "inlineNotifyMsg");
    appear(div, {delay: 0.5});
}

function setCookie() {
    var valcook = readCookie();
    var dateNow = new Date();
    var tomDate = dateNow;
    tomDate.setDate(tomDate.getDate()+1);
    document.cookie="popupOpen=false; expires=" + tomDate.toGMTString() + "; path=/";
}

function readCookie() {
    var cookie = document.cookie;
    var first = cookie.indexOf("popupOpen=");
    if (first >= 0)
    {
        var str = cookie.substring(first,cookie.length);
        var last = str.indexOf(";");
        
        if (last < 0) last = str.length;
        str = str.substring(0,last).split("=");
        return str[1];
    }
    else
    {
        return true;
    }
}