// JavaScript Document

function envoyer_recherche()
	{
	document.frm_recherche.submit();	
	}
	
function changer_image(id,img)	
	{
		var the_img=document.getElementById(id);
		
		the_img.src="photos/"+img;
	}
	
function cacher(id)
	{
	var the_div=document.getElementById(id);;
	the_div.style.display='none';
	}
	
function verif_contact()
	{
	var frm=document.frm_contact;
	var bool="";
	var verif 	= /^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,3}$/

	if (frm.nom.value=="")
		{
		bool+="- Veuillez saisir votre nom.\n";	
		}

	if (frm.prenom.value=="")
		{
		bool+="- Veuillez saisir votre prenom.\n";	
		}

	if (verif.exec(frm.email.value) == null)
		{
			bool+="- Veuillez saisir une adresse e-mail valide.\n";
		}

	if (frm.message.value=="")
		{
		bool+="- Veuillez saisir votre message.\n";	
		}

	if (bool!="")
		{
		alert(bool);
		
		return false;
		}
	}