// Request.ServerVariables("REMOTE_ADDR") ASP ÀÛ¼ºÀÚ IP

//ÄíÅ°°ªÀ» °¡Á®¿À´Â ÇÔ¼ö
function getCookie(name) {
  var from_idx = document.cookie.indexOf(name+'=');

  if( from_idx != -1) {
    from_idx += name.length + 1;
    to_idx = document.cookie.indexOf(';', from_idx);
    if (to_idx == -1) {
      to_idx = document.cookie.length;
    }
    return unescape(document.cookie.substring(from_idx, to_idx));
  }
  else {
    return 0;
  }
}

// ÄíÅ° ¼³Á¤
function setCookie(name, value, expiredays) {
  var expire_date = new Date();
  expire_date.setDate(expire_date.getDate() + expiredays );
  document.cookie = name + "=" + escape( value ) + "; expires=" + expire_date.toGMTString() + "; path=/";
}

function setCookieTime(name, value, expiretime) {
  var expire_date = new Date();
  expire_date.setDate(expire_date.getHours() + expiretime );
  document.cookie = name + "=" + escape( value ) + "; expires=" + expire_date.toGMTString() + "; path=/";
}

//ÄíÅ° ¼Ò¸ê ÇÔ¼ö
function clearCookie(name) {
  var expire_date = new Date();
  expire_date.setDate(expire_date.getDate()-1); // ÀÌÀü³¯ÀÚ¸¦ ¼³Á¤ÇÏ¿© ÄíÅ°¼Ò¸ê
  document.cookie = name + "= " + "; expires=" + expire_date.toGMTString() + "; path=/"
}

// ÆË¾÷ ¹«Á¶°Ç ¶ì¿ò
function index_popup(){
	popupWindow = window.open('/mont/popup/20040403.asp','index_popup','width=516, height=284,left=4,top=4,scrollbars=auto');
	popupWindow.window.focus();
	
	return;
	if ( getCookie( "index_popup" ) == 0 ){
	//setCookie("index_popup","visit",0);
	popupWindow = window.open('/mont/popup/20040403.asp','_blank','width=516, height=284,left=4,top=4,scrollbars=auto');
	popupWindow.window.focus();
	}
}

//ÆË¾÷Ã¢ #1
function open_notice1(){
	if ( getCookie( "notice1" ) != "done" ){
		noticeWindow1 = window.open('/yeojoo/popup/100430.html','notice1','width=450, height=520, left=10, top=10, scrollbars=no');
		noticeWindow1.window.focus();
	}
}
//ÆË¾÷Ã¢ #2
function open_notice2(){
	if ( getCookie( "notice2" ) != "done" )	{
		noticeWindow2 = window.open('/yeojoo/popup/100311.html','notice2','width=450, height=450, left=700, top=10, scrollbars=no');
		noticeWindow2.window.focus();
	}
}
//ÆË¾÷Ã¢ #3
function open_notice3(){
	if ( getCookie( "notice3" ) != "done" ){
		noticeWindow3 = window.open('/yeojoo/popup/100423.html','notice3','width=515, height=700, left=350, top=10, scrollbars=yes');
		noticeWindow3.window.focus();
	}
}

//ÆË¾÷Ã¢ #4
function open_notice4(){
	if ( getCookie( "notice4" ) != "done" ){
		noticeWindow4 = window.open('/yeojoo/popup/100224_2.html','notice4','width=444, height=301, left=10, top=10, scrollbars=no');
		noticeWindow4.window.focus();
	}
}

//ÆË¾÷Ã¢ #5
function open_notice5(){
	if ( getCookie( "notice5" ) != "done" ){
		noticeWindow5 = window.open('/pop/100224.html','notice5','width=490, height=600, left=0, top=10, scrollbars=no');
		noticeWindow5.window.focus();
	}
}
function closeWin(objtar, objname) 
{ 
	if ( objtar.checked ) 
 		setCookie( objname, "done" , 1); 
	self.close(); 
}