function changeLanguage()
{
	var language = getCookie("LCHCLanguage");
	//alert(language);
	
	var lastdot = location.href.lastIndexOf(".");
	var indextest = location.href.substring(lastdot+1, lastdot+4);
	//alert (indextest);

	if (language == null || language == "en")
	{
		setCPullMenu("LCHCLanguage","es");
		language = "es";
		//alert("going to spanish");
		//alert(location.href.substring(0,location.href.lastIndexOf(".")) + "." + language + ".html");
		if (indextest == "org" || indextest == "com") location.replace(location.href.substring(0,lastdot+4) + "/index." + language + ".html");
		else location.replace(location.href.substring(0,location.href.lastIndexOf(".")) + "." + language + ".html");
	}
	else 
	{
		setCPullMenu("LCHCLanguage","en");
		language = "en";
		//alert("going to english");
		//alert(location.href.substring(0,location.href.lastIndexOf(".")-3) + ".html");
		if (indextest == "org" || indextest == "com") location.replace(location.href.substring(0,lastdot+4) + "/");
		else location.replace(location.href.substring(0,location.href.lastIndexOf(".")-3) + ".html");
	}
}
