//affiche un élément
function affiche(index)
{
			document.getElementById("menu"+index).className='liste_menua';
			document.getElementById("lien"+index).setAttribute("onclick","cache("+index+")");
			document.getElementById("lien"+index).onclick= function(){cache(index);}
}
function cache(index)
{
			document.getElementById("menu"+index).className='masquer';
			document.getElementById("lien"+index).setAttribute("onclick","affiche("+index+")");
			document.getElementById("lien"+index).onclick= function(){affiche(index);}
}

function affiche2(index)
{
			document.getElementById(index).className='visible';
}
function cache2(index)
{
			document.getElementById(index).className='masquer';
}


var var_sujet=" ";


var tab0 = new Array();

tab0[0]="BAP7";
tab0[1]="AW4C";
tab0[2]="Y3CT";
tab0[3]="LAD2";
tab0[4]="8MRJ";
tab0[5]="APM9";
tab0[6]="LGP6";
tab0[7]="X5PM";

var ch=Math.round(Math.random()*7);
var gif="<img src=\"captcha/"+ch+".gif\" alt=\"captcha\">";
var valcaptcha="<input type=\"hidden\" name=\"valeur\" id=\"valeur\" value=\""+tab0[ch]+"\" class=\"champ\">";

function testchamps()
{
 if ((document.contact_form.email.value.length==0)||((document.contact_form.email.value.indexOf("@")==-1)||(document.contact_form.email.value.indexOf(".",document.contact_form.email.value.indexOf("@"))==-1)||(document.contact_form.email.value.indexOf(".",document.contact_form.email.value.indexOf("@"))==document.contact_form.email.value.indexOf("@")+1)||(document.contact_form.email.value.lastIndexOf(".")+1==document.contact_form.email.value.length)||(document.contact_form.email.value.indexOf("..") !=-1)))
{
 alert("L adresse email nest pas valide");
 return false; 
}
else if (document.contact_form.nom.value.length==0)
{
alert ("Veuillez nous indiquer votre nom et prénom.");
return false;
}

else if ((document.contact_form.message.value.length==0))
	{

     alert("Veuillez remplir le champ Message.");
     return false; 

	}
else if ((document.contact_form.captcha.value!=document.contact_form.valeur.value))
{
	alert("Le code tapé ne correspond pas à celui affiché.");
     return false; 
}
else 
 {
 return true;
 }

}
