// big5togb is use of expired, not recommended to use.
function big5togb()
{	
	hant2hans();
}

// big5togb is use of expired, not recommended to use.
function gbtobig5()
{
	hans2hant();
}

function hans2hant()
{
	var expire = new Date ();
	expire.setTime(expire.getTime() + 365 * 86400);
	document.cookie = "_us_locale=zh_Hant;path=/;expires=" + expire.toGMTString();
	
	// TODO: make some statistics, it's just a plan.
	
	// right now url rule.
	if(/\.com\/{1,2}gb/i.test(window.location.href))
		window.location.href = window.location.href.replace(".com/gb", ".com/bg");
	
	// ready for future
	if(/\.com\/{1,2}zh_Hans/i.test(window.location.href))
		window.location.href=window.location.href.replace('.com/zh_Hans', '.com/zh_Hant');
}

function hant2hans()
{
	var expire = new Date ();
	expire.setTime(expire.getTime() + 365 * 86400);
	document.cookie = "_us_locale=zh_Hans;path=/;expires=" + expire.toGMTString();

	// TODO: make some statistics, it's just a plan.
	
	// right now url rule.
	if(/\.com\/{1,2}bg/i.test(window.location.href))
		window.location.href = window.location.href.replace(".com/bg", ".com/gb");
	
	// ready for future
	if(/\.com\/{1,2}zh_Hant/i.test(window.location.href))
		window.location.href=window.location.href.replace('.com/zh_Hant', '.com/zh_Hans');
}
 function hans2hant_ext()
{
	var expire = new Date ();
	expire.setTime(expire.getTime() + 365 * 86400);
	document.cookie = "_us_locale=zh_Hant;path=/;expires=" + expire.toGMTString();
	location.reload();
}
function hant2hans_ext()
{
	var expire = new Date ();
	expire.setTime(expire.getTime() + 365 * 86400);
	document.cookie = "_us_locale=zh_Hans;path=/;expires=" + expire.toGMTString();
	location.reload();
}
 function han2en_ext()
 {
	var expire = new Date ();
	expire.setTime(expire.getTime() + 365 * 86400);
	document.cookie = "_us_locale=en;path=/;expires=" + expire.toGMTString();
	location.reload();
 }

 function han2en()
 {
 }

