function top2menuView(a) 
{ 
	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);
	
	//iframe 추가
	var top_iframe = document.getElementById("iframe_top2m"+a);
	
	if(a<10){
		ann=''+a;
	} else {
		ann=''+a;
	}
	if (a=0) { 
	} else { 
		if (top1Menu) { 
			top1Menu.getElementsByTagName("img")[0].src=context+"/ext/image/comm/menu0" + ann + "_on.gif";
			if (top2Menu) { 
				top2Menu.style.display = 'inline'; 
				
				//iframe 추가
				top_iframe.style.display = "block"; 
			}
		}
	}
}

function top2menuHide(a) 
{
	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("top1m");
	top2MenuCurr = document.getElementById("top2m");
	
	//iframe 추가
	var top_iframe = document.getElementById("iframe_top2m"+a);
	
	if(a<10){ann=''+a;} else {ann=''+a;}
	if (top1Menu) { 
		top1Menu.getElementsByTagName("img")[0].src=context+"/ext/image/comm/menu0" + ann + "_off.gif";
			if (top2Menu) {
				top2Menu.style.display = 'none';
			
				//iframe 추가
				top_iframe.style.display = "none"; 
			}
			if (top1MenuCurr) { 
				top1MenuCurr.getElementsByTagName("img")[0].src = context+"/ext/image/comm/menu01_off.gif";
			}
			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=''+i;} else {inn=''+i;}
		if (top1Menu) { 
			top1Menu.getElementsByTagName("img")[0].src=context+"/ext/image/comm/menu0" + inn + "_off.gif";
				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("top2mm");
	if (top2MenuCurrAct) { 
		top2MenuCurrActA = top2MenuCurrAct.getElementsByTagName("a")[0];
		var thisClassName = top2MenuCurrActA.className;
		(thisClassName)? top2MenuCurrActA.className= thisClassName+" on" : top2MenuCurrActA.className="on";
	}
}
initTopMenu();	//1,2차메뉴롤오버함수할당
top2menuHide();	//페이지로드시현재위치1차메뉴활성
