
/* ************************************************************* */ 
function eMail_Valide(eMail)
{
	Un_Tableau=eMail.split("@")
	if(Un_Tableau.length!=2)
	{
		return false;
	}
	Un_Tableau=Un_Tableau[1].split(".")
	if(Un_Tableau.length<2)
	{
		return false;
	}
	
	if ((Un_Tableau[Un_Tableau.length-1].length<2))
	{
		return false;
	}
	return true;
}

/* ************************************************************* */ 
	function Selectionne_Secteur(LeSecteur)
	{	
		$(document).ready(function () 
		{
				$.post("affiche_secteur.php",{SECT:LeSecteur},
        function success(data)
				{
					$("#FICHESECTEUR").html(data);
				});
		});	
	}
/* ************************************************************* */ 
	function Selectionne_Service(LeService)
	{	
		$(document).ready(function () 
		{
				$.post("affiche_service.php",{SERV:LeService},
        function success(data)
				{
					$("#FICHESERVICE").html(data);
				});
		});	
	}
/* ************************************************************* */ 
function Envoi_Message(Obj,IdContact)
{

	UneUrl="envoimessage.php?CONT="+IdContact;	
	hs.graphicsDir = 'highslide/graphics/';
	hs.showCredits = false;
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
  hs.wrapperClassName= 'no-footer draggable-header '
	hs.fadeInOut = false;
	hs.width = 550;
	hs.height = 470;
	hs.dimmingOpacity = 0.75;
	hs.htmlExpand(Obj, {src: UneUrl, objectType: 'iframe'});	
}
/* ************************************************************* */ 
function ContactValide() 
{

	Formulaire=document.FORMMESSAGE;

	if(Formulaire.NOM.value=="")
	{
		alert("Veuillez saisir votre nom.");
		return false;
	}		
	if(Formulaire.PRENOM.value=="")
	{
		alert("Veuillez saisir votre prénom.");
		return false;
	}
	if(Formulaire.EMAIL.value=="")
	{
		alert("Veuillez saisir votre eMail.");
		return false;
	}
	
	if(!(eMail_Valide(Formulaire.EMAIL.value)))
	{
		alert("Votre eMail n'est pas valide.");
		return false;
	}
	return true;
}
/* ************************************************************* */ 
function Recherche_Rapide()
{
	Formulaire=document.FORMRECHRAP;	

	if((Formulaire.TEXTERECHERCHE.value!="Rechercher dans le site")&&((Formulaire.TEXTERECHERCHE.value!="")))
	{
		Formulaire.submit();
	}
}
/* ************************************************************* */ 
function AllerPageRecherche(Indice)
{
	Formulaire=document.FORMRECHPAGE;	
	Formulaire.PAGECOURANTE.value=Indice;
	Formulaire.submit();
}
/* ************************************************************* */  
 

