
function ChangerLangue() {
	var btLangue;
	var nouvellePage;
	
	if ( btLangue = document.getElementById("langue") ) {
		if ( location.search.length ) {
			nouvellePage = btLangue.href + location.search;
		} else {
			if ( document.URL.lastIndexOf("/") != -1 ) {
				var page = document.URL.substring(document.URL.lastIndexOf("/") + 1);
				var root = btLangue.href.substring(0, btLangue.href.lastIndexOf("/") + 1);
				
				switch (page) {
					case "contactez-moi.html":
						nouvellePage = root + "contact-me.html";
						break;
					case "contact-me.html":
						nouvellePage = root + "contactez-moi.html";
						break;
					case "curriculum-vitae.html":
						nouvellePage = root + "resume.html";
						break;
					case "resume.html":
						nouvellePage = root + "curriculum-vitae.html";
						break;
				}
			}
		}
		
		if ( nouvellePage )
			btLangue.href = nouvellePage;
	}
}





// Attache l'événement au chargement de la page
if ( window.addEventListener )
	window.addEventListener("load", ChangerLangue, false);
else if ( window.attachEvent )
	window.attachEvent("onload", ChangerLangue);
	