// ÀÌ¹ÌÁö Å¬¸¯½Ã ÀÚµ¿ Á¡¼± ¾ø¾Ö±â

function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


/*********************************************************************************************************
	»õÃ¢ Áß¾ÓÀ¸·Î ¶ç¿ì±â - ÀÚ¹Ù½ºÅ©¸³Æ®·Î ¼³Á¤ÇØ¼­ ¸µÅ©


**********************************************************************************************************/

function new_win(filename,p_name,s_width,s_height,s_scrol){
	var x = screen.width;
	var y = screen.height;
	var wid = (x / 2) - (s_width / 2);
	var hei = (y / 2) - (s_height / 2);

	window.open(filename, p_name, "toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,scrollbars=" + s_scrol + ",width=" + s_width + ",height=" + s_height + ",top=" + hei + ",left=" + wid + ",scrolbar=no"); 
}


// ¿ìÆí¹øÈ£Ã£±â
function pop_zip() {
	var URL = '/board/pop_zip.asp';
	var win = new_win(URL,'','367','320','1');
}





/*********************************************************************************************************
	pngÀÌ¹ÌÁö (IE6¿ë)
**********************************************************************************************************/
function setPng24(obj) { 
		obj.width=obj.height=1; 
		obj.className=obj.className.replace(/\bpng24\b/i,''); 
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
		obj.src='';  
		return ''; 
	}




/*********************************************************************************************************
	ÀÚµ¿·Ñ¿À¹ö
**********************************************************************************************************/

function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof oldonload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            oldonload();
            func();
        }
    }
}
function overimg() {
    var imgs = document.getElementsByTagName('img');
    for (var i=0; i<imgs.length; i++) {
        if (imgs[i].className=='auto_over'){
            imgs[i].onmouseover = function(){
                var imgsrc = this.getAttribute('src');
                var imgover = imgsrc.replace('_off', '_on');
                this.setAttribute('src',imgover);
            }
            imgs[i].onmouseout = function(){
                var imgsrc = this.getAttribute('src');
                var imgover = imgsrc.replace('_on', '_off');
                this.setAttribute('src',imgover);
            }
        }
    }
}
addLoadEvent(overimg);




/*********************************************************************************************************
	·¹ÀÌ¾îº¸ÀÌ±â/¼û±â±â
**********************************************************************************************************/

function show(objID){ document.getElementById(objID).style.display=''; }
function hide(objID){ document.getElementById(objID).style.display='none'; }




/*********************************************************************************************************
	Å¾¸Þ´º ·¹ÀÌ¾î
**********************************************************************************************************/

function Gnb(num) {
	var target = "sub0" + num;
	for(var i=1; i<=7; i++)	{
		var a = "sub0" + i;
			if (document.getElementById(a) != null)
			{
				document.getElementById(a).style.display='none';
				document.getElementById('1depth0'+i).src='/images/topMenu/1depth0'+i+'_off.gif';
			}
	}
	if ( num > 0 && num <= 7) {
	document.getElementById(target).style.display='block';
	document.getElementById('1depth0'+num).src='/images/topMenu/1depth0'+num+'_on.gif';
	} return false;

}

function GnbOut(num)	{
	var target = "sub0" + num;
	for(var i=1; i<=7; i++)	{
		var a = "sub0" + i;
			if (document.getElementById(a) != null)
			{
				document.getElementById(a).style.display='none';
				document.getElementById('1depth0'+i).src='/images/topMenu/1depth0'+i+'_off.gif';
			}
		}

	if ( num >0 && num <= 7) {
	document.getElementById(target).style.display='block';
	document.getElementById('1depth0'+num).src='/images/topMenu/1depth0'+num+'_on.gif';
	} return false;

}




/*********************************************************************************************************
	Index_Board
**********************************************************************************************************/

function indexboard(sw) {
    for (i=1; i<=3; i++) {
        if (sw==i) {
            document.getElementById('board'+i).style.display='';
        } else {
            document.getElementById('board'+i).style.display='none';
        }
    }
}



/*********************************************************************************************************
	°¶·¯¸®º¸±â
**********************************************************************************************************/

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function cnjView(img) {
if (ns3up || ie4up) {
img_on = ("/Sub_about/images/" + img); 
document.cnj_img.src = img_on;
   }
}

function cnjView2(img) {
if (ns3up || ie4up) {
img_on = ("/Sub_about/images/" + img); 
document.cnj_img2.src = img_on;
   }
}

function cnjView3(img) {
if (ns3up || ie4up) {
img_on = ("/Sub_about/images/" + img); 
document.cnj_img3.src = img_on;
   }
}

function cnjView4(img) {
if (ns3up || ie4up) {
img_on = ("/Sub_about/images/" + img); 
document.cnj_img4.src = img_on;
   }
}
