
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);
	thome = document.getElementById("top1m1");
	ann = (a<10)? "0"+a : ""+a;
	if(a==0){ 
	}else{
		if (top1Menu){ top1Menu.parentNode.className="over";
		thome.parentNode.className="home";
		if (top2Menu) { top2Menu.style.display = "inline"; }
		}
		if(top1MenuCurr){ top1MenuCurr.parentNode.className="on";
		}
	}
}
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);
	thome = document.getElementById("top1m1");
	top1MenuCurr = document.getElementById("top1m"+d1n);
	top2MenuCurr = document.getElementById("top2m"+d1n);
	ann = (a<10)? "0"+a : ""+a;
	if (top1Menu) { top1Menu.parentNode.className=""	;
	  thome.parentNode.className="home";
		if(top2Menu){ 
			top2Menu.style.display = "none";
		}
		if(top1MenuCurr){ top1MenuCurr.parentNode.className="on";
		
		}
		if (top2MenuCurr) { top2MenuCurr.style.display = "inline"; }
	}
}
function top2menuHideAll()
{
	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=11;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		inn = (i<10)? "0"+i : ""+i;
		if(top1Menu){ top1Menu.parentNode.className="";
			if (top2Menu) { top2Menu.style.display = "none"; }
		}
	}
}
function initTopMenu(d1,d2) {
	d1n=d1; d2n=d2;
	d1nn = (d1n<10)? "0"+d1n : ""+d1n;
	d2nn = (d2n<10)? "0"+d2n : ""+d2n;
 	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=11;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if (top1Menu) {
			inn = (i<10)? "0"+i : ""+i;
			if(top1Menu.firstChild.tagName != "IMG"){
				top1Menu.innerHTML = top1Menu.innerHTML;
			}
			top1Menu.style.textIndent = "0";
			top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
			top1Menu.onmouseout = top2menuHide;
			if (top2Menu) {
				top2Menu.style.display = "none";
				var top2MenuLastChild = top2Menu.lastChild;
				if(top2MenuLastChild){
					while(top2MenuLastChild.nodeName!="LI") top2MenuLastChild = top2MenuLastChild.previousSibling;
					top2MenuLastChild.className = "last";
				}
				var top2MenuFirstChild = top2Menu.firstChild;
				if(top2MenuFirstChild){
					while(top2MenuFirstChild.nodeName!="LI") top2MenuFirstChild = top2MenuFirstChild.nextSibling;
					top2MenuFirstChild.className = "first";
				}
				top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
				top2Menu.onmouseout = top2Menu.onblur = top2menuHide;
				top2MenuAs = top2Menu.getElementsByTagName("a");
				top2MenuFt = document.getElementById("top2m"+i+"m1");
				if(top2MenuAs){
					for(j=0;j<top2MenuAs.length;j++){
						top2MenuAs[j].innerHTML = '<span>'+top2MenuAs[j].innerHTML+'</span>';
					}
				}
				top2MenuFt.getElementsByTagName("a")[0].firstChild.className="ft";
			}
		}
	}
	
	top2MenuCurrAct = document.getElementById("top2m"+d1+"m"+d2);
	if (top2MenuCurrAct) { top2MenuCurrAct.getElementsByTagName("a")[0].className="on"; }
	top2menuHide(d1);
}
