var oO={connect: function(oElem, sEvType, fn, bCapture){return document.addEventListener ? oElem.addEventListener(sEvType, fn, bCapture): oElem.attachEvent ? oElem.attachEvent('on' + sEvType, fn): false;},quelId: function(e){e=e||window.event;var el=e.srcElement;if (e.target)var el=e.target;else if (e.srcElement)var el=e.srcElement;if(!el.id.match("mdp_choiced")&&document.getElementById('other_mdp')!=null)document.getElementById('other_mdp').style.display='none';}};oO.connect(document, 'click', oO.quelId, false);function change_val_mdp(v, k, total){document.getElementById('mdp_choiced').innerHTML='
'+v+' 
';document.getElementById('other_mdp').style.display='none';if(total)sauve_mode(k, total);document.getElementById('mdp_choisi_hidd').value=k;for(i=0;i<5;i++){if(document.getElementById("mdp_"+i)!=null){if(document.getElementById("mdp_"+i).lang!=k)document.getElementById("mdp_"+i).style.background="#FFFFFF";else document.getElementById("mdp_"+i).style.background="#e6f2f6";}}}function afficher_fermer_combo(){first_affiche("","");if(document.getElementById('other_mdp').style.display=='')document.getElementById('other_mdp').style.display='none';else document.getElementById('other_mdp').style.display='';}function goAjax( page, data, Felement, contener, method ){method='post';var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else{alert("Your browser does not support XMLHTTPRequest objects");return;}xhr_object.onreadystatechange=function(){if(contener!="")document.getElementById(contener).innerHTML=' Please wait ...';Felement.disabled=true;if(xhr_object.readyState==4){Felement.disabled=false;document.getElementById(contener).innerHTML=xhr_object.responseText;$('.ddrop').dropkick({theme:'normal'});if(data.match('cloud'))initialise_proc_cloud(0); else if(data.match('serveurs'))initialise_proc(0);}else{Felement.disabled=true;}};if( method=='post' ){xhr_object.open("POST", page, true);xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");xhr_object.send( data + '&myRand=' + parseInt(Math.random()*99999999));};if( method=='get' ){xhr_object.open( "GET", page + '?' + data + '&myRand=' + parseInt(Math.random()*99999999), true );xhr_object.send( null );}}var wwwroot='https://www.heberjahiz.com/en-gb/';function colorer_footer(id_img,src){document.getElementById(id_img).src=src;}function decolorer_footer(id_img,src){document.getElementById(id_img).src=src;};function verif_form(){var erreur="";var type=document.getElementById("type1").value;var vous1=document.getElementById("vous1");var vous2=document.getElementById("vous2");var vous3=document.getElementById("vous3");var societe=document.getElementById("societe1").value;var nom=document.getElementById("nom1").value;var prenom=document.getElementById("prenom1").value;var tel=document.getElementById("indicatif").value+" "+document.getElementById("tel1").value;var fax=document.getElementById("fax1").value;var adresse=document.getElementById("adresse1").value.replace(/(\r\n|\n|\r)/gm," ");var email=document.getElementById("email1").value;var message=document.getElementById("message1").value.replace(/(\r\n|\n|\r)/gm," ");if(type==""){erreur +="Industry\n";}if(type=="Particulier"&&(nom==""||prenom=="")){if(nom=="")erreur +="Surname\n";if(prenom=="")erreur +="Name\n";}if(!vous1.checked&&!vous2.checked&&!vous3.checked){erreur +="Type\n";}if(type=="Société"&&societe==""){erreur +="Company \n";}if(document.getElementById("tel1").value==""||!document.getElementById("tel1").value.match("^[0-9]+$")){erreur +="Phone \n";}if(fax&&!fax.match("^[0-9]+$")){erreur +="Fax \n";}if(email.indexOf("@")=="-1"||email.indexOf(".")=="-1"||email==""){erreur +="Invalid email\n";}if(message==""){erreur +="Message ";}if(erreur){alert("Please check the fields below:\n"+erreur);return false;}else{for(var i =1 ;i<=3 ;i++){if(document.getElementById("vous"+i).checked){var vous=document.getElementById("vous"+i).value;break;}}document.getElementById("div_rappel").innerHTML ='
';var text=file("inc/ajax.php?action1=envoi_mail_con&type="+encodeURIComponent(type)+"&nom="+encodeURIComponent(nom)+"&prenom="+encodeURIComponent(prenom)+"&societe="+encodeURIComponent(societe)+"&tel="+encodeURIComponent(tel)+"&fax="+encodeURIComponent(fax)+"&email="+encodeURIComponent(email)+"&vous="+encodeURIComponent(vous)+"&adresse="+encodeURIComponent(adresse)+"&message="+encodeURIComponent(message)+"&var="+Math.random());if(text==1){del_charg();}else{erreur();}}}function del_charg(){document.getElementById(div_affect).innerHTML='
  Your request has been sent successfully
';setTimeout("window.location.reload();",3000);}function erreur(){document.getElementById(div_affect).innerHTML='
  Error sending email. Please try again later.
';setTimeout("window.location.reload();",3000);}function change_puce(){if(myInterval){var puce=document.getElementById("puce_chaine").src;if(puce.match("pause.png")){document.getElementById("puce_chaine").src="https://www.heberjahiz.com/en-gb/images/references/puce.png";go();}else{document.getElementById("puce_chaine").src="https://www.heberjahiz.com/en-gb/images/references/pause.png";stop();}}}