function verifmail(){
	var email=document.formname.email.value;	
	var arobase=email.indexOf("@");
	var dot=email.lastIndexOf(".");
	var space=email.indexOf(" ");
if (!email){
return true;
}
else{
	if ((arobase != -1)&&(dot != -1)&&(dot > arobase +1)&&(dot < email.length -1)&&(space == -1)){
	return true;
	}
	else{
		properties="height=90,width=260,left=250,top=250,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,status=no";
		var errmsg="votre adresse email est erronée";
		window.open("error.php?errmsg="+errmsg, "", properties);
		return false;
		
	}
}
}

function verifurl(name){
	var url=eval("document.formname."+name+".value");
	var dot=url.lastIndexOf(".");
	var space=url.indexOf(" ");
	if(url.length<8){
	var err=true;
	}
	else{
		if ((dot != -1)&&(dot < url.length -1)&&(space == -1)){
		var err=false;
		}
		else{
			var err=true;
		}
	}
if(err){
properties="height=90,width=260,left=250,top=250,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,status=no";
var errmsg="cette url est erronée";
window.open("error.php?errmsg="+errmsg, "", properties);
}
else{}
}


function verifdate(){
var err=false;
	var dayin=document.formname.dayin.options[document.formname.dayin.selectedIndex].value;
	var monthin=document.formname.monthin.options[document.formname.monthin.selectedIndex].value;
	var yearin=document.formname.yearin.options[document.formname.yearin.selectedIndex].value;
	var dayout=document.formname.dayout.options[document.formname.dayout.selectedIndex].value;
	var monthout=document.formname.monthout.options[document.formname.monthout.selectedIndex].value;
	var yearout=document.formname.yearout.options[document.formname.yearout.selectedIndex].value;
	
	var datein=yearin+monthin+dayin;
	var dateout=yearout+monthout+dayout;
		
		if ((datein>dateout)||(yearin>yearout)){
			if (dayin>dayout){
			var errmsg="Votre jour de début est supérieur à votre jour de fin<br>";
			}
			if ((monthin>monthout)&&(yearin==yearout)){
			document.formname.yearout.selectedIndex+=1;
			var errmsg="Votre année de fin n'est pas cohérente avec vos dates<br>Nous avons modifié l'année de fin";
			}
			if (yearin>yearout){
			document.formname.yearin.selectedIndex=document.formname.yearout.selectedIndex;
			var errmsg="Votre année de début est supérieure à vortre année de fin<br>Nous avons modifié l'année de début";
			}
			var err=true;
		}
		if ((dayin=="value")||(dayout=="value")){
			if (dayin=="value"){
			document.formname.dayin.selectedIndex=0;
			var errmsg="Vous devez renter un jour de début";
			}
			else{
			document.formname.dayout.selectedIndex=0;
			var errmsg="Vous devez renter un jour de fin";
			}
			var err=true;
		}
		
		if(!err){
			return true;
		}
		else{
			properties="height=90,width=260,left=250,top=250,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,status=no";
			window.open("error.php?errmsg="+errmsg, "", properties);
			return false;
		}
}
function annuaire(url){
properties="height=590,width=590,left=0,top=0,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,status=yes";
window.open(url, "", properties);
}