<!--
function is_email(email)
  {
     var reg = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}[.][a-zA-Z0-9]{2,4}$/ ;
     var reg2 = /[.@]{2,}/ ;
     return ((reg.exec(email)!=null) && (reg2.exec(email)==null)) ;
  }

function valid_inscrire_newsletter(theForm){

	if (!is_email(theForm.email.value)){
		alert("Précisez correctement votre email.");
		theForm.email.focus();
		return (false);
	} else {
		// permet d'afficher l'outif PublishBox dans un popup
		// /usweb/
		var hauteur = 250 ;
		var largeur = 250 ;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open('contact/?mod=inscription&email=' + theForm.email.value, 'CharlesGautier', 'top='+top+', left='+left+', width='+largeur+', height='+hauteur+', location=no, status=no, scrollbars=no,resizable=no');
		theForm.email.value = "";
		return (false);
	}
}


function valid_desinscrire_newsletter(theForm){	
	if (!is_email(theForm.email.value)){
		alert("Précisez correctement votre email.");
		theForm.email.focus();
		return (false);
	} else {
		var hauteur = 250 ;
		var largeur = 250 ;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open('../contact/?mod=desinscription&email=' + theForm.email.value, 'CharlesGautier', 'top='+top+', left='+left+', width='+largeur+', height='+hauteur+', location=no, status=no, scrollbars=no,resizable=no');
		theForm.email.value = "";
		return (false);
	}
}

function desinscrire_newsletter(){
		var hauteur = 250 ;
		var largeur = 250 ;
		var top=(screen.height-hauteur)/2;
		var left=(screen.width-largeur)/2;
		window.open('contact/form_desinscription_newsletter.htm', 'CharlesGautier', 'top='+top+', left='+left+', width='+largeur+', height='+hauteur+', location=no, status=no, scrollbars=auto,resizable=no');	
}


function verifContact(theForm){
	
	if ( theForm.nom.value.length < 2 ){
		alert("Précisez votre nom.");
		theForm.nom.focus();
		return (false);	
	} else if (!is_email(theForm.email.value)){
		alert("Précisez correctement votre email.");
		theForm.email.focus();
		return (false);
	} else if ( theForm.sujet.value.length < 2 ){
		alert("Précisez votre sujet.");
		theForm.sujet.focus();
		return (false);	
	} else if ( theForm.commentaire.value.length < 5 ){
		alert("Précisez votre commentaire.");
		theForm.commentaire.focus();
		return (false);	
	} else {
		return (true);
	}	

 
}
//-->
