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 top2menuView(a) //2차메뉴보기
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (a=0) { //메인은2차메뉴활성화안함
	} else {
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src="/kor/image/intro/menu" + ann + "_on.png";
//			top1Menu.style.textDecoration="underline"; //텍스트일때
//			top1Menu.style.fontWeight="bold"; //텍스트일때
//			top1Menu.style.letterSpacing="-1px"; //텍스트일때
			if (top2Menu) { top2Menu.style.display = 'inline'; }
		}
	}
}
function top2menuHide(a) //2차메뉴감추기
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	top1MenuCurr = document.getElementById("top1m0");
	top2MenuCurr = document.getElementById("top2m0");
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (top1Menu) {
		top1Menu.getElementsByTagName("img")[0].src="/kor/image/intro/menu" + ann + ".png";
//		top1Menu.style.textDecoration="none"; //텍스트일때
//		top1Menu.style.fontWeight="normal"; //텍스트일때
//		top1Menu.style.letterSpacing="0"; //텍스트일때
		if (top2Menu) { top2Menu.style.display = 'none'; }
		if (top1MenuCurr) {
			top1MenuCurr.getElementsByTagName("img")[0].src = "/kor/image/intro/top1m00on.png";
//			top1MenuCurr.style.textDecoration="underline"; //텍스트일때
//			top1MenuCurr.style.fontWeight="bold"; //텍스트일때
//			top1MenuCurr.style.letterSpacing="-1px"; //텍스트일때
		}
		if (top2MenuCurr) { top2MenuCurr.style.display = 'inline'; }
	}
}
function top2menuHideAll() //2차메뉴모두감추기
{
	
	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if(i<10){inn='0'+i;} else {inn=''+i;}
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src="/kor/image/intro/menu" + inn + ".png";
//			top1Menu.style.textDecoration="none"; //텍스트일때
//			top1Menu.style.fontWeight="normal"; //텍스트일때
//			top1Menu.style.letterSpacing="0"; //텍스트일때
			if (top2Menu) { top2Menu.style.display = 'none'; }
		}
	}
}
function initTopMenu() { 

 	top1menuEl = document.getElementById("top1menu").childNodes;
		for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if (top1Menu) {
			top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
			top1Menu.onmouseout = top2menuHide;
			if (top2Menu) { 
				top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
				top2Menu.onmouseout = top2menuHide;
			}
		}
	}
	top2MenuCurrAct = document.getElementById("top2m0m0");
	if (top2MenuCurrAct) {
		top2MenuCurrActA = top2MenuCurrAct.getElementsByTagName("a")[0];
		var thisClassName = top2MenuCurrActA.className;
		(thisClassName)? top2MenuCurrActA.className= thisClassName+" on" : top2MenuCurrActA.className="on";
	}
}

function getObject(objectId){ // checkW3C DOM, then MSIE 4, then NN 4.
	if(document.getElementById && document.getElementById(objectId)){ return document.getElementById(objectId);	}
	else if (document.all && document.all(objectId)){ return document.all(objectId); }
	else if (document.layers && document.layers[objectId]){	return document.layers[objectId]; }
	else{ return false; }
}

// 탭메뉴 공통적으로 사용
//ex) tabOn(1,1);
moreLink = new Array(6);
moreClick = new Array(6);
for (i=0;i<6;i++) {
	moreLink[i] = new Array(6);
	moreClick[i] = new Array(6);
}
moreLink[0][0]="#n"; moreClick[0][0]=""; //
moreLink[0][1]="#n"; moreClick[0][1]=""; //
moreLink[0][2]="#n"; moreClick[0][2]=""; //
moreLink[1][0]="#n"; moreClick[1][0]=""; //
moreLink[1][1]="#n"; moreClick[1][1]=""; //
moreLink[1][2]="#n"; moreClick[1][2]=""; //
moreLink[1][3]="#n"; moreClick[1][3]=""; //

function tabOn(tabid,a) {
	for (i=1;i<=10;i++) {
		if(i<10){inn="0"+i;} else {inn=""+i;}
		tabMenu = document.getElementById("tab"+tabid+"m"+i);
		tabContent = document.getElementById("tab"+tabid+"c"+i);
		if (tabMenu) { //객체가존재하면
			if (tabMenu.tagName=="IMG") { tabMenu.src="../image/main/"+"tab"+tabid+"m"+inn+".gif"; } //이미지일때
			if (tabMenu.tagName=="A") { //앵커일때
				//tabMenu.style.background="transparent url(../lms_img/main/tab"+tabid+"mbg.gif) no-repeat";
				//tabMenu.style.padding="1px 0 0 0";
				//tabMenu.style.fontWeight="normal";
				}
		}
		if (tabContent) { tabContent.style.display="none"; }
	}
	if(a<10){ann="0"+a;} else {ann=""+a;}
	tabMenu = document.getElementById("tab"+tabid+"m"+a);
	tabContent = document.getElementById("tab"+tabid+"c"+a);
//	alert(tabMenu.tagName);
	if (tabMenu) { //객체가존재하면
		if (tabMenu.tagName=="IMG") { tabMenu.src="../image/main/"+"tab"+tabid+"m"+ann+"on.gif"; } //이미지일때
		if (tabMenu.tagName=="A") { //앵커일때
			//tabMenu.style.background="transparent url(../lms_img/main/tab"+tabid+"mbgon.gif) no-repeat";
			//tabMenu.style.padding="2px 0 0 0";
			//tabMenu.style.fontWeight="bold";
			}
	}
	if (tabContent) { tabContent.style.display="block"; }
	tabMore = document.getElementById("tab"+tabid+"more");
	if (tabMore) { 
		tabMore.href = moreLink[tabid-1][a-1];
		tabMore.onclick = moreClick[tabid-1][a-1];
	}
}



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


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


