/*** Start - Added for Offline SC ***/

// Language directory
var chi_path= "/chi/";
var eng_path= "/eng/";

function switchLang(lang) {
 	var tmppath = location.href;
// 	tmppath = tmppath.replace ("#", "");
	
	if (isChi()) {
		location.href = tmppath.replace(chi_path, "/" + lang + "/");
	}

	if (isEng()) {
		location.href = tmppath.replace(eng_path, "/" + lang + "/");
	}

}

function isEng() {
	return (location.href.toString().indexOf(eng_path) != -1) ? true : false;
}

function isChi() {
	return (location.href.toString().indexOf(chi_path) != -1) ? true : false;
}

/*** End - Added for Offline SC ***/
 
