// JavaScript Document
function OuvrirPopup(page,nom,option) {
   window.open(page,nom,option);
}

/*function changeImageInfo(imageURL,title)
{
document.big_image.src = imageURL;
document.image_form.image_title.value = title;
}
*/
function rollover_tjs(nom,src) {   
    document.images[nom].src=src;
}


function checkIt(el) {
  var elArr = ['LT','CT'];
  for (var i=0; i<elArr.length; i++) {
	sel = document.getElementById(elArr[i]);
	if (el.value == elArr[i]) { sel.style.display = 'block'; }
                         else { sel.style.display = 'none'; } 
  }
    
// not sure what this is supposed to do from source given ???    
//    document.getElementById('who').value = '';
}

/*function load() {
    if (document.images) {
        this.length=load.arguments.length;
        for (var i=0;i<this.length;i++) {
            this[i+1]=new Image();
            this[i+1].src=load.arguments[i];
        }
    }
}
function preload() {
    var temp=new load("<?php echo $list_img;?>")
}
preload()
*/


//form de resa
function form_resa(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Indiquez votre email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('Adresse e-mail non valide !');
         thisForm.email.focus();
		return false;
		} 

if(thisForm.verif.value=='') {
         alert('Recopiez le code anti spam');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Le code anti spam doit contenir 6 caractères');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.submit();
	}
}


function form_resa_en(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Please fill your Surname');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Please fill your first name');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Please fill your email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('wrong email address ');
         thisForm.email.focus();
		return false;
		} 

if(thisForm.verif.value=='') {
         alert('Copy security code');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Copy security code must contains 6 caracters');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.submit();
	}
}

function form_resa_es(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Apellido obligatorio');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Nombre obligatorio');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('e-correo obligatorio');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('el correo no es correcto');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.verif.value=='') {
         alert('Copiar el codigo de seguridad');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('el codigo debe tener 6 carácter');
         thisForm.verif.focus();
         return false;
    }	
}


//


//form proprio
function form_proprio(thisForm) {

    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Indiquez votre email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('Adresse e-mail non valide !');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.location_typ.value=='') {
         alert('Indiquez le type de rue');
         thisForm.location_typ.focus();
         return false;
    }
    if(thisForm.location_rue.value=='') {
         alert('Indiquez le nom de la rue');
         thisForm.location_rue.focus();
         return false;
    }
    if(thisForm.code_postal.value=='') {
         alert('Indiquez le code postal');
         thisForm.code_postal.focus();
         return false;
    }
    if(thisForm.ville.value=='') {
         alert('Indiquez le nom de la ville');
         thisForm.ville.focus();
         return false;
    }
    if(thisForm.location_type_surface.value=='') {
         alert('Indiquez le type de surface');
         thisForm.location_type_surface.focus();
         return false;
    }	
    if(thisForm.verif.value=='') {
         alert('Recopiez le code anti spam');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Le code anti spam doit contenir 6 caractères');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.bouton_ajout2.value='Veuillez patientez, chargement en cours';
		thisForm.submit();
	}

}

//form proprio
function form_proprio_uk(thisForm) {

    if(thisForm.nom.value=='') {
         alert('Please fill your Surname');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Please fill your fisrt name');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Please fill your email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('wrong email address');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.location_typ.value=='') {
         alert('Please fill the type');
         thisForm.location_typ.focus();
         return false;
    }
    if(thisForm.location_rue.value=='') {
         alert('Please fill the street');
         thisForm.location_rue.focus();
         return false;
    }
    if(thisForm.code_postal.value=='') {
         alert('Please fill the postcode');
         thisForm.code_postal.focus();
         return false;
    }
    if(thisForm.ville.value=='') {
         alert('Please fill the city');
         thisForm.ville.focus();
         return false;
    }
    if(thisForm.location_type_surface.value=='') {
         alert('Please fill the type of property');
         thisForm.location_type_surface.focus();
         return false;
    }	
    if(thisForm.verif.value=='') {
         alert('Copy security code');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Copy security code must contains 6 caracters');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.bouton_ajout2.value='Loading... Please wait';
		thisForm.submit();
	}

}
//form proprio
function form_proprio_es(thisForm) {

    if(thisForm.nom.value=='') {
         alert('Apellido obligatorio');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Nombre obligatorio');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('e-correo obligatorio');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('el correo no es correcto');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.location_typ.value=='') {
         alert('Debe rellenar el campo tipo');
         thisForm.location_typ.focus();
         return false;
    }
    if(thisForm.location_rue.value=='') {
         alert('Debe rellenar el campo calle');
         thisForm.location_rue.focus();
         return false;
    }
    if(thisForm.code_postal.value=='') {
         alert('Debe rellenar el campo codigo postal');
         thisForm.code_postal.focus();
         return false;
    }
    if(thisForm.ville.value=='') {
         alert('Debe rellenar el campo ciudad');
         thisForm.ville.focus();
         return false;
    }
    if(thisForm.location_type_surface.value=='') {
         alert('Debe rellenar el campo tipo de superficie');
         thisForm.location_type_surface.focus();
         return false;
    }	
    if(thisForm.verif.value=='') {
         alert('Copiar el codigo de seguridad');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('el codigo debe tener 6 carácter');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.bouton_ajout2.value='Loading... Please wait';
		thisForm.submit();
	}

}
function form_proprio2(thisForm) {
    if(thisForm.location_nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.location_nom.focus();
         return false;
    }
    if(thisForm.location_prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.location_prenom.focus();
         return false;
    }
    if(thisForm.location_email.value=='') {
         alert('Indiquez votre email');
         thisForm.location_email.focus();
         return false;
    }
    if(thisForm.location_typ.value=='') {
         alert('Indiquez le type de rue');
         thisForm.location_typ.focus();
         return false;
    }
    if(thisForm.location_rue.value=='') {
         alert('Indiquez le nom de la rue');
         thisForm.location_rue.focus();
         return false;
    }
    if(thisForm.location_code_postal.value=='') {
         alert('Indiquez le code postal');
         thisForm.location_code_postal.focus();
         return false;
    }
    if(thisForm.location_ville.value=='') {
         alert('Indiquez le nom de la ville');
         thisForm.location_ville.focus();
         return false;
    }
    if(thisForm.location_type_surface.value=='') {
         alert('Indiquez le type de surface');
         thisForm.location_type_surface.focus();
         return false;
    }	
    if(thisForm.verif.value=='') {
         alert('Recopiez le code anti spam');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.submit();
	}
}


//form de resa
function form_contact(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Indiquez votre email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('Adresse e-mail non valide !');
         thisForm.email.focus();
		return false;
		} 
    if(thisForm.objet.value=='') {
         alert('Indiquez l\'objet du message');
         thisForm.objet.focus();
         return false;
    }
    if(thisForm.commentaire.value=='') {
         alert('Veuillez ajouter du contenu');
         thisForm.commentaire.focus();
         return false;
    }
    if(thisForm.verif.value=='') {
         alert('Recopiez le code anti spam');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Le code anti spam doit contenir 6 caractères');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.submit();
	}
}
//form de resa
function form_contact_es(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Apellido obligatorio');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Nombre obligatorio');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('e-correo obligatorio');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('el correo no es correcto');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.objet.value=='') {
         alert('objeto obligatorio');
         thisForm.objet.focus();
         return false;
    }
    if(thisForm.commentaire.value=='') {
         alert('Añadir un mensaje');
         thisForm.commentaire.focus();
         return false;
    }
    if(thisForm.verif.value=='') {
         alert('Copiar el codigo de seguridad');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('el codigo debe tener 6 carácter');
         thisForm.verif.focus();
         return false;
    }	
}
//form de resa
function form_contact_uk(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Please fill your Surname');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Please fill your fisrt name');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Please fill your email');
         thisForm.email.focus();
         return false;
    }
	    adresse = thisForm.email.value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
		}
		else 
		{
		alert('wrong email address ');
         thisForm.email.focus();
		return false;
		} 

    if(thisForm.objet.value=='') {
         alert('Please fill a subject');
         thisForm.objet.focus();
         return false;
    }
    if(thisForm.commentaire.value=='') {
         alert('Please fill a content');
         thisForm.commentaire.focus();
         return false;
    }
	if(thisForm.verif.value=='') {
         alert('Copy security code');
         thisForm.verif.focus();
         return false;
    }	
    if(thisForm.verif.value.length <6) {
         alert('Copy security code must contains 6 caracters');
         thisForm.verif.focus();
         return false;
    }	
	else {
		thisForm.submit();
	}
}
function form_envoi_mail(thisForm) {
    if(thisForm.nom_dest.value=='') {
         alert('Indiquez le nom du destinataire');
         thisForm.nom_dest.focus();
         return false;
    }
    if(thisForm.prenom_dest.value=='') {
         alert('Indiquez le prénom du destinataire');
         thisForm.prenom_dest.focus();
         return false;
    }
    if(thisForm.email_dest.value=='') {
         alert('Indiquez le mail du destinataire');
         thisForm.email_dest.focus();
         return false;
    }
    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
	else {
		thisForm.submit();
	}
}

function form_envoi_mail_uk(thisForm) {
    if(thisForm.nom_dest.value=='') {
         alert('Please fill surname(recipient)');
         thisForm.nom_dest.focus();
         return false;
    }
    if(thisForm.prenom_dest.value=='') {
         alert('Please fill the fisrt name (recipient)');
         thisForm.prenom_dest.focus();
         return false;
    }
    if(thisForm.email_dest.value=='') {
         alert('Please fill the mail (recipient)');
         thisForm.email_dest.focus();
         return false;
    }
    if(thisForm.nom.value=='') {
         alert('Please fill your surname');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Please fill your fisrt name');
         thisForm.prenom.focus();
         return false;
    }
	else {
		thisForm.submit();
	}
}

function form_envoi_mail_es(thisForm) {
    if(thisForm.nom_dest.value=='') {
         alert('Indiquez le nom du destinataire');
         thisForm.nom_dest.focus();
         return false;
    }
    if(thisForm.prenom_dest.value=='') {
         alert('Apellido del destinario obligatorio');
         thisForm.prenom_dest.focus();
         return false;
    }
    if(thisForm.email_dest.value=='') {
         alert('E-correo del destinario obligatorio');
         thisForm.email_dest.focus();
         return false;
    }
    if(thisForm.nom.value=='') {
         alert('Apellido obligatorio');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Nombre obligatorio');
         thisForm.prenom.focus();
         return false;
    }
	else {
		thisForm.submit();
	}
}
<!-- Begin
function popUp() {
if(document.getElementById('newsletter_courriel').value=='') {
	 alert('Veuillez Indiquez votre mail');
	 document.getElementById('newsletter_courriel').focus();
	 return false;
}
else {

	day = new Date();
	id = day.getTime();
	url = document.getElementById('newsletter_courriel').value;
	url = "newsletter.php?send=ok&newsletter_courriel="+url+"";
	eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=150,left = 0,top = 0');");
	return false;
	}
}

<!-- Begin
function popUp_uk() {
if(document.getElementById('newsletter_courriel').value=='') {
	 alert('Please fill your email');
	 document.getElementById('newsletter_courriel').focus();
	 return false;
}
else {

	day = new Date();
	id = day.getTime();
	url = document.getElementById('newsletter_courriel').value;
	url = "newsletter_uk.php?send=ok&newsletter_courriel="+url+"";
	eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=150,left = 0,top = 0');");
	return false;
	}
}

<!-- Begin
function popUp_es() {
if(document.getElementById('newsletter_courriel').value=='') {
	 alert('Indicar su e-correo');
	 document.getElementById('newsletter_courriel').focus();
	 return false;
}
else {

	day = new Date();
	id = day.getTime();
	url = document.getElementById('newsletter_courriel').value;
	url = "newsletter_es.php?send=ok&newsletter_courriel="+url+"";
	eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=330,height=150,left = 0,top = 0');");
	return false;
	}
}

//form de la fiche re renseignement
function form_renseign(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.age.value=='') {
         alert('Indiquez votre âge');
         thisForm.age.focus();
         return false;
    }
    if(thisForm.nationalite.value=='') {
         alert('Indiquez votre Nationalité');
         thisForm.nationalite.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Indiquez votre email');
         thisForm.email.focus();
         return false;
    }
    if(thisForm.statut.value=='') {
         alert('Indiquez votre statut professionel');
         thisForm.statut.focus();
         return false;
    }
}
function form_renseign2(thisForm) {
    if(thisForm.nom.value=='') {
         alert('Indiquez votre nom');
         thisForm.nom.focus();
         return false;
    }
    if(thisForm.prenom.value=='') {
         alert('Indiquez votre prénom');
         thisForm.prenom.focus();
         return false;
    }
    if(thisForm.adresse.value=='') {
         alert('Indiquez votre adresse');
         thisForm.adresse.focus();
         return false;
    }
    if(thisForm.nationalite.value=='') {
         alert('Indiquez votre Nationalité');
         thisForm.nationalite.focus();
         return false;
    }
    if(thisForm.tel1.value=='') {
         alert('Indiquez votre numéro de téléphone');
         thisForm.tel1.focus();
         return false;
    }
    if(thisForm.email.value=='') {
         alert('Indiquez votre email');
         thisForm.email.focus();
         return false;
    }
}

