// JavaScript Document
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
function zoom(image) {
	var photo = image;
	document.getElementById('zoom').src = "./images/"+photo+"";
}
function zoomgalerie(image,l) {
	var photo = image;
	var legende = l;
	document.getElementById('zoomgalerie').src = "./galeries/"+photo+"";
	document.getElementById('legendegalerie').value = legende;
}
function valideform (){
	if(document.form1.nom.value == ''){
		alert('Merci de renseigner le champ : nom.');
		return false;
	}else
	if(document.form1.adresse.value == ''){
		alert('Merci de renseigner le champ : adresse.');
		return false;
	}else
	if( (isNaN(document.form1.code_postal.value)) ){
		alert('Votre code postal est incorrect.');
		return false;
	}else
	if(document.form1.ville.value == ''){
		alert('Merci de renseigner le champ : ville.');
		return false;
	}else
	if( (isNaN(document.form1.telephone.value)) ){
		alert('Votre numéro de téléphone est incorrect.');
		return false;
	}else
	if( (document.form1.email.value.indexOf("@") <= 0)
	&& (document.form1.email.value.indexOf(".") <= 0) ) {
         	alert('Votre adresse email est incorrecte.');
		return false;
	}else{
	document.form1.method = "POST";
	document.form1.action = "contact2.php";
	document.form1.submit();
	}
}

function o(a,n,h,l)
{
	op="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=no,width="+l+",height="+h;
	t='<html><head><title>' + n + '</title></head>'
	+'<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onblur="window.self.close()">'
	+'<p align=center><img src=' + a + '></p></body></html>';
	window2=window.open("","",op);
	window2.document.open();
	window2.document.write(t);
	window2.document.close();
}


