var full_path_init = document.location.href;
function changeVer(lang) {
	// Get the place of the start of the filename
	var start_of_filename = full_path_init.lastIndexOf("/");
	// Get the filename
	var tempFileName = full_path_init.substring(start_of_filename+1,full_path_init.length);
	// Get the location of ? in the filename
	var fileNameQuestionMarkLocation = tempFileName.indexOf("?");
	// Declare the filename
	var finalFileName;
	// Declare the FinalPath
	var finalPath;
	// Get the orginional URL
	var orgUrl = full_path_init.substring(0,start_of_filename);
	// Check the file name have ? 
	if( fileNameQuestionMarkLocation == -1 ){
		// If no ? , then copy the tempFilename
		finalFileName = tempFileName;
	}else{
		// If yes, then use substring to create the finalFileName
		finalFileName = tempFileName.substring(0,fileNameQuestionMarkLocation);
	}
	// the simplified chinese location
 	chs_path = "/schi/";
	
	
	if(lang == "t"){
		orgUrl = orgUrl.replace("/schi","/");
		finalPath = orgUrl + finalFileName;
	}else{
		finalPath = orgUrl + chs_path + finalFileName;
	}
	return finalPath;
}