
/*if(location.href.toString().search('www0.gld.gov.hk') != -1)
{
	text_div_path = 'www0.gld.gov.hk';
}
else
{
	text_div_path = 'www.gld.gov.hk';
}

text_cv_nonsc_base_path = "http:" + "//" + text_div_path;
*/

function text_changeVer(lang) {

	text_chi_path =  "text/chi";
	text_eng_path =  "text/eng";
	text_sc_path =   "text/sc";

	text_org_path=window.location.href;
	//text_org_path_start=text_org_path.indexOf(text_div_path) + text_div_path.length;
	//text_org_path_end=text_org_path.length;
	//text_org_path=text_org_path.substring(text_org_path_start, text_org_path_end);
	
//Kit Convert 4/3/2009
/*
	if (text_org_path.indexOf(text_chi_path) != -1) {
		text_org_lang_path = text_chi_path;
	} else {
		text_org_lang_path = text_eng_path;
	}

	if (lang == 'te') {
		text_des_lang_path = "eng";
	} else {
		text_des_lang_path = "chi";
	}
	
	if (lang == 'tc') {
		text_base_path = text_cv_sc_base_path;
	} else{
		text_base_path = text_cv_nonsc_base_path;
	}
*/

	if (text_org_path.indexOf(text_chi_path) != -1) text_org_lang_path = text_chi_path;
	if (text_org_path.indexOf(text_eng_path) != -1) text_org_lang_path = text_eng_path;
	if (text_org_path.indexOf(text_sc_path) != -1) text_org_lang_path = text_sc_path;

	if (lang == 'tc') text_des_lang_path = "chi";
	if (lang == 'te') text_des_lang_path = "eng";
	if (lang == 'ts') text_des_lang_path = "sc";
	//text_base_path = text_cv_nonsc_base_path;
	
	text_org_path = text_org_path.replace(text_org_lang_path, text_des_lang_path);

	window.location.href = text_org_path;
	//window.location.href = text_base_path + text_tail ;
}
