/*-------------------------------------------------------------
  ÆË¾÷ ¶ç¿ì±â
  ±è¸¸Áß 2006.03.09
  »ç¿ë¿¹ : 
  centerLayer('LayerID');   
--------------------------------------------------------------*/
// ¸ÞÀÎÆäÀÌÁöÀÇ ÇÃ·¡½¬ ¹«ºñ¸¦ ½ÇÇàÇÑ´Ù.
//play('fxbanner');

// ¸ÞÀÎÆäÀÌÁöÀÇ ÆË¾÷À» ½ÇÇàÇÑ´Ù.
EventPop();	


function EventPop(){
	//ÆË¾÷À¸·Î ¶á ÆÄÀÏ¿¡¼­ ±¸¿ï ÄíÅ°ÀÇ ÀÌ¸§À» Ã¼Å©ÇÏ¿© ¾øÀ¸¸é ¶ç¿î´Ù
	//if (!getCookie('20070907_popup')){ // ÅëÇÕ
	//window.open('/popup/20070907/popup.asp','open_01' ,'status=no,scrollbars=no,resizable=no,width=402,height=535,left=30,top=30')
	//}

var Day = new Date();
var ToDay = Day.getDate() 
var ToMonth = Day.getMonth()
var ToYear = Day.getYear()
var ToHours = Day.getHours()
var ToMinutes = Day.getMinutes()

var toDates = new Date (ToYear,ToMonth ,ToDay , ToHours, ToMinutes);
var beginDate = new Date(2010,01-1,21,09,59);
var endDate = new Date (2010,01-1,22,09,59);

    var beginDate16 = new Date(2010,02-1,24,09,59);
    var endDate16 = new Date (2010,02-1,25,09,59);

    var beginDate25 = new Date(2010,02-1,25,09,59);
    var endDate25 = new Date (2010,02-1,26,09,59);

    var beginDate26 = new Date(2010,02-1,26,09,59);
    var endDate26 = new Date (2010,03-1,01,09,59);
    
    var beginDate5 = new Date(2010,03-1,05,09,59);
    var endDate5 = new Date (2010,03-1,06,09,59);

    if (toDates > beginDate5 && toDates <  endDate5 )
    {   
        if (!getCookie(toDates.getDate())){ // ÅëÇÕ
                   
            var PopSet = 'status=no,scrollbars=no,resizable=no,width=356,height=336,';
            window.open('/popup/20100304/popup.html','20100304',PopSet);
        }
    }

    if (toDates > beginDate16 && toDates <  endDate16 )
    {   
        if (!getCookie(toDates.getDate())){ // ÅëÇÕ
                   
            var PopSet = 'status=no,scrollbars=no,resizable=no,width=356,height=336,';
            window.open('/popup/20100224/popup.html','20100224',PopSet);
        }
    }

    if (toDates > beginDate25 && toDates <  endDate25 )
    {   
        if (!getCookie(toDates.getDate())){ // ÅëÇÕ
                   
            var PopSet = 'status=no,scrollbars=no,resizable=no,width=356,height=336,';
            window.open('/popup/20100225/popup.html','20100225',PopSet);
        }
    }

    if (toDates > beginDate26 && toDates <  endDate26 )
    {   
        if (!getCookie(toDates.getDate())){ // ÅëÇÕ
                   
            var PopSet = 'status=no,scrollbars=no,resizable=no,width=356,height=336,';
            window.open('/popup/20100226/popup.html','20100226',PopSet);
        }
    }

}
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 "";
}	


