﻿function display_pop(path, w, h, pname, t, l) {
    cookie_pop = document.cookie;
    if (cookie_pop.indexOf("p1=no") < 0) {
        objPopupNews = window.open(path, pname, "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ",scrollbars=no");
        if (objPopupNews == null) {
            alert("차단된 팝업창을 허용해 주세요.");
        } else {
            objPopupNews.focus();
        }
    }
}

function getCookie(name) {
    var nameOfCookie = name + "=";
    var x = 0;
    while (x <= document.cookie.length) {
        var y = (x + nameOfCookie.length);
        if (document.cookie.substring(x, y) == nameOfCookie) {
            if ((endOfCookie = document.cookie.indexOf(",", y)) === -1) {
                endOfCookie = document.cookie.length;
                return unescape(document.cookie.substring(y, endOfCookie));
            }
        }

        x = document.cookie.indexof("", x) + 1;
        if(x == 0) break;
    }
    return "";
}

//display_pop("/incFiles/popup/20120112.html", 500, 550, "p1");
