// JavaScript Document




//menu

function fold(id){
	if(document.getElementById("fold_"+id).style.display!="none"){
		document.getElementById("fold_"+id).style.display="none";
		document.getElementById("foldBtn_"+id).innerHTML="<img src=\"../images/aboutus/fold.gif\" alt=\"\" align=\"absmiddle\"/>";
	} else {
		document.getElementById("fold_"+id).style.display="block";
		document.getElementById("foldBtn_"+id).innerHTML="<img src=\"../images/aboutus/unfold.gif\" alt=\"\" align=\"absmiddle\"/>";
	}
}

function ab_active(obj){
	obj.style.cursor="pointer";
	obj.className="menu_active";
}

function ab_activeNum(num){
	document.getElementById("list_"+num).className="menu_active";
}

function ab_init(obj,id){
	if(tempNum!=id){
	obj.className="menu_init";
	}
}

//global_network
var gn_temp=1;
function gnChange(obj,id){
	if(obj!='none'){
	obj.style.cursor="pointer";
	}
	document.getElementById("gnmenu_"+gn_temp).className="gb_bout";
	gn_temp=id;
	document.getElementById("gnmenu_"+gn_temp).className="gb_bover";
	document.getElementById("gn_content").innerHTML=document.getElementById("gn_c"+gn_temp).innerHTML;
}



//agent program
var gl_temp=1;
function glChange(title,obj,id){
	obj.style.cursor="pointer";
	document.getElementById(title+"menu_"+gl_temp).className=title+"_bout";
	gl_temp=id;
	document.getElementById(title+"menu_"+gl_temp).className=title+"_bover";
	document.getElementById(title+"_content").innerHTML=document.getElementById(title+"_c"+gl_temp).innerHTML;
}

var menuArr=["overview.php","history.php","management_team.php","business_scope.php","global_network.php","partnership.php","agent_program.php","tradeshow_cooperation.php","link_banner_exchange.php","searchbox.php","corporate_activity.php","media_report.php","byemail.php"];
var add = top.location;
add = add.toString();	
var tempNum=0;
var menuName = add.substring(add.indexOf("aboutus/")+8,add.length); 
menuName=menuName.toLowerCase();
for(var n=0;n<menuArr.length;n++){
			if(menuName==menuArr[n]){
				tempNum=n+1;
				break;
			} else {
			}
}
if(tempNum==2 || tempNum==3){
			tempNum=1;
			ab_activeNum(tempNum);
} else if(tempNum>=7 && tempNum<=10){
			tempNum=4;
			ab_activeNum(tempNum);
} else{
			if(tempNum>=3 && tempNum<=6){
				tempNum-=2;
			} else if(tempNum>=11){
				tempNum-=6;
}
			ab_activeNum(tempNum);
}


