var Tran_text = function (text) {
	//traditional_text和simplified_text变量共用traditionalchinese.js
	var simplized = function (text) {
		if ('string' !== typeof(text)) {
			return '';
		}
		if ('' === text) {
			return '';
		}
		var result = '';
		for(var i = 0; i < text.length; i++) {
			if (text.charCodeAt(i) > 10000 && traditional_text.indexOf(text.charAt(i)) !== -1) {
				result += simplified_text.charAt(traditional_text.indexOf(text.charAt(i)));
			} else {
				result += text.charAt(i);
			}
		}
		return result;
	}
	var traditionalized = function (text) {
		
		if ('string' !== typeof(text)) {
			return '';
		}
		if ('' === text) {
			return '';
		}
		var result = '';
		for(var i = 0; i < text.length; i++) {
			if (text.charCodeAt(i) > 10000 && simplified_text.indexOf(text.charAt(i)) !== -1) {
				result += traditional_text.charAt(simplified_text.indexOf(text.charAt(i)));
	  		} else {
	  			result += text.charAt(i);
	  		}
		}
		return result;
	}
	return traditionalized(text);
}
var cookie_name = "default_language_code";
	var getLangCookie = function () {
		var search = cookie_name + "=";
		if(document.cookie.length > 0) {
			var offset = document.cookie.indexOf(search);
			if(offset !== -1) {
				offset += search.length;
				var end = document.cookie.indexOf(";", offset);
				if (end === -1) {
					end = document.cookie.length;
				}
				return unescape(document.cookie.substring(offset, end));
			} else {
			 	return "";
			}
		} else {
			return "";
		}
	}

