// JavaScript Document


function showHideSelect(select)
{
    var objSelect = document.getElementById(select);
    objSelect.style.display = (objSelect.style.display == 'block') ? 'none' : 'block';
}

function validAndHide(txt, obj, input, select)
{
    document.getElementById(input).value = txt;
    obj.parentNode.parentNode.style.display = 'none';
    document.getElementById(select).innerHTML = obj.innerHTML;
}
            
function contactForm()
{
	if(document.formulaireContact.nom.value && document.formulaireContact.courriel.value && document.formulaireContact.sujet.value && document.formulaireContact.contenuMsg.value){
		document.formulaireContact.validerForm.disabled = false;
	}else{
		document.formulaireContact.validerForm.disabled = true;
	}
}

function changeLang(langue)
{
	var currentLocation =  document.location.href;
	var page = currentLocation;
	currentLocation = currentLocation.substring( 0 , currentLocation.lastIndexOf( "/" ));
	currentLocation = currentLocation.substring( 0 , currentLocation.lastIndexOf( "/" ));
	page = page.substring(page.lastIndexOf( "/" ));
	currentLocation += '/' + langue + page;
	document.location = currentLocation;
}
