function changeLanguage(switchLang){ //chinese and english switch
	var currentPath=location.href.toString();
	//var slashs=currentPath.split("/");
	var switchCn='/';
	var switchPt='/pt/';
	var lan="";
	if(currentPath.indexOf("pt")!=-1) lan="pt";
	else lan="cn";
	
	var reg=/(\/)([^\/]*)$/;
	
	switch (switchLang){
		case 'cn':
		if(lan="cn") currentPath=currentPath.replace(switchPt, switchCn);
		break;
		case 'pt':
		if(lan="pt") currentPath=currentPath.replace(reg,"$1pt/$2");
		break;
		default:
	}
	document.location=currentPath;
}

