var Language = {
	getLanguage : function () {
		var my_path = window.location.href;
		if (my_path.indexOf('/en/') > 0) { return("en"); }
		if (my_path.indexOf('/fr/') > 0) { return("fr"); }
		if (my_path.indexOf('/it/') > 0) { return("it"); }
		if (my_path.indexOf('/de/') > 0) { return("de"); }
	},
	
	setLanguage : function (newlang) {
		var url = document.location.pathname;
		var new_url = url.replace('/'+this.getLanguage(window.location.href)+'/', '/'+newlang+'/');
		var new_url = new_url.replace('\\'+this.getLanguage(window.location.href)+'\\', '\\'+newlang+'\\');
		document.location.href = new_url;
	}
};
