var language = /\/(\w\w)\//;

document.observe("dom:loaded", function() {
	//once the DOM is loaded the URl is checked to find which language the page is in
	//and hilight the language in the top menu bar by using the prototype $$ call to
	//select the object by css and change its color.
	result = document.URL.match(language);
	if (result != null) {
		$$('#'+result[1]+' a')[0].style.color = "white";
	};
	$$('.home a')[0].href = "../index.html?lang=" + result[1];
	$$('.home a')[0].style.color = "#a4a4a4";
});