/*****************************************************/
/***		프로그램명 :pop.js(매인 popup 관련 - 오늘하루만 보기 스크립트 )
/***		서브시스템 : index_nf
/***		함수설명 :
/***		관련 sp : 
/***		작성자 : 신현상
/***		작성일 : 2003.2.18
/***		수정일 : 
/***		1.  
/***		2.
/***		include 파일설명 : 
/*****************************************************/
/******************************************************
//팝업창 뛰우는 함수
//사용예 : MM_openBrWindow('파일경로','브라우저명','기타속성');	
******************************************************/

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}	
	
	
	/******************************************************
// 쿠키 컨트롤 함수
******************************************************/

function cookie_value_confirm(cookiename)
{
	var cookie_A = getCookie("nacross").split("&");
	for(var i = 0 ; i <= cookie_A.length ; i++)
	{
		if(cookie_A[i].split("=")[0] == cookiename)
		{
			return cookie_A[i].split("=")[1];
		}
	}
}	

	
function cookie_set(cookie_value)
{
	var today = new Date();
	var expire = new Date(today.getTime() + 60*60*24*1000);
	setCookie(cookie_value,"yes", expire);
}

function setCookie(name, value, expire) {
          document.cookie = name + "=" + escape(value) + ( (expire) ? "; expires=" + expire.toGMTString() : "") + ";path = /;"; 
}

function getCookie( name )
{
	var nameOfCookie = name + "=";
	var x = 0;
	var tempCookie;
	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 "";
}


