// Language directoryvar chi_path= "/chi/"var eng_path= "/eng/"var sim_path= "/sim/"/*Check if the simplified Chinese version, the update the alt tag value by calling the button.js*/if (location.href.toString().search('/sim/') != -1) {	atgb = true;} else {	atgb = false;}function chglang(lang){	org_path=window.location.href;	des_path="";	if (isSim()) {		if (lang == 'tc') {			des_path = org_path.replace(sim_path,chi_path);		}			if (lang == 'en') {			des_path = org_path.replace(sim_path,eng_path);		}		}	if (isChi()) {		if (lang == 'sc') {			des_path = org_path.replace(chi_path,sim_path);		}			if (lang == 'en') {			des_path = org_path.replace(chi_path,eng_path);		}		}	if (isEng()) {		if (lang == 'tc') {			des_path = org_path.replace(eng_path,chi_path);		}			if (lang == 'sc') {			des_path = org_path.replace(eng_path,sim_path);		}		}	window.location.href = des_path;}function isEng() {	return (location.href.toString().indexOf(eng_path) != -1) ? true : false;}function isChi() {	return (location.href.toString().indexOf(chi_path) != -1) ? true : false;}function isSim() {	return (location.href.toString().indexOf(sim_path) != -1) ? true : false;}function displaytcsc(){	if (atgb){		document.write("<a href=\"javascript:chglang('tc')\">");		document.write("<img name=\"Image36\" border=\"0\" src=\"../sim/images/chinbutton.jpg\" alt=\"Traditional Chinese\"></a>");		}else{		document.write("<a href=\"javascript:chglang('sc')\">");		document.write("<img name=\"Image36\" border=\"0\" src=\"../chi/images/simbutton.jpg\" alt=\"Simplified Chinese\"></a>");	}}
