var xhr=null;function getxhr(){if(window.XMLHttpRequest)xhr=new XMLHttpRequest;else if(window.ActiveXObject)try{xhr=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){xhr=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");xhr=false}} function afficher_contenu(a,b){getxhr();xhr.onreadystatechange=function(){reponse=xhr.readyState==4&&xhr.status==200?xhr.responseText:"<center><img src='/00_BIBLIOTHEQUE/DESIGN/LIGHTBOX/loading.gif'><br />chargement...</center>";document.getElementById("CONTENU-PRINCIPAL").innerHTML=reponse};xhr.open("GET","http://www.maison-et-services.com/components/com_structures/views/structures/tmpl/"+a+"-ajax.php?prestataire="+b,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xhr.send(b)} function envoi_form_info(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){getxhr();xhr.onreadystatechange=function(){reponse=xhr.readyState==4&&xhr.status==200?xhr.responseText:"<center><img src='loading.gif'><br />chargement...</center>";document.getElementById("INFORMATION").innerHTML=reponse};xhr.open("GET","/components/com_structures/views/structures/tmpl/envoi_mail_information.php?mail_presta="+a+"&nom="+b+"&prenom="+c+"&adress1="+d+"&adress2="+e+"&CP="+f+"&ville="+g+"&tel="+h+"&mail="+i+"&commentaires="+j+ "&rdv="+k+"&reduc="+l+"&cesu="+m+"&menage="+n+"&jardinage="+o+"&vitres="+p+"&nettoyage="+q,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.send(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)} function verifInfos(){var a=0;if(document.form3.nom_client.value==""&&a==0){document.form3.nom_client.style.border="2px solid #eeb500";alert("ATTENTION : Le champ nom est obligatoire");a=1}document.form3.nom_client.style.border="";if(document.form3.prenom_client.value==""&&a==0){alert("ATTENTION : Le champ prenom est obligatoire");document.form3.prenom_client.style.border="2px solid #eeb500";a=1}document.form3.prenom_client.style.border="";if(document.form3.adresse1_client.value==""&&a==0){alert("ATTENTION : Le champ adresse est obligatoire"); document.form3.adresse1_client.style.border="2px solid #eeb500";a=1}document.form3.adresse1_client.style.border="";if(document.form3.cp_client.value==""&&a==0){alert("ATTENTION : Le champ code postal est obligatoire");document.form3.cp_client.style.border="2px solid #eeb500";a=1}document.form3.cp_client.style.border="";if(document.form3.ville_client.value==""&&a==0){alert("ATTENTION : Le champ ville est obligatoire");document.form3.ville_client.style.border="2px solid #eeb500";a=1}document.form3.ville_client.style.border= "";if(document.form3.tel_client.value==""&&a==0){alert("ATTENTION : Le champ tel. est obligatoire");document.form3.tel_client.style.border="2px solid #eeb500";a=1}document.form3.tel_client.style.border="";if(document.form3.mail_client.value==""&&a==0){alert("ATTENTION : Le champ mail est obligatoire");document.form3.mail_client.style.border="2px solid #eeb500";a=1}else{adresse=document.form3.mail_client.value;var b=adresse.indexOf("@",1),c=adresse.indexOf(".",b+1);if(!(b>-1&&adresse.length>2&&c>1)){alert("ATTENTION : Votre adresse mail est mal saisie"); a=1}}document.form3.mail_client.style.border="";a==0&&envoi_form_info(document.form3.mail_presta.value,document.form3.nom_client.value,document.form3.prenom_client.value,document.form3.adresse1_client.value,document.form3.adresse2_client.value,document.form3.cp_client.value,document.form3.ville_client.value,document.form3.tel_client.value,document.form3.mail_client.value,document.form3.commentaires.value,document.form3.rdv.checked,document.form3.reduc.checked,document.form3.cesu.checked,document.form3.menage.checked, document.form3.jardinage.checked,document.form3.vitres.checked,document.form3.nettoyage.checked)} function envoi_form_interv(a,b,c,d,e,f,g,h,i,j,k,l,m,n){getxhr();xhr.onreadystatechange=function(){reponse=xhr.readyState==4&&xhr.status==200?xhr.responseText:"<center><img src='loading.gif'><br />chargement...</center>";document.getElementById("INTERVENTION").innerHTML=reponse};xhr.open("GET","/components/com_structures/views/structures/tmpl/envoi_mail_intervention.php?mail_presta="+a+"&nom="+b+"&prenom="+c+"&adress1="+d+"&adress2="+e+"&CP="+f+"&ville="+g+"&tel="+h+"&mail="+i+"&commentaires="+j+ "&menage="+k+"&jardinage="+l+"&vitres="+m+"&nettoyage="+n,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.send(a,b,c,d,e,f,g,h,i,j,k,l,m,n)} function verifInterv(){var a=0;if(document.form2.nom_client.value==""&&a==0){document.form2.nom_client.style.border="2px solid #eeb500";alert("ATTENTION : Le champ nom est obligatoire");a=1}document.form2.nom_client.style.border="";if(document.form2.prenom_client.value==""&&a==0){alert("ATTENTION : Le champ prenom est obligatoire");document.form2.prenom_client.style.border="2px solid #eeb500";a=1}document.form2.prenom_client.style.border="";if(document.form2.adresse1_client.value==""&&a==0){alert("ATTENTION : Le champ adresse est obligatoire"); document.form2.adresse1_client.style.border="2px solid #eeb500";a=1}document.form2.adresse1_client.style.border="";if(document.form2.cp_client.value==""&&a==0){alert("ATTENTION : Le champ code postal est obligatoire");document.form2.cp_client.style.border="2px solid #eeb500";a=1}document.form2.cp_client.style.border="";if(document.form2.ville_client.value==""&&a==0){alert("ATTENTION : Le champ ville est obligatoire");document.form2.ville_client.style.border="2px solid #eeb500";a=1}document.form2.ville_client.style.border= "";if(document.form2.tel_client.value==""&&a==0){alert("ATTENTION : Le champ tel. est obligatoire");document.form2.tel_client.style.border="2px solid #eeb500";a=1}document.form2.tel_client.style.border="";if(document.form2.mail_client.value==""&&a==0){alert("ATTENTION : Le champ mail est obligatoire");document.form2.mail_client.style.border="2px solid #eeb500";a=1}else{adresse1=document.form2.mail_client.value;var b=adresse1.indexOf("@",1),c=adresse1.indexOf(".",b+1);if(!(b>-1&&adresse1.length>2&& c>1)){alert("ATTENTION : Votre adresse mail est mal saisie");a=1}}document.form2.mail_client.style.border="";a==0&&envoi_form_interv(document.form2.mail_presta.value,document.form2.nom_client.value,document.form2.prenom_client.value,document.form2.adresse1_client.value,document.form2.adresse2_client.value,document.form2.cp_client.value,document.form2.ville_client.value,document.form2.tel_client.value,document.form2.mail_client.value,document.form2.commentaires.value,document.form2.menage.checked, document.form2.jardinage.checked,document.form2.vitres.checked,document.form2.nettoyage.checked)} function afficher_fichePrestataire(a){var b=null;if(window.XMLHttpRequest)b=new XMLHttpRequest;else if(window.ActiveXObject)try{b=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){b=new ActiveXObject("Microsoft.XMLHTTP")}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");b=false}b.onreadystatechange=function(){reponse=b.readyState==4&&b.status==200?b.responseText:"<center><img src='/modules/mod_carte/images/loading.gif' style='margin:140px auto ' /> ??????????????</center>";document.getElementById("FICHE-VILLE").innerHTML= reponse};b.open("GET","http://www.services-maison-et-services.com/modules/mod_carte/mod_agence.php?ville="+a,true);b.setRequestHeader("Content-Type","application/x-www-sform-urlencoded");b.send(a)} function EcrireCookie(a,b,c,d){var e=EcrireCookie.arguments,f=EcrireCookie.arguments.length;c=f>2?e[2]:null;d=f>3?e[3]:null;var g=f>4?e[4]:null;e=f>5?e[5]:false;document.cookie=a+"="+escape(b)+(c==null?"":"; expires="+c.toGMTString())+(d==null?"":"; path="+d)+(g==null?"":"; domain="+g)+(e==true?"; secure":"")}function EffaceCookie(a){date=new Date;date.setFullYear(date.getFullYear()-1);EcrireCookie(a,null,date)} function getCookieVal(a){var b=document.cookie.indexOf(";",a);if(b==-1)b=document.cookie.length;return unescape(document.cookie.substring(a,b))}function LireCookie(a){a=a+"=";for(var b=a.length,c=document.cookie.length,d=0;d<c;){var e=d+b;if(document.cookie.substring(d,e)==a)return getCookieVal(e);d=document.cookie.indexOf(" ",d)+1;if(d==0)break}return null} function addOnloadEvent(a){if(typeof window.addEventListener!="undefined")window.addEventListener("load",a,false);else if(typeof window.attachEvent!="undefined")window.attachEvent("onload",a);else if(window.onload!=null){var b=window.onload;window.onload=function(c){b(c);window[a]()}}else window.onload=a} function afficher_carteFrance(a,b,c){if(a!=""){getxhr();xhr.onreadystatechange=function(){if(xhr.readyState==4&&xhr.status==200){reponse=xhr.responseText;document.getElementById("CARTE-AFFICHAGE").innerHTML=reponse;date=new Date;date.setFullYear(date.getFullYear()+2);deja_region=LireCookie("carte-affiche-region");if(deja_region!=a){EcrireCookie("carte-affiche-region",a,date,"/");EcrireCookie("carte-affiche-categorie",b,date,"/");EcrireCookie("carte-affiche-type",c,date,"/")}}else{reponse="<center><img src='/modules/mod_carte/images/loading.gif' style='margin:140px auto ' /></center>"; document.getElementById("CARTE-AFFICHAGE").innerHTML=reponse}};if(c=="region")xhr.open("GET","http://www.maison-et-services.com/modules/mod_carte/mod_region.php?region="+a+"&categorie="+b+"&type_plot="+c,true);else if(c=="departement")xhr.open("GET","http://www.maison-et-services.com/modules/mod_carte/mod_departement.php?departement="+a+"&categorie="+b+"&type_plot="+c,true);else if(c=="france")xhr.open("GET","http://www.maison-et-services.com/modules/mod_carte/mod_france.php?type_plot="+c+"&categorie="+ b,true);else if(c=="ville")xhr.open("GET","http://www.maison-et-services.com/modules/mod_carte/mod_agence.php?ville="+a+"&categorie="+b,true);else c=="CP"&&xhr.open("GET","http://www.maison-et-services.com/modules/mod_carte/mod_recherche_agence.php?CP="+a+"&categorie="+b,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.send("region="+a+"&categorie="+b+"&type_plot="+c)}};
