function openPopup_systemnoti()
{
    var noticeCookie  = getCookie("popup_20110304");
    if (noticeCookie != "NO")
        window.open('http://www.gep.or.kr/popup/popup_20110304.html','sys_noti','width=450,height=240,top=20,left=400');
}

function openPopup_0601()
{
    var noticeCookie  = getCookie("popup_20110601");
    if (noticeCookie != "NO")
        window.open('/jsp/popup/4_service_comm_popup_20110601.html','new_gep2','width=450,height=240,top=20,left=100');
}

function openPopup_Noti4()
{
    var noticeCookie  = getCookie("popup_100513");
    if (noticeCookie != "no")
        window.open('http://www.gep.or.kr/popup/notice_20100513.html','gep_noti','width=300,height=258,top=20,left=20');

}

function openPopup_2010AEKI()
{
    var noticeCookie  = getCookie("OpenPop20100611");
    if (noticeCookie != "done")
        window.open('http://www.gep.or.kr/popup/pop_demand_2012.html','akei_gep','width=300,height=227,top=20,left=20');

}

/* popupÀ» Ãß°¡ÇÏ½Ã·Á¸é ¿©±â¿¡ ÇÏ¼¼¿ä. */
function popup_open(){
	//openPopup_0601();
	//openPopup_systemnoti();
	//openPopup_2010AEKI();
}

function setCookie(name,value){
	document.cookie=name + "=" + value;
}

function getCookie(name) {
	var Found = false
	var start, end
	var i = 0

	while(i <= document.cookie.length) {
		start = i;
		end = start + name.length;
		if(document.cookie.substring(start, end) == name) {
			Found = true;
			break;
		}
		i++;
	}

	if(Found == true) {
		start = end + 1;
		end = document.cookie.indexOf(";", start);
		if(end < start)
			end = document.cookie.length
		return document.cookie.substring(start, end)
	}
	return ""
}

window.onload = function(){
	popup_open();
}
