    function ReadCookie(name) {
        var label = name + "=" ;
        var labelLen = label.length ;
        var cLen = document.cookie.length
        var i = 0
        while (i < cLen){
            var j = i + labelLen
            if (document.cookie.substring(i,j) == label) {
                var cEnd = document.cookie.indexOf(";",j)
                    if (cEnd == -1){
                        cEnd = document.cookie.length
                    }
                    return unescape(document.cookie.substring(j,cEnd))
            }
            i++
        }
        return ""
    }
 
    function SetCookie( popup_name ){
        var expire = new Date();
        expire.setDate(expire.getDate() + 1 );
        parent.document.cookie = popup_name + "=0;expires=" + expire.toGMTString() + ";path=/";
    }
 
    // ÆË¾÷ Ã¢ ´Ý±â
    function CloseCookieWin(popup_name, check){
        if ( check ) {
            SetCookie(popup_name);
        }
        self.close();
    }
 
    function OpenCookiePopup(ckname,url,winattribute){ 
        var ck = ReadCookie(ckname); // ÄíÅ°ÀÇ °ªÀ» ÀÐ´Â ÀÐ°í ÆË¾÷Ã¢À» ¶ç¿ì´Â ºÎºÐ
        if ( ck == '0' ) return; 
        window.open(url,ckname,"'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no," + winattribute + "'");
    }

    function goMain( next_location )
    {
        window.opener.location.href = next_location;
        self.close();
    }

