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 "";
}
 
// ÄíÅ°¸¦ ¸¸µì´Ï´Ù. ¾Æ·¡ closePopLayer() ÇÔ¼ö¿¡¼­ È£ÃâµË´Ï´Ù
function setCookie( name, value, expiredays ) 
{ 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';' 
}

function openPopLayer(value) {
	document.all[value].style.display = '';

}
 
// Ã¼Å©ÈÄ ´Ý±â¹öÆ°À» ´­·¶À»¶§ ÄíÅ°¸¦ ¸¸µé°í Ã¢À» ´Ý½À´Ï´Ù
function closePopLayer(vlu) 
{ 
	setCookie(vlu, 'done' , 1);  // ¿À¸¥ÂÊ ¼ýÀÚ´Â ÄíÅ°¸¦ À¯ÁöÇÒ ±â°£À» ¼³Á¤ÇÕ´Ï´Ù
	document.all.layer1.style.display = 'none';
}
function closePopLayer2(vlu) 
{ 
	document.all.layer1.style.display = 'none'; 
} 

function new_window(url) {
	window.open( url, 'fullscreen','scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no,width='+screen.width+',height='+screen.height+',left=0,top=0');
}

function changeImage(img) {
 img.src = img.src.replace(".png", "_on.png");
}
function changeImage2(img) {
 img.src = img.src.replace("_on.png", ".png");
}

function changeImage3(img) {
 img.src = img.src.replace(".jpg", "_on.jpg");
}
function changeImage4(img) {
 img.src = img.src.replace("_on.jpg", ".jpg");
}

function chimg1(img) {
 img.src = img.src.replace("_nor.gif", "_ovr.gif");
}
function chimg2(img) {
 img.src = img.src.replace("_ovr.gif", "_nor.gif");
}

function popWin(url,name,width,height){
	window.open(url,name,'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width='+width+',height='+height);
}

function openwindow(opage, x, y) {
	farwindow = window.open('','Links','width='+x+', height='+y+', toolbar=0, scrollbars=0, resizable=no');
	if (farwindow != null) {
		if (farwindow.opener == null) {
		farwindow.opener = self;
	}
	farwindow.location.href = opage;
	}
}
