function demandemodifresa(D,G,E,F,B){jQuery.get("data/contactmodif.php?numero_resa="+D+"&agenceAller="+G+"&agenceRetour="+E+"&dateAller="+F+"&dateRetour="+B,function(H){jQuery(H).modal({close:false,overlayId:"contact-overlay",containerId:"contact-container",onOpen:A.open,onShow:A.show,onClose:A.close})});var C=["cancel.png","form_bottom.gif","form_top.gif","form_top_ie.gif","loading.gif","send.png"];jQuery(C).each(function(){var H=new Image();H.src="img/contact/"+this});var A={message:null,open:function(H){if(jQuery.browser.mozilla){jQuery("#contact-container .contact-button").css({"padding-bottom":"2px"})}if(jQuery.browser.safari){jQuery("#contact-container .contact-input").css({"font-size":".9em"})}var I=jQuery("#contact-container .contact-title").html();jQuery("#contact-container .contact-title").html("Chargement...");H.overlay.fadeIn(200,function(){H.container.fadeIn(200,function(){H.data.fadeIn(200,function(){jQuery("#contact-container .contact-content").animate({height:420},function(){jQuery("#contact-container .contact-title").html(I);jQuery("#contact-container form").fadeIn(200,function(){jQuery("#contact-container #contact-name").focus();if(jQuery.browser.msie&&jQuery.browser.version<7){jQuery("#contact-container .contact-button").each(function(){if(jQuery(this).css("backgroundImage").match(/^url[("']+(.*\.png)[)"']+jQuery/i)){var J=RegExp.jQuery1;jQuery(this).css({backgroundImage:"none",filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+J+'", sizingMethod="crop")'})}})}})})})})})},show:function(H){jQuery("#contact-container .contact-send").click(function(I){I.preventDefault();if(A.validate()){jQuery("#contact-container .contact-message").fadeOut(function(){jQuery("#contact-container .contact-message").removeClass("contact-error").empty()});jQuery("#contact-container .contact-title").html("Envoi en cours...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:"80px"},function(){jQuery("#contact-container .contact-loading").fadeIn(200,function(){jQuery.ajax({url:"data/contactmodif.php",data:jQuery("#contact-container form").serialize()+"&action=send",type:"post",cache:false,dataType:"html",complete:function(K){jQuery("#contact-container .contact-loading").fadeOut(200,function(){jQuery("#contact-container .contact-title").html("Merci!");jQuery("#contact-container .contact-message").html(K.responseText).fadeIn(200)})},error:A.error})})})}else{if(jQuery("#contact-container .contact-message:visible").length>0){var J=jQuery("#contact-container .contact-message div");J.fadeOut(200,function(){J.empty();A.showError();J.fadeIn(200)})}else{jQuery("#contact-container .contact-message").animate({height:"30px"},A.showError)}}})},close:function(H){jQuery("#contact-container .contact-message").fadeOut();jQuery("#contact-container .contact-title").html("Au revoir...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:40},function(){H.data.fadeOut(200,function(){H.container.fadeOut(200,function(){H.overlay.fadeOut(200,function(){jQuery.modal.close()})})})})},error:function(H){alert(H.statusText)},validate:function(){A.message="";if(!jQuery("#contact-container #contact-name").val()){A.message+="Nom obligatoire. "}var H=jQuery("#contact-container #contact-email").val();if(!H){A.message+="Email obligatoire. "}else{if(!A.validateEmail(H)){A.message+="Email incorrect. "}}if(!jQuery("#contact-container #contact-message").val()){A.message+="Message obligatoire."}if(A.message.length>0){return false}else{return true}},validateEmail:function(I){var H=I.lastIndexOf("@");if(H<1||(H+1)===I.length){return false}if(/(\.{2,})/.test(I)){return false}var J=I.substring(0,H);var K=I.substring(H+1);if(J.length<1||J.length>64||K.length<4||K.length>255){return false}if(/(^\.|\.$)/.test(J)||/(^\.|\.$)/.test(K)){return false}if(!/^"(.+)"$/.test(J)){if(!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(J)){return false}}if(!/^[-a-zA-Z0-9\.]*$/.test(K)||K.indexOf(".")===-1){return false}return true},showError:function(){jQuery("#contact-container .contact-message").html(jQuery('<div class="contact-error">').append(A.message)).fadeIn(200)}}}function demandedevispro(D,F,G,E,B){jQuery.get("data/contactpro.php?typepro="+D+"&nompro="+unescape(F)+"&prenompro="+unescape(G)+"&emailpro="+unescape(E)+"&telpro="+unescape(B),function(H){jQuery(H).modal({close:false,overlayId:"contact-overlay",containerId:"contact-container",onOpen:A.open,onShow:A.show,onClose:A.close})});var C=["cancel.png","form_bottom.gif","form_top.gif","form_top_ie.gif","loading.gif","send.png"];jQuery(C).each(function(){var H=new Image();H.src="img/contact/"+this});var A={message:null,open:function(H){if(jQuery.browser.mozilla){jQuery("#contact-container .contact-button").css({"padding-bottom":"2px"})}if(jQuery.browser.safari){jQuery("#contact-container .contact-input").css({"font-size":".9em"})}var I=jQuery("#contact-container .contact-title").html();jQuery("#contact-container .contact-title").html("Chargement...");H.overlay.fadeIn(200,function(){H.container.fadeIn(200,function(){H.data.fadeIn(200,function(){jQuery("#contact-container .contact-content").animate({height:580},function(){jQuery("#contact-container .contact-title").html(I);jQuery("#contact-container form").fadeIn(200,function(){jQuery("#contact-container #contact-name").focus();if(jQuery.browser.msie&&jQuery.browser.version<7){jQuery("#contact-container .contact-button").each(function(){if(jQuery(this).css("backgroundImage").match(/^url[("']+(.*\.png)[)"']+jQuery/i)){var J=RegExp.jQuery1;jQuery(this).css({backgroundImage:"none",filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+J+'", sizingMethod="crop")'})}})}})})})})})},show:function(H){jQuery("#contact-container .contact-send").click(function(I){I.preventDefault();if(A.validate()){jQuery("#contact-container .contact-message").fadeOut(function(){jQuery("#contact-container .contact-message").removeClass("contact-error").empty()});jQuery("#contact-container .contact-title").html("Envoi en cours...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:"80px"},function(){jQuery("#contact-container .contact-loading").fadeIn(200,function(){jQuery.ajax({url:"data/contactpro.php",data:jQuery("#contact-container form").serialize()+"&action=send",type:"post",cache:false,dataType:"html",complete:function(K){jQuery("#contact-container .contact-loading").fadeOut(200,function(){jQuery("#contact-container .contact-title").html("Merci!");jQuery("#contact-container .contact-message").html(K.responseText).fadeIn(200)})},error:A.error})})})}else{if(jQuery("#contact-container .contact-message:visible").length>0){var J=jQuery("#contact-container .contact-message div");J.fadeOut(200,function(){J.empty();A.showError();J.fadeIn(200)})}else{jQuery("#contact-container .contact-message").animate({height:"30px"},A.showError)}}})},close:function(H){jQuery("#contact-container .contact-message").fadeOut();jQuery("#contact-container .contact-title").html("Au revoir...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:40},function(){H.data.fadeOut(200,function(){H.container.fadeOut(200,function(){H.overlay.fadeOut(200,function(){jQuery.modal.close()})})})})},error:function(H){alert(H.statusText)},validate:function(){A.message="";if(!jQuery("#contact-container #contact-name").val()){A.message+="Nom obligatoire. "}var H=jQuery("#contact-container #contact-email").val();if(!H){A.message+="Email obligatoire. "}else{if(!A.validateEmail(H)){A.message+="Email incorrect. "}}if(!jQuery("#contact-container #contact-villedepart").val()){A.message+="Ville de d&eacute;part obligatoire."}else{if(!jQuery("#contact-container #contact-villeretour").val()){A.message+="Ville de retour obligatoire."}else{if(!jQuery("#contact-container #contact-datedepart").val()){A.message+="Date et heure de d&eacute;part obligatoire."}else{if(!jQuery("#contact-container #contact-dateretour").val()){A.message+="Date et heure de retour obligatoire."}else{if(!jQuery("#contact-container #contact-categorie").val()){A.message+="Cat&eacute;gorie du v&eacute;hicule obligatoire."}else{if(!jQuery("#contact-container #contact-nomconduct").val()){A.message+="Nom du conducteur obligatoire."}}}}}}if(A.message.length>0){return false}else{return true}},validateEmail:function(I){var H=I.lastIndexOf("@");if(H<1||(H+1)===I.length){return false}if(/(\.{2,})/.test(I)){return false}var J=I.substring(0,H);var K=I.substring(H+1);if(J.length<1||J.length>64||K.length<4||K.length>255){return false}if(/(^\.|\.$)/.test(J)||/(^\.|\.$)/.test(K)){return false}if(!/^"(.+)"$/.test(J)){if(!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(J)){return false}}if(!/^[-a-zA-Z0-9\.]*$/.test(K)||K.indexOf(".")===-1){return false}return true},showError:function(){jQuery("#contact-container .contact-message").html(jQuery('<div class="contact-error">').append(A.message)).fadeIn(200)}}}function demandedevis(M,T,E,F,L,C,S,H,R,O,I,K,A,J,B,N,U,G,D,P){jQuery.get("data/contact.php?nbjour="+M+"&categ="+T+"&modele="+E+"&agenceAller="+unescape(F)+"&agenceRetour="+unescape(L)+"&departement="+C+"&dateAller="+S+"&dateRetour="+H+"&AgeSelect="+R+"&OptSiege="+O+"&OptConductAdd="+I+"&OptRehausseur="+K+"&OptStf="+A+"&OptSCDW="+J+"&codepromo="+B+"&TotalTarif="+N+"&TotalPrepaid="+U+"&TotalTarifPromo="+G+"&proId="+D+"&proType="+P,function(W){jQuery(W).modal({close:false,overlayId:"contact-overlay",containerId:"contact-container",onOpen:Q.open,onShow:Q.show,onClose:Q.close})});var V=["cancel.png","form_bottom.gif","form_top.gif","form_top_ie.gif","loading.gif","send.png"];jQuery(V).each(function(){var W=new Image();W.src="img/contact/"+this});var Q={message:null,open:function(W){if(jQuery.browser.mozilla){jQuery("#contact-container .contact-button").css({"padding-bottom":"2px"})}if(jQuery.browser.safari){jQuery("#contact-container .contact-input").css({"font-size":".9em"})}var X=jQuery("#contact-container .contact-title").html();jQuery("#contact-container .contact-title").html("Chargement...");W.overlay.fadeIn(200,function(){W.container.fadeIn(200,function(){W.data.fadeIn(200,function(){jQuery("#contact-container .contact-content").animate({height:420},function(){jQuery("#contact-container .contact-title").html(X);jQuery("#contact-container form").fadeIn(200,function(){jQuery("#contact-container #contact-name").focus();if(jQuery.browser.msie&&jQuery.browser.version<7){jQuery("#contact-container .contact-button").each(function(){if(jQuery(this).css("backgroundImage").match(/^url[("']+(.*\.png)[)"']+jQuery/i)){var Y=RegExp.jQuery1;jQuery(this).css({backgroundImage:"none",filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+Y+'", sizingMethod="crop")'})}})}})})})})})},show:function(W){jQuery("#contact-container .contact-send").click(function(X){X.preventDefault();if(Q.validate()){jQuery("#contact-container .contact-message").fadeOut(function(){jQuery("#contact-container .contact-message").removeClass("contact-error").empty()});jQuery("#contact-container .contact-title").html("Envoi en cours...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:"80px"},function(){jQuery("#contact-container .contact-loading").fadeIn(200,function(){jQuery.ajax({url:"data/contact.php",data:jQuery("#contact-container form").serialize()+"&action=send",type:"post",cache:false,dataType:"html",complete:function(Z){jQuery("#contact-container .contact-loading").fadeOut(200,function(){jQuery("#contact-container .contact-title").html("Merci!");jQuery("#contact-container .contact-message").html(Z.responseText).fadeIn(200)})},error:Q.error})})})}else{if(jQuery("#contact-container .contact-message:visible").length>0){var Y=jQuery("#contact-container .contact-message div");Y.fadeOut(200,function(){Y.empty();Q.showError();Y.fadeIn(200)})}else{jQuery("#contact-container .contact-message").animate({height:"30px"},Q.showError)}}})},close:function(W){jQuery("#contact-container .contact-message").fadeOut();jQuery("#contact-container .contact-title").html("Au revoir...");jQuery("#contact-container form").fadeOut(200);jQuery("#contact-container .contact-content").animate({height:40},function(){W.data.fadeOut(200,function(){W.container.fadeOut(200,function(){W.overlay.fadeOut(200,function(){jQuery.modal.close()})})})})},error:function(W){alert(W.statusText)},validate:function(){Q.message="";if(!jQuery("#contact-container #contact-name").val()){Q.message+="Nom obligatoire. "}var W=jQuery("#contact-container #contact-email").val();if(!W){Q.message+="Email obligatoire. "}else{if(!Q.validateEmail(W)){Q.message+="Email incorrect. "}}if(Q.message.length>0){return false}else{return true}},validateEmail:function(X){var W=X.lastIndexOf("@");if(W<1||(W+1)===X.length){return false}if(/(\.{2,})/.test(X)){return false}var Y=X.substring(0,W);var Z=X.substring(W+1);if(Y.length<1||Y.length>64||Z.length<4||Z.length>255){return false}if(/(^\.|\.$)/.test(Y)||/(^\.|\.$)/.test(Z)){return false}if(!/^"(.+)"$/.test(Y)){if(!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(Y)){return false}}if(!/^[-a-zA-Z0-9\.]*$/.test(Z)||Z.indexOf(".")===-1){return false}return true},showError:function(){jQuery("#contact-container .contact-message").html(jQuery('<div class="contact-error">').append(Q.message)).fadeIn(200)}}};