// JavaScript Document
function PopWin(pg,nm,wi,he,sc,rz) {
window.open(''+pg+'',''+nm+'','width='+wi+',height='+he+',scrollbars='+sc+',resizable='+rz+'');
}

function valider() 
    {
    var choix  = document.form1.choisir.options[document.form1.choisir.selectedIndex].value;
        if (choix == 0) 
        {
        	alert("Veuillez sélectionner une option de la liste, SVP");
        	return false;
        }
    }
	
function checkForm() 
    {
       
        
        if (document.contact.message.value == "")
        {
        	alert("Champ 'Message' pas rempli");
        	document.contact.message.focus();
        	return false;
        }
        
        if (document.contact.nom.value == "")
        {
        	alert("Champ 'Nom' pas rempli");
        	document.contact.nom.focus();
        	return false;
        }
        
        if (document.contact.prenom.value == "")
        {
        	alert("Champ 'Prénom' pas rempli");
        	document.contact.prenom.focus();
        	return false;
        }
		
		if (document.contact.email.value == ""  && document.contact.tel.value == "" )
        {
        	alert("Veuillez saisir soit votre adresse e-mail\nsoit votre numéro de téléphone");
        	return false;
        }
		
		if (document.contact.email.value != "" ) {       
			var atpos = document.contact.email.value.indexOf('@',1);

  			if ( (atpos==-1) || (document.contact.email.value.indexOf('.',atpos))<=atpos) { 
			    alert("Veuillez saisir une adresse e-mail valide");
	    	return false;
  			}
		}

}		
    function checkInscrire() 
    {
               
        if (document.contact.nom.value == "")
        {
        	alert("Champ 'Nom' pas rempli");
        	document.contact.nom.focus();
        	return false;
        }
        
        if (document.contact.prenom.value == "")
        {
        	alert("Champ 'Prénom' pas rempli");
        	document.contact.prenom.focus();
        	return false;
        }
		
		if (document.contact.email.value == ""  && document.contact.tel.value == "" )
        {
        	alert("Veuillez saisir soit votre adresse e-mail\nsoit votre numéro de téléphone");
        	return false;
        }
		
		if (document.contact.email.value != "" ) {       
			var atpos = document.contact.email.value.indexOf('@',1);

  			if ( (atpos==-1) || (document.contact.email.value.indexOf('.',atpos))<=atpos) { 
			    alert("Veuillez saisir une adresse e-mail valide");
	    	return false;
  			}
		}
}