function valider(FormFiche)
{
	if(window.document.getElementById('uai').selectedIndex == 0 || window.document.getElementById('uai').value == "vide")
	{
	alert('Le champ ETABLISSEMENT est obligatoire. Merci.'); 
	window.document.getElementById('uai').focus();
	return(false);
	}
	if(window.document.getElementById('theme').selectedIndex == 0 || window.document.getElementById('theme').value == "vide")
	{
	alert('Le champ ACTION est obligatoire. Merci.'); 
	window.document.getElementById('theme').focus();
	return(false);
	}
	/*if (document.getElementById('theme').value == 15 || document.getElementById('theme').value == 22 || document.getElementById('theme').value == 30 || document.getElementById('theme').value == 31 || document.getElementById('theme').value == 32)
	{
		if (document.getElementById('assocok').selectedIndex == 0 || document.getElementById('assocok').value == "vide")
		{
		alert('Pour les actions éducatives, vous devez préciser l\'association concernée. Merci.'); 
		return(false);
		}
	}*/
	if(window.document.getElementById('dateinterv').value != "")
	{
	var ladate = (window.document.getElementById('dateinterv').value).split("/");
		
		if ((ladate.length != 3) || isNaN(parseInt(ladate[0])) || isNaN(parseInt(ladate[1])) || isNaN(parseInt(ladate[2])))
		{
		alert('Le champ DATE DE L\'ACTION ne contient pas une date correctement écrite. Merci.'); 
		window.document.getElementById('dateinterv').focus();
		return(false);
		}
	}
	else
	{
	alert('Le champ DATE DE L\'ACTION est obligatoire. Merci.'); 
	window.document.getElementById('dateinterv').focus();
	return(false);
	}
	if(window.document.getElementById('commune').value == "")
	{
	alert('Le champ COMMUNE DE DESTINATION est obligatoire. Merci.'); 
	window.document.getElementById('commune').focus();
	return(false);
	}
	if(window.document.getElementById('nbeleves').value == "")
	{
	alert('Le champ NOMBRE D\'ELEVES est obligatoire. Merci.'); 
	window.document.getElementById('nbeleves').focus();
	return(false);
	}
	if(window.document.getElementById('cars').value == "")
	{
	alert('Le champ NOMBRE DE CARS est obligatoire. Merci.'); 
	window.document.getElementById('cars').focus();
	return(false);
	}
	if(window.document.getElementById('cout').value == "")
	{
	alert('Le champ COUT est obligatoire. Merci.'); 
	FormFiche.cout.focus();
	return(false);
	}
	if (window.document.getElementById('theme').value < 20)
	{
		if (window.document.getElementById('sixieme').checked == false && window.document.getElementById('cinquieme').checked == false && window.document.getElementById('quatrieme').checked == false && window.document.getElementById('troisieme').checked == false)
		{
		alert('Veuillez sélectionner au moins un NIVEAU concerné par cette action. Merci.'); 
		return(false);
		}
	}	
}
function codeTouche(evenement)
{
        for (prop in evenement)
        {
                if(prop == 'which') return(evenement.which);
        }
        return(evenement.keyCode);
}

function scanTouche(evenement)
{
        var reCarSpeciaux = /[\x00\x08\x0D]/;
        var reCarValides = /\d/;

        var codeDecimal  = codeTouche(evenement);
        var car = String.fromCharCode(codeDecimal);
        var autorisation = reCarValides.test(car) || reCarSpeciaux.test(car);

        if(autorisation)
		{
		return autorisation;
		}
		else
		{
		alert('Ce champ ne peut contenir que des chiffres. Merci.');
		return(false);
		}
}