﻿var popupIe6Status = 0;


function loadPopupIe6() {
    if (popupInfoStatus == 0) {
        if(document.getElementById("popupIe6Background") != null)
        {
            document.getElementById("popupIe6Background").style.display = 'block';
            //document.getElementById("popupIe6Background").style.height = document.body.clientHeight;
        }
        if(document.getElementById("popupIe6Container") != null)
            document.getElementById("popupIe6Container").style.display = 'block';
        popupIe6Status = 1;
    }
}

function disablePopupIe6() {
    if(document.getElementById("popupIe6Container") != null)
        document.getElementById("popupIe6Container").style.display = 'none';
    if(document.getElementById("popupIe6Background") != null)
        document.getElementById("popupIe6Background").style.display = 'none';
    if(document.getElementById("popupIe6BackgroundClear") != null)
        document.getElementById("popupIe6BackgroundClear").style.display = 'none';
    popupIe6Status = 0;
}

function setCookie(c_name, expireHours) {
    var exdate = new Date();
    exdate.setHours(exdate.getDate() + expireHours);
    // "path=/" needed for IE cross-site functionality.
    document.cookie = c_name + "=1" + ((expireHours == null) ? "" : ";expires=" + exdate.toGMTString()+";path=/");
}

function getCookie(c_name) {
    if (document.cookie.length > 0) {
        c_start = document.cookie.indexOf(c_name + "=");
        if (c_start != -1) {
            c_start = c_start + c_name.length + 1;
            c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return "";
}
