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

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

function popup_closeWin(seqn)
{
    var obj ;
    obj = document.getElementById("popup_form" + seqn);
    if ( obj["notice" + seqn].checked )
        notice_setCookie( 'kepri' + seqn, 'done' + seqn , 1); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
        document.all['divpop'+seqn].style.visibility = "hidden";
}

function entercheck() {
    if(event.keyCode == 13) {
        frmChk();
    }
}

//ÇÑÀü Àü·Â¿¬±¸¿ø ¸É¹ö½Ê ÇÁ·Î±×·¥ ¾ÆÀÌµð¾î °ø¸ð
function popOpen1(){
    if (getCookie("pop_1") == "") {
        window.open("/pop/pop01.jsp","popOpen1","width=450,height=530,left=10, top=40, resizable=no, toolbar=no, scrollbars=no");
    }
}

//ÇÑ±¹Àü·Â º¥Ã³±â¾÷À°¼º¼¾ÅÍ ½Å±Ô ÀÔÁÖ¾÷Ã¼ ¸ðÁý
function popOpen2(){
    if (getCookie("pop_2") == "") {
        window.open("/pop/pop02.jsp","popOpen2","width=470,height=700,left=200, top=40, resizable=no, toolbar=no, scrollbars=yes");
    }
}


function initLoad() {
    MM_preloadImages('images/main/m_c_img_1_1_r.gif','images/main/m_c_img_1_3_r.gif','images/main/m_c_img_5_2_r.gif','images/main/m_c_img_5_3_r.gif','images/main/m_c_img_5_4_r.gif');
    popOpen1();
    popOpen2();
}
