function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function show_menu(label, id, total, ancre)
{
    if(document.all)
    {
        var objPuce, objLiens;
        for(var i = 1; i <= total; ++i)
        {
            objPuce = eval('document.all.'+label+'puce'+i);
            objLiens = eval('document.all.'+label+'liens'+i);
            if(i == id)
            {
                if(objPuce.src.search('images/croix0.gif') != -1)
                {
                    objLiens.className = 'hid';
                    objPuce.src = 'images/croix1.gif';
                }
                else if(objPuce.src.search('images/croix1.gif') != -1)
                {
                    objLiens.className = 'vis';
                    objPuce.src = 'images/croix0.gif';

                }
            }
            else
            {
                objLiens.className = 'hid';
                objPuce.src = 'images/croix1.gif';
            }
        }
        if(ancre == 1)
        {
            objPuce = eval('document.all.'+label+'puce'+id);
            objPuce.scrollIntoView(true);
        }
    }
    else if(document.getElementById)
    {
        var objPuce, objLiens;
        for(var i = 1; i <= total; ++i)
        {
            objPuce = document.getElementById(label+'puce'+i);
            objLiens = document.getElementById(label+'liens'+i);
            if(i == id)
            {
                if(objPuce.src.search('images/croix0.gif') != -1)
                {
                    objLiens.className = 'hid';
                    objPuce.src = 'images/croix1.gif';
                }
                else if(objPuce.src.search('images/croix1.gif') != -1)
                {
                    objLiens.className = 'vis';
                    objPuce.src = 'images/croix0.gif';
                }
            }
            else
            {
                objLiens.className = 'hid';
                objPuce.src = 'images/croix1.gif';
            }
        }
        if(ancre == 1)
        {
            objPuce = document.getElementById(label+'puce'+id);
            objPuce.scrollIntoView(true);
        }
    }
}


function controle_form()
	{
	 	var reg      = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}[.][a-zA-Z0-9]{2,4}$/
		var reg2     = /[.@]{2,}/
		var controle = /^([A-Za-z0-9,\- ])+$/;
		var ctrlnom  = /^([A-Za-z0-9,\-'_\. éèêëàâôöîïûüçù])+$/;
		var oForm    = document.ContactForm;
		var couleur  = "FDB9AB";
		valid=true;

	    if (valid)
		if(oForm.nom.value == "")
			{
				alert("Vous devez nous indiquer votre nom.");
				oForm.nom.style.backgroundColor=couleur;
				oForm.nom.focus();
				valid=false;
			}

	    if (valid)
		if (!ctrlnom.test(oForm.nom.value))
			{
				alert("Votre nom doit comporter uniquement des Lettres, Chiffres, Espaces, Points, Tirets et Apostrophes.");
				oForm.nom.style.backgroundColor=couleur;
				oForm.nom.focus();
				valid=false;
			}

	    if (valid)
		if(oForm.email.value == "")
			{
				alert("Vous devez nous indiquer une adresse email.");
				oForm.email.style.backgroundColor=couleur;
				oForm.email.focus();
				valid=false;
			}

	    if (valid)
		if(!(reg.exec(oForm.email.value)!=null && reg2.exec(oForm.email.value)==null))
			{
				alert("La syntaxe de votre adresse email est incorrect.");
				oForm.email.style.backgroundColor=couleur;
				oForm.email.focus();
				valid=false;
		   	}

	    if (valid)
		if(oForm.lelogin.value != "") {

			if (!controle.test(oForm.lelogin.value))
				{
				alert("La syntaxe de votre login est incorrect.");
				oForm.lelogin.style.backgroundColor=couleur;
				oForm.lelogin.focus();
				valid=false;
				}
		}

	    if (valid)
		if(oForm.pass.value != "") {

			if (!controle.test(oForm.pass.value))
				{
				alert("La syntaxe de votre login est incorrect.");
				oForm.pass.style.backgroundColor=couleur;
				oForm.pass.focus();
				valid=false;
				}
		}

	    if (valid)
		if(oForm.sujet.value == "")
			{
				alert("Veuillez indiquer le sujet de votre message.");
				oForm.sujet.style.backgroundColor=couleur;
				oForm.sujet.focus();
				valid=false;
			}

	    if (valid)
		if(oForm.message.value == "")
			{
				alert("Vous devez nous laisez votre message.");
				oForm.message.style.backgroundColor=couleur;
				oForm.message.focus();
				valid=false;
			}

		if (valid)
		oForm.submit();
	}
