function noticeGetCookie(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 "";
}

function noticeSetCookie(name,value,expiredays) {
    var todayDate = new Date();
    todayDate.setDate(todayDate.getDate()+expiredays);
    if (expiredays==0)
    {
		document.cookie = name+"="+escape(value)+"; path=/;"
	}
	else
	{
		document.cookie = name+"="+escape(value)+"; path=/; expires="+todayDate.toGMTString()+";"
	}
}

var popNotice = new Array();
function noticeOpenWin(url,name,property) {
	if (noticeGetCookie(name)!="done") {
		var i = popNotice.length
		popNotice[i] = window.open(url,name,property); // ÆË¾÷À©µµ¿ìÀÇ °æ·Î¿Í Å©±â¸¦ ¼³Á¤ ÇÏ¼¼¿ä
		popNotice[i].name = name
		popNotice[i].focus();
	}
}

function noticeCloseWin(name,expire) { 
    noticeSetCookie(name,"done",expire); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
    for(i in popNotice) {
		if(popNotice[i]!=null) {
			if(popNotice[i].name==name) {
				popNotice[i].close();
				popNotice[i] = null;
			}
		}
    }
}

function noticeOpenLayer(id,name) {
	if (noticeGetCookie(name)!="done") {
		var obj = document.all[id];
		if(obj) {
			obj.style.display = "block";
		}
	}
}

function noticeCloseLayer(id,name,expire) { 
    noticeSetCookie(name,"done",expire); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½ 0 ¹Ù·Î ´Ý±â
    var obj = document.all[id];
	if(obj) {
		obj.style.display = "none";
	}
}