Please wait...');$('.modal-body').load('/_modal_Form.php?tableName='+dataType+'&num='+dataId+'&ask='+dataAsk+'&pagetype='+dataPage+'&time='+$.now(),function(responseTxt,statusTxt,xhr){if(statusTxt=="error")
alert("Error: "+xhr.status+": "+xhr.statusText);});});$('.openIframe').on('click',function(){var dataType=$(this).attr('data-type');var dataId=$(this).attr('data-id');var visitlink='/modeles-maison/jumpOnIframe.php?visit='+dataType+'&num='+dataId;$('.modal-iframe').html('
Please wait...
');$('.modal-iframe').attr("src",visitlink);});$(".selectObject").on('change',function(){if($(this).val()=='1'){$('.openDIV').slideDown('slow');}
else{$('.openDIV').hide();}});$("#submit-button").click(function(event){event.preventDefault();var form=$('#subscribe')[0];var data=new FormData(form);data.append("CustomField","This is some extra data, testing");$("#submit-button").prop("disabled",true);$.ajax({type:"POST",url:"/_doSubscribe.php",data:data,processData:false,contentType:false,cache:false,timeout:800000}).done(function(data){$("#output").text(data);$("#submit-button").prop("disabled",false);}).fail(function(xhr,status,error){var errorMessage=xhr.status+': '+xhr.statusText;$("#output").text(errorMessage);console.log("ERROR : ",error);$("#submit-button").prop("disabled",false);});});});$.get("/token.php",function(txt){$("#subscribe").append('');});$(".callMe").click(function(e){$this=$(this);$this.text("Obtenir le numéro...");$this.prop('disabled',true);$.ajax({type:"POST",url:"/_callMe.php",data:{num:$this.data('num'),agence:$this.data('agence'),agent:$this.data('agent'),type:$this.data('type'),section:$this.data('section')},processData:true,cache:false,timeout:800000}).done(function(msg){$.each(msg,function(index,element){if($this.data('type')=='9999'){$this.text(element.tel).replaceWith(element.tel);}else{$this.text(element.tel).replaceWith(' '+element.tel+'');}});}).fail(function(xhr,status,error){console.log("ERROR : ",error);});});function copy(){var dummy=document.createElement('input'),text=window.location.href;document.body.appendChild(dummy);dummy.value=text;dummy.select();document.execCommand('copy');document.body.removeChild(dummy);document.getElementById('copy').classList.toggle("clicked");setTimeout(function(){document.getElementById('copy').classList.toggle("list-btn-red");alert("Lien copié !");},1);}
window.smoothScroll=function(target){var scrollContainer=target;do{scrollContainer=scrollContainer.parentNode;if(!scrollContainer)return;scrollContainer.scrollTop+=1;}while(scrollContainer.scrollTop==0);var targetY=0;do{if(target==scrollContainer)break;targetY+=target.offsetTop-50;}while(target=target.offsetParent);scroll=function(c,a,b,i){i++;if(i>30)return;c.scrollTop=a+(b-a)/30*i;setTimeout(function(){scroll(c,a,b,i);},20);}
scroll(scrollContainer,scrollContainer.scrollTop,targetY,0);}