묻고답하기

function popupNew() {
     openwin = window.open("http://팝업주소","popup","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=555,height=707");
            }

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 "";
}


if (getCookie("popup") != "pop_11") {
                var timer =setTimeout('popupNew()',5000);
}

이 이제 팝업창을 뜨게하는 메인페이지구요. 팝업창에 뜨는 페이지는

<script language="JavaScript">

function closeWin() {
        if(document.checkClose.nanumi.checked == true) {
                setCookie("popup", "pop_11" ,24);
        }
        self.close();
}

function setCookie(name,value,expiredays) {
        var todayDate = new Date();
        todayDate.setDate(todayDate.getDate() + expiredays);
        document.cookie = name + "=" + escape( value ) + "; path=/; domain=mcing.com ; expires=" + todayDate.toGMTString() + ";"
}

</script>

해줬구요(저 도메인도 제대로 해줬거든요)

<form name="checkClose">
        <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                        <td bgcolor="#002F80" height="25" align="center"><input type="checkbox" name="nanumi"><b><font color="#FFFFFF">다음부터 이 창을 열지 않음</font></b>     <input type="button" border="0" alt="" align="center" name='btn' value="창닫기" onClick="closeWin()"></td>
                </tr>

        </table>
</form>

해서 체크하면.. 다시 팝업창 안뜨게하려고하는데 죽어두 쿠키가 안생기네요
황당해요 ㅠㅠ