/************************************
function validation_formulaire

Fonction qui verifie si un seul paramètre a été choisi
***********************************/
function validation_formulaire()
{
	recherche_designation = document.formulaire_ecoplus.recherche_designation.value;
	gencode = document.formulaire_ecoplus.gencode.value;
	type_id = document.formulaire_ecoplus.type_id.value;
	
	if (recherche_designation == '' && gencode == '' && type_id == '')
	{
		window.alert('Merci de remplir au moins un paramètre de recherche');
		document.formulaire_ecoplus.type_id.focus();
		validation = false;
	}

	if (recherche_designation != '' && gencode == '' && type_id == '')
	{
		validation = true;
	}
	else if (recherche_designation == '' && gencode != '' && type_id == '')
	{
		validation = true;
	}
	else if (recherche_designation == '' && gencode == '' && type_id != '')
	{
		validation = true;
	}
	else if (validation != false)
	{
		window.alert('Merci de remplir un seul paramètre de recherche');
		document.formulaire_ecoplus.type_id.focus();
		validation = false;
	}

	return validation;

}
/**********************************/


/***********************************
function focus_on

Fonction qui retire la selection automatiquement
***********************************/
function focus_on(nom_form)
{
	if (nom_form == 'type_id')
	{
	//	document.formulaire_ecoplus.recherche_designation.value = '';
		document.formulaire_ecoplus.gencode.value = '';
	}
	if (nom_form == 'recherche_designation')
	{
	//	document.formulaire_ecoplus.type_id.value = '';
		document.formulaire_ecoplus.gencode.value = '';
	}
	if (nom_form == 'gencode')
	{
		document.formulaire_ecoplus.type_id.value = '';
		document.formulaire_ecoplus.recherche_designation.value = '';
	}
}
/**********************************/


/***********************************
function validation_menu_marques

Fonction de redirection menu déroulant marques
***********************************/
function validation_menu_marques()
{
	if (document.menumarques.menu_marques[document.menumarques.menu_marques.selectedIndex].value=="0")
	{
		alert("Vous devez choisir une destination");
		return;
	}
	else
	{
		window.document.menumarques.action = document.menumarques.menu_marques[document.menumarques.menu_marques.selectedIndex].value;
	}
}
/**********************************/