// JavaScript Document
function form_moteur1(thisForm) {
 /*	if (thisForm.surface1.checked==false && thisForm.surface2.checked==false && thisForm.surface3.checked==false && thisForm.surface4.checked==false) {
		alert("Veuillez choisir un type de location");
         thisForm.surface1.focus();
         return false;
    }*/
 	if (thisForm.duree_loc[0].checked==false && thisForm.duree_loc[1].checked==false) {
		alert("Veuillez indiquer la durée");
         thisForm.duree_loc[0].focus();
         return false;
    }
 	/*if (thisForm.duree[0].checked==true && thisForm.periode.value=='') {
		alert("Veuillez indiquer la période de location");
         thisForm.periode.focus();
         return false;
    }
 	if (thisForm.duree[1].checked==true && (thisForm.du.value=='' || thisForm.au.value=='')) {
		alert("Veuillez indiquer vos dates de location");
         thisForm.au.focus();
         return false;
    }*/
    if((thisForm.prix_mini.value!='' && thisForm.prix_maxi.value!='') && (parseInt(thisForm.prix_mini.value) > parseInt(thisForm.prix_maxi.value))) {
         alert('Le prix minimum est supérieur au prix maximum, veuillez corriger');
         thisForm.prix_mini.focus();
         return false;
    }
    if((thisForm.surf_mini.value!='' && thisForm.surf_maxi.value!='') && (parseInt(thisForm.surf_mini.value) > parseInt(thisForm.surf_maxi.value))) {
         alert('La surface minimale est supérieur à la surface maximale, veuillez corriger');
         thisForm.surf_mini.focus();
         return false;
    }
/*   if(thisForm.ref.value=='') {
         alert('Référence obligatoire');
         thisForm.ref.focus();
         return false;
    }
    if(thisForm.code_proprio.value=='' && thisForm.nom.value=='') {
         alert('Référence du propriétaire obligatoire');
         thisForm.ref_proprio.focus();
         return false;
    }
    if(thisForm.ville1.value=='' && thisForm.ville2.value=='') {
         alert('ville obligatoire');
         thisForm.ville1.focus();
         return false;
    }*/
}

function form_moteur_en1(thisForm) {
 	if (thisForm.duree_loc[0].checked==false && thisForm.duree_loc[1].checked==false) {
		alert("Select the length of stay");
         thisForm.duree_loc[0].focus();
         return false;
    }
    if((thisForm.prix_mini.value!='' && thisForm.prix_maxi.value!='') && (parseInt(thisForm.prix_mini.value) > parseInt(thisForm.prix_maxi.value))) {
         alert('Error with the price');
         thisForm.prix_mini.focus();
         return false;
    }
    if((thisForm.surf_mini.value!='' && thisForm.surf_maxi.value!='') && (parseInt(thisForm.surf_mini.value) > parseInt(thisForm.surf_maxi.value))) {
         alert('Error with the surface area');
         thisForm.surf_mini.focus();
         return false;
    }
}