function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Adresse courriel invalide")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Adresse courriel invalide")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Adresse courriel invalide")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Adresse courriel invalide")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Adresse courriel invalide")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Adresse courriel invalide")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Adresse courriel invalide")
		    return false
		 }

 		 return true					
	}

function validateform(){
	
	var emailID=document.form1.email
	var nom=document.form1.nom
	var mess=document.form1.mess
	var phone=document.form1.phone
	var attachment=document.form1.attachment
	
	if ((emailID.value==null)||(emailID.value=="")){
	alert("Veuillez remplir tous les champs marqués d'un * ")
		return false
	}
	if ((nom.value==null)||(nom.value=="")){
	alert("Veuillez remplir tous les champs marqués d'un * ")
		return false
	}
	if ((mess.value==null)||(mess.value=="")){
	alert("Veuillez remplir tous les champs marqués d'un * ")
		return false
	}
	if ((phone.value==null)||(phone.value=="")){
	alert("Veuillez remplir tous les champs marqués d'un * ")
		return false
	}
	if ((attachment.value==null)||(attachment.value=="")){
	alert("Veuillez remplir tous les champs marqués d'un * ")
		return false
	}
	
	
	
	if (echeck(emailID.value)==false){
		return false
	}
	document.getElementById('submitdiv').innerHTML = '<span class="texte">Veuillez patienter... Envoi de vos infos &agrave; Face2Face</span><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="40" height="40" align="absmiddle">	<param name="movie" value="images/loading.swf" />	<param name="quality" value="high" />	<embed src="images/loading.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="40" height="40" align="absmiddle"></embed></object>';
	return true;
	
 }
