function getCookiePopUp(Name) {
   var search = Name + "="
   if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search)
      if (offset != -1) {
         offset += search.length
         end = document.cookie.indexOf(";", offset)
         if (end == -1)
           end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      }
   }
}

/**
 * 부모창을 이동시키고 자신은 닫는다
 * @author khanguk
 * @version	2005. 04. 22
 */
function goUrl(url, cls, obj) {
	var win = null;

	if(obj==null || obj=='undefined') {
		win = window.opener;
	} else {
		win = obj;
	}

	win.location.href = url;
	if("N" != cls) this.close();
}

/**
 * 새로운 팝업창을 띄운다.
 * @author khanguk
 * @version	2005. 04. 22
 */
function openUrl(url,name,opt,cls, pwin) {
	var win = null;
	win = window.open("",name,opt);
	if(win!=null) {
		win.location = url;
		win.focus();
	}

	if(pwin==null || pwin=='undefined') {
	} else {
		win.opener = pwin.opener;
	}

	if("N"!=cls) this.close();
}

/**
 * 새로운 팝업창을 띄운다.
 * @author khanguk
 * @version	2005. 04. 22
 */
function openPopUp(url,name,opt,cls) {
	var win = null;
	win = window.open("",name,opt);
	if(win!=null) {
		win.location = url;
		win.focus();
	}
	if("Y"==cls) this.close();
}

/**
 * 오늘하루 팝업을 열지 않음.(1번째 팝업창에 적용)
 * @author khanguk
 * @version	2005. 04. 22
 */
function doNotOpen() {
	window.location="/client/cPopup/popup_set.html";
}

/**
 * 오늘하루 팝업을 열지 않음.(2번째 팝업창에 적용)
 * @author khanguk
 * @version	2005. 04. 22
 */
function doNotOpen2() {
	window.location="/client/cPopup/popup_set2.html";
}

/**
 * 오늘하루 팝업을 열지 않음.(3번째 팝업창에 적용)
 * @author khanguk
 * @version	2005. 04. 22
 */
function doNotOpen3() {
	window.location="/client/cPopup/popup_set3.html";
}
function closeWin()
{
        if ( document.pop.Notice.checked )
			setCookie( "open", "done" , 1);  // 오른쪽 숫자는 쿠키를 유지할 기간을 설정합니다
        self.close();
}


