function language(lge) {

	// specify the root of your website
	// if for example the url is http://www.public.web.cern.ch/public.web.cern.ch/ the root of your website is public.web.cern.ch
	// enter 'test' in the variable 'root' below.
	
	var lge;                                // the language passed to the function, corresponding to the folder name (fr, en)
	var root = 'co%2Dwebdesign/%5FCERNTemplateWebsite';               // the root of your website.  write %2D for "-" and %5F for "_"
	
	var url = window.location.pathname;     // the whole url
	
	
	var root_position = url.indexOf(root);  // the position at which the root of the website occurs
	
	var url_root = url.substring(0,root_position);  // the url until the root of the website
	
	// the rest of the url, taking into account the root of the website + 4 characters (because of /en/)
	var url_rest = url.substring(root_position + root.length + 4, url.length);
	
	
	// the new url
	var newurl = url_root + root + '/' + lge + '/' + url_rest;
	
	
	// load the new url
	this.location.href = newurl;

}

