var y1 = 0;   // change the # on the left to adjuct the Y co-ordinate
(document.getElementById) ? dom = true : dom = false;

function hideIt() {
	if (dom) {document.getElementById("layer1").style.visibility='hidden';}
}

function showIt() {
	if (dom) {document.getElementById("layer1").style.visibility='visible';}
}

function hideIt2() {
	if (dom) {document.getElementById("layer2").style.visibility='hidden';}
}

function showIt2() {
	if (dom) {document.getElementById("layer2").style.visibility='visible';}
}

function placeIt() {
	if (dom && !document.all)
	{
		document.getElementById("layer2").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px";
	}
	if (document.all)
	{
		document.all["layer2"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px";
	}

	window.setTimeout("placeIt()", 10);
}

// ÄíÅ°°¡ ÀÖ³ª Ã£½À´Ï´Ù
function getCookie( 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 setCookie( name, value, expiredays ) 
{ 
        var todayDate = new Date(); 
        todayDate.setDate( todayDate.getDate() + expiredays ); 
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
        } 

// Ã¼Å©ÈÄ ´Ý±â¹öÆ°À» ´­·¶À»¶§ ÄíÅ°¸¦ ¸¸µé°í Ã¢À» ´Ý½À´Ï´Ù

function closeWin() 
{ 
        if ( document.pop.Notice.checked ) 
        setCookie( "Notice", "done" , 1);  // ¿À¸¥ÂÊ ¼ýÀÚ´Â ÄíÅ°¸¦ À¯ÁöÇÒ ±â°£À» ¼³Á¤ÇÕ´Ï´Ù
        hideIt(); 
} 

function closeWin2() 
{ 
        if ( document.pop2.Notice.checked ) 
        setCookie( "Notice2", "done2" , 1);  // ¿À¸¥ÂÊ ¼ýÀÚ´Â ÄíÅ°¸¦ À¯ÁöÇÒ ±â°£À» ¼³Á¤ÇÕ´Ï´Ù
        hideIt2(); 
} 

