Warning:Undefined global variable $adminBorder in /var/www/public/modules/index/js.php on line 94
!important');} else {formTarget[i].setAttribute('style', 'border-color:
Warning:Undefined global variable $adminBorder in /var/www/public/modules/index/js.php on line 96
!important');}if ((formValue === '' && !formName.match(/img_/g) || formValue === '' && formName === 'img_1') && formValue === '' && !formName.match(/pdf_/g) && !formName.match(/mail_default/g) && !formName.match(/file/g)) {formError.push(formName);}formData += (formName + '=' + formValue + '&');}if (formError.length === 0) {xhr('POST','' + target + '','' + formData + '','' + callBack + '');popUpSet(1, 'auto', 'load', '');} else {for (var i = 0; i < formError.length; i++) {if (formError[i].match(/img_/g)) {document.getElementById('div_' + formError[i]).setAttribute('style', 'border-color:red !important');} else {document.getElementsByName(formError[i])[0].setAttribute('style', 'border-color:red !important');}}}}function pageReload() {window.location.reload();}window.addEventListener("load", function() {headerScroll();document.getElementsByClassName('headerLocalisationClick')[0].addEventListener("click", function(){setScrollTo('maps', 'headerBottom');});});window.addEventListener("resize", function() {headerScroll();});window.addEventListener("scroll", function() {var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;headerScroll(scrollTop);});function headerScroll(scrollTop) {if (windowWidth < 800) {var topIcon = '56.5px';} else {var topIcon = '62px';}var headerTop = document.getElementsByClassName('headerTop')[0].offsetHeight;if (scrollTop > headerTop && windowWidth <= 1150) {document.getElementsByClassName('headerMenuMobile')[0].style.top = (topIcon);document.getElementsByClassName('headerPhoneScroll')[0].style.top = (topIcon);} else {document.getElementsByClassName('headerMenuMobile')[0].style.top = ('0');document.getElementsByClassName('headerPhoneScroll')[0].style.top = ('0');}}var initMenu = 0;document.getElementsByClassName('headerMenuMobile')[0].addEventListener("click", function() {if (initMenu) {document.getElementsByClassName('headerMenu')[0].style.opacity = ('0');document.getElementsByClassName('headerMenuMobile')[0].getElementsByTagName('span')[0].setAttribute('class', 'icons24 iconMenu');setTimeout(function() {document.getElementsByClassName('headerMenu')[0].style.display = ('none');}, 300);initMenu = 0;} else {document.getElementsByClassName('headerMenu')[0].style.display = ('block');document.getElementsByClassName('headerMenuMobile')[0].getElementsByTagName('span')[0].setAttribute('class', 'icons24 iconClose');setTimeout(function() {document.getElementsByClassName('headerMenu')[0].style.opacity = ('1')}, 0);initMenu = 1;}});var lastWidth;window.addEventListener("load", function() {setBanniere();lastWidth = windowWidth;});window.addEventListener("resize", function() {if (windowWidth != lastWidth) {setBanniere();}});function setBanniere() {var videoSource = '';if (windowWidth < 800) {videoSource = '';} else if (windowWidth >= 800 && windowWidth < 1150) {videoSource = '';} else {videoSource = '';}document.getElementById('banniereVideo').innerHTML = (videoSource);}window.addEventListener("load", function() {for (var i = 0; i < document.getElementsByClassName('buttonReparation').length; i++) {document.getElementsByClassName('buttonReparation')[i].addEventListener("click", function(){setScrollTo('serviceReparation', 'headerBottom');document.getElementsByClassName('headerMenuMobile')[0].click();});}for (var i = 0; i < document.getElementsByClassName('buttonMaintenance').length; i++) {document.getElementsByClassName('buttonMaintenance')[i].addEventListener("click", function(){setScrollTo('serviceMaintenance', 'headerBottom');document.getElementsByClassName('headerMenuMobile')[0].click();});}for (var i = 0; i < document.getElementsByClassName('buttonEntreprise').length; i++) {document.getElementsByClassName('buttonEntreprise')[i].addEventListener("click", function(){setScrollTo('entreprise', 'headerBottom');document.getElementsByClassName('headerMenuMobile')[0].click();});}});window.addEventListener("load", function() {for (var i = 0; i < document.getElementsByClassName('buttonDevis').length; i++) {document.getElementsByClassName('buttonDevis')[i].addEventListener("click", function() {document.getElementsByClassName('headerMenuMobile')[0].click();setScrollTo('devis', 'headerBottom');});}document.getElementsByClassName('headerLocalisationClick')[0].addEventListener("click", function(){setScrollTo('maps', 'headerBottom');});document.getElementsByClassName('devisSend')[0].addEventListener("click", function() {formSend('devisForm','https://www.glm-reparations.fr/modules/devis/php.php', 'checkDevis');});});function checkDevis(a) {popUpSet(0);if (a === 'add') {var formTarget = document.getElementsByClassName('formValues');for (var i = 0; i < formTarget.length; i++) {formTarget[i].value = ('');}var params = {"title": "Demande envoyée","text": "Votre demande a bien été envoyée. Vous receverez une réponse dans les meilleurs délais."};popUpSet(1, 'auto', 'alert', params);} else if (a.match(/[0-9]/g)) {var params = {"title": "Patiente","text": "Vous devez attendre " + a + " seconde(s) avant de pouvoir envoyer une nouvelle demande de devis."};popUpSet(1, 'auto', 'alert', params);} else {var a = a.split(',');for (var i = 0; i < a.length; i++) {document.getElementsByName(a[i])[0].style.borderColor = ('red');}}}window.addEventListener("scroll", function() {if (!document.getElementsByClassName('mapsContent')[0].getElementsByTagName('iframe')[0]) {var mapsTop = document.getElementsByClassName('mapsContent')[0].offsetTop;var winScrollTop = document.documentElement.scrollTop || document.body.scrollTop;var maps = '';if (mapsTop <= ((windowHeight + winScrollTop) - 50)) {document.getElementsByClassName('mapsContent')[0].innerHTML = (maps);}}});function popUpSet(etat, size, target, params) {var popUp = document.getElementById('popUp');if (etat === 1) {if (!popUp) {var popUp = document.createElement('div');popUp.setAttribute('id', 'popUp');popUp.setAttribute('class', 'popUp' + size.charAt(0).toUpperCase() + size.slice(1));popUpBlackout(1);document.body.insertBefore(popUp, document.body.firstChild);document.body.style.overflow = ('hidden');}xhr('POST','https://www.glm-reparations.fr/modules/pop_up/php.php','target=' + target + '¶ms=' + JSON.stringify(params),'popUpContent');} else if (etat === 0) {document.body.removeChild(popUp);document.body.style.overflow = ('auto');popUpBlackout(0);}}function popUpBlackout(etat) {var blackout = document.getElementById('blackout');if (etat === 1) {if (!blackout) {var blackout = document.createElement('div');blackout.setAttribute('id', 'blackout');blackout.addEventListener('click', popUpClose);document.body.insertBefore(blackout, document.body.firstChild);}} else if (etat === 0) {document.body.removeChild(blackout);}}function popUpClose(){popUpSet(0);}function popUpContent(data) {var popUp = document.getElementById('popUp');popUp.innerHTML = (data);var script = popUp.getElementsByTagName('script')[0];if (script) {var js = document.createElement('script');var jsData = document.createTextNode(script.innerText);js.setAttribute('nonce', 'ZAGxXHeySnrNuFObn9mUqw==');js.appendChild(jsData);popUp.removeChild(script);popUp.appendChild(js);}}window.addEventListener("load", function(){document.getElementsByClassName('cookiesButton')[0].addEventListener("click", function(){xhr('POST','https://www.glm-reparations.fr/modules/cookies/accept.php','','cookiesAccept');});});function cookiesAccept(){document.body.removeChild(document.getElementsByClassName('cookies')[0]);}window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'UA-178035540-1');