function trouveLang() { // get the actual language

	// get the former content and menu
	oldHref = location.href;

	// get the former language
	if (oldHref.search("/de/") != -1) {
		var oldLang = "de";
	} else {
		if (oldHref.search("/en/") != -1) {
			var oldLang = "en";
    } else {
			 var oldLang = "fr";
		}
	}

  return oldLang;
  
}


function langSwitch(newLang) {   // links to the same content document in another language

  document.getElementById("link_"+newLang).blur();

	// get the former content and menu
	oldHref = location.href;

	// get the former language
	if (oldHref.search("/de/") != -1) {
		var oldLang = "de";
	} else {
		if (oldHref.search("/en/") != -1) {
			var oldLang = "en";
    } else {
			 var oldLang = "fr";
		}
	}

  //alert (oldLang);

	// check if old and new languages are really different...
	if (newLang != oldLang) {
  	// links to the new language
  	location.href = oldHref.replace('/'+oldLang+'/', '/'+newLang+'/') ;
	}
	
  return;
}

