/* ¼¼ÆÃÀúÀå */
function set_cookieVal( set_name , val , expires_time )
{
	if( expires_time == null ) expires_time = 30;
	
	var when = new Date();
	when.setDate(when.getDate()+expires_time);
	var date = when.toGMTString();
	
	document.cookie = set_name + "=" + val + ";path=/;expires="+date;
}



//ÀÎµ¦½º¿¡¼­ Ã¼Å©ÇÏ´Â ºÎºÐ
function get_cookieVal( set_id )
{
	cookies = document.cookie+";";
	if((pos = cookies.indexOf( set_id + "=" ))== -1) return false;
	else {
		spos = cookies.indexOf( "=" , pos );
		epos = cookies.indexOf( ";" , spos );
		return ( cookies.substring( spos+1 , epos ) )
	}
}




/*ÆË¾÷À» ÀÐ¾úÀ½À» Ã¼Å©ÇÑ´Ù.*/
function set_isreaded( keyId  , day )
{
	if( day == null ) day = 7;
	set_cookieVal( keyId, 1, day );
	window.self.close();
}

/*ÆË¾÷À» ÀÐ¾ú´ÂÁö Ã¼Å©ÇÑ´Ù.*/
function get_isreaded( keyId )
{
	return get_cookieVal( keyId );
}

/*ÆË¾÷À» ÀÐ¾ú´ÂÁö Ã¼Å©ÈÄ ¹Ù·Î ÆË¾÷À» ¶Ù¿î´Ù.*/
function checked_pop( keyId, wiUrl, szWidth, szHeight )
{
	if(!get_isreaded(keyId))
	{
		open_eventwin(wiUrl, "" , szWidth, szHeight );
	}
}

/*ÆË¾÷¿ë ÆË¾÷Ã¢ ¿­±â*/
function open_eventwin( wiUrl, winId, szWidth, szHeight )
{
	if(winId == null) winId = "eventWin";
	window.open( wiUrl, winId, "scrollbars=no,location=no, resizable=no,width="+(szWidth)+",height="+szHeight );
}
