/*
 * ±â  ´É : ÄíÅ°°ªÀº ¹ÝÈ¯ÇÑ´Ù.
 * ÀÎ  ÀÚ : strName : ÄíÅ°¸í
 * ¹ÝÈ¯°ª : ÄíÅ°°¡ »ý¼ºµÇ¾î ÀÖÀ¸¸é ÀúÀåµÈ °ªÀ», ±×·¸Ä¡ ¾ÊÀ¸¸é ''
 * ÀÛ¼ºÀÏ : 2003.11.01
 * note :
 */
function getCookie(strName)
{
	var strArg = new String(strName + "=");
	var nArgLen, nCookieLen, nEnd;
	var i = 0, j;

	nArgLen    = strArg.length;
	nCookieLen = document.cookie.length;

	if( nCookieLen > 0 )
	{
		while( i < nCookieLen )
		{
			j = i + nArgLen;

			if( document.cookie.substring( i, j ) == strArg )
			{
				nEnd = document.cookie.indexOf( ";", j );

				if( nEnd == -1 )
					nEnd = document.cookie.length;

				return unescape( document.cookie.substring( j, nEnd ) );
			}

			i = document.cookie.indexOf( " ", i ) + 1;
			if( i == 0 )
				break;
		}
	}

	return "";
}

/*
 * ±â  ´É : ÄíÅ°¸¦ ¼³Á¤ÇÑ´Ù.
 * ÀÎ  ÀÚ : name : »ý¼ºÄíÅ°¸í, value : ÀúÀå°ª , expiredays : ÀúÀåÀÏ
 * ¹ÝÈ¯°ª :
 * ÀÛ¼ºÀÏ : 2003.11.01
 * note :
 */
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

/*
 * ±â  ´É : ÀÌº¥Æ®Ã¢À» ´Ý°í, Ã¼Å© À¯¹«¿¡  µû¶ó ÄíÅ°»ý¼º¿©ºÎ¸¦ °áÁ¤ÇÑ´Ù.
 * ÀÎ  ÀÚ : frm : ÇØ´çÆû
 * ¹ÝÈ¯°ª :
 * ÀÛ¼ºÀÏ : 2003.11.01
 * note :
 */
function closeWin(frm,id)
{
    if (frm.chk.checked == true) setCookie(frm.cookieName.value, "true", 1);
	$("#"+id).hide();
}


function closeWin_preview(frm,id)
{
    if (frm.chk.checked == true) setCookie(frm.cookieName.value, "true", 1);
	self.close();
}

function goto_list(url)
{
    opener.document.location.href = url;
	self.close();
}