function wait(span) {
	document.getElementById(span).innerHTML = "<img style='vertical-align: middle;' src='images/loading.gif'> &nbsp; <i style='font-size:8pt; font-family:arial;'>veuillez patientez...</i>"
}

function verif_form_contact(){
		if(window.document.form_contact.nom.value==''){
			alert('Le nom doit être saisi');
			window.document.form_contact.nom.focus();
			return false;
		}else if(window.document.form_contact.mail.value=='' || window.document.form_contact.mail.value.indexOf("@") == "-1" || window.document.form_contact.mail.value.indexOf(".") == "-1"){
			alert('L\'email doit être saisi et valide');
			window.document.form_contact.mail.focus();
			return false;
		}else if(window.document.form_contact.message.value==0){
			alert('Vous devez saisir votre message');
			window.document.form_contact.message.focus();
			return false;
		}else
			wait('mail_wait');
			document.getElementById('info').style.display = "none";
			window.document.form_contact.submit();
			return true;
}

function verif_nom(){
		if(window.document.form_contact.nom.value==''){
			document.getElementById('spanNom').innerHTML  = "&nbsp;&nbsp;<img src='images/wrong.gif'>";
		}else{
			document.getElementById('spanNom').innerHTML  = "&nbsp;&nbsp;<img src='images/right.gif'>";
		}
}
function verif_mail(){
		if(window.document.form_contact.mail.value=='' || window.document.form_contact.mail.value.indexOf("@") == "-1" || window.document.form_contact.mail.value.indexOf(".") == "-1"){
			document.getElementById('spanMail').innerHTML  = "&nbsp;&nbsp;<img src='images/wrong.gif'>";
		}else{
			document.getElementById('spanMail').innerHTML  = "&nbsp;&nbsp;<img src='images/right.gif'>";
		}
}

function changeImage(appart, image) {
	document.getElementById('bigImage').innerHTML = "<img src='images/appart"+appart+"_big_"+image+".jpg' width='524px' height='381px'>";
}
