// <![CDATA[
/**
 * ·¹ÀÌ¾îÆË¾÷¼³Á¤
 */
function startTime(){
    var time= new Date();
    hours= time.getHours();
    mins= time.getMinutes();
    secs= time.getSeconds();
    closeTime=hours*3600+mins*60+secs;
    closeTime+=20; //½Ã°£¼³Á¤
    Timer();
}

function Timer(){
    var time= new Date();
    hours= time.getHours();
    mins= time.getMinutes();
    secs= time.getSeconds();
    curTime=hours*3600+mins*60+secs
    if (curTime>=closeTime) {
        $('divpop1').hide();
        $('divpop2').hide();
    }
    else {
        window.setTimeout("Timer()",2000)
    }
}

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

function closeWin() {
//    if ( document.notice_form.chkbox.checked ){
        setCookie( "maindiv", "done" , 1 );
//    }
    $('divpop1').hide();
    $('divpop2').hide();
}
function closeLayer() {
  closeWin();
}


//  ·¹ÀÌ¾î ÆË¾÷
function viewLayerPopup()/*{{{*/
{
  cookiedata = document.cookie;

  if ( cookiedata.indexOf("maindiv=done") != -1 ) {
      $('divpop1').hide();
      $('divpop2').hide();
  }
  else {
      $('divpop1').show();
      $('divpop2').show();
      //startTime();    // ÀÚµ¿À¸·Î »ç¶óÁü
  }

} // end of the 'viewLayerPopup()' function/*}}}*/
//setOnLoadFunctions('viewLayerPopup');
// ]]>

