function selectLang(lang)
{
	window.open('/' + lang + '/index.html', '_self');
	location.href
}

/* overwriteLang */
/*window.onload = function()*/
function overwriteLang()
{
	document.getElementById("languages").innerHTML = '<form><select style="border: 1px solid #B1B5B6; width: 110px;" onchange="selectLang(this.options[this.selectedIndex].value)" id="selectlang">' +
		'<option value="de">Deutsch</option>' +
		'<option value="en">English</option>' +
		'<option value="fr">Fran&ccedil;ais</option>' +
		'<option value="es">Espa&ntilde;ol</option>' +
		'<option value="ru">Russian</option>' +
	'</select></form>';

	for(var i = 0; i < document.getElementById("selectlang").length; i++)
	{
		var url = location.pathname;
		if(url.substr(0, 4) == "/" + document.getElementById("selectlang").options[i].value + "/")
		{
			document.getElementById("selectlang").options[i].selected = true;
			break;
		}
	}
}