// 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 open_main()     //main popupÀ» ¿­¶§....ºñ±³ÇÏ±â À§ÇØ Áö¿ìÁö ¾Ê¾ÒÀ½
{
  if ( getCookie( "Notice" ) != "done" )		
  {
    noticeWindow  =  window.open('http://www.drbenest.com/event/booking.html','Notice','width=395, height=205,scrollbars=0');
    noticeWindow.window.focus
  }
}

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();
  }
}


function open_notice1()   //¾È³»¸»¾¸ ÆË¾÷Ã¢
{
   if ( getCookie( "notice1" ) != "done" )		
  {
	newwindow=window.open("/popup/event/temp/seorabolgc_popup_three.html", "notice1", "width=374, height=453, left=0, top=0, scrollbars=0, status=0, resizable=0, directories=0")
	newwindow.creator=self
  }
}

function open_notice3()   //¿ä±Ý ÆË¾÷Ã¢ 
{
   if ( getCookie( "notice3" ) != "done" )		
  {
	newwindow=window.open("/popup/event/temp/seorabolgc_popup_0917.html", "notice3", "width=374, height=265, left=0, top=0, scrollbars=0, status=0, resizable=0, directories=0")
	newwindow.creator=self
  }
}


function open_notice4()   //½áÅ¬¸ðÁý °øÁö»çÇ× ÆË¾÷Ã¢ 
{
   if ( getCookie( "notice4" ) != "done" )		
  {
	newwindow=window.open("/popup/event/temp/seorabolgc_popup_0608.html", "notice4", "width=374, height=347, left=0, top=320, scrollbars=0, status=0, resizable=0, directories=0")
	newwindow.creator=self
  }
}



//function open_notice1()   //ÆË¾÷Ã¢ 
//{
//   if ( getCookie( "notice1" ) != "done" )		
//  {
//     noticeWindow  =  window.open('/popup/event/temp/seorabol_popup.html','notice1','width=620, height=350, left=0, top=0, scrollbars=0, status=0, resizable=0, directories=0,marginwidth=0');
//     noticeWindow.window.focus
//  }
//}

function open_notice2()   //ÆË¾÷Ã¢ 
{
 if ( getCookie( "notice2" ) != "done" )		
 {
   noticeWindow  =  window.open('/popup/event/temp/summer.html','notice2','width=350, height=400,  top=350, scrollbars=no');
  noticeWindow.window.focus
}
}

 //var CloseDate = new Date("Feb 4, 2004"); //ÆË¾÷ À©µµ¿ì¸¦ ´Ý°íÀÚ ÇÏ´Â ³¯Â¥¸¦ ÀÔ·ÂÇÏ¼¼¿ä.
 //var Today = new Date(); //¿À´Ã ³¯Â¥¸¦ ÀÇ¹ÌÇÕ´Ï´Ù. ¼öÁ¤ÇÏÁö ¸¶¼¼¿ä.


//function controlCookie(elemnt) {
//  if(elemnt.checked) { //Ã¼Å© ¹Ú½º¸¦ ¼±ÅÃÇßÀ» °æ¿ì ÄíÅ° »ý¼º ÇÔ¼ö È£Ãâ
//   setCookie("op1","true", 1)
//  }
//  else {  //Ã¼Å© ¹Ú½º¸¦ ÇØÁ¦ÇßÀ» °æ¿ì ÄíÅ° ¼Ò¸ê ÇÔ¼ö È£Ãâ
//   clearCookie("op1")
//  }
//  return
//}

//<form name="form1" method="post" action=""> 
//<input type="checkbox" name="closeEvent" onClick="controlCookie(this)">¿À´Ã ÇÏ·ç ÀÌ Ã¢À» ¿­Áö ¾Ê½À´Ï´Ù!
//</form>


function closeWin(objtar, objname) 
{ 
	if ( objtar.checked ) 
 		setCookie( objname, "done" , 1); 
	self.close(); 
}
function closeWin(objtar, objname) 
{ 
	if ( objtar.checked ) 
 		setCookie( objname, "done" , 1); 
	self.close(); 
}


