﻿/* GENERE PAR PLUGIN BIGJEES - 31/01/12 15:16*/
var LAYER_FILTRE_AUCUN="popinFiltreNormal";var LAYER_FILTRE_CONCEPT="popinFiltreConcept";function ConfigProtectionUrl(b,a,c){this.url=b;this.typeFiltre=a;this.paramsFiltre=c;}var urlProtegees=new Array();var urlNonProtegees=new Array();function ajouterConfigProtectionUrl(c,b,d){var a=new ConfigProtectionUrl(c,b,d);urlProtegees[urlProtegees.length]=a;}function ajouterConfigDeprotectionUrl(a){urlNonProtegees[urlNonProtegees.length]=a;}function getConfigProtectionUrl(c){var a=null;var b=false;var d=0;while(!b&&(d<urlProtegees.length)){a=urlProtegees[d];var e=new RegExp(a.url);b=b||(c.indexOf(a.url)>=0)||e.test(c);d++;}if(!b){a=null;}return a;}function estURLNonProtegee(b){var a=false;var c=0;while(!a&&(c<urlNonProtegees.length)){a=a||(b.indexOf(urlNonProtegees[c])>=0);c++;}return a;}function ConfigGestionOnglet(a){this.url=a;}var urlOnglet=new Array();function ajouterConfigGestionOnglet(b){var a=new ConfigGestionOnglet(b);urlOnglet[urlOnglet.length]=a;}function getConfigGestionOnglet(c){var a=null;var b=false;var d=0;while(!b&&(d<urlOnglet.length)){a=urlOnglet[d];b=b||(c.indexOf(a.url)>=0);d++;}if(!b){a=null;}return a;}var tableauDesUrlSecurisees=new Array();function modifierUrlPourRedirectionSecuriseeOuNon(c){var f=false;var b;if(c.indexOf("javascript:")==0){return c;}if(c.indexOf(g_serverNonSSL)==0){c=c.substring(g_serverNonSSL.length,c.length);}else{if(c.indexOf(g_serverSSL)==0){c=c.substring(g_serverSSL.length,c.length);}else{if(c.substring(0,1)!="/"){return c;}}}for(var e=0;e<tableauDesUrlSecurisees.length;e++){var a=tableauDesUrlSecurisees[e].toString();var d=c.indexOf(a);if(d>=0){f=true;break;}}if(f){if(c.indexOf("/")>0){b=g_serverSSL+"/"+c;}else{b=g_serverSSL+c;}}else{if(c.indexOf("/")>0){b=g_serverNonSSL+"/"+c;}else{b=g_serverNonSSL+c;}}return b;}function ajouterConfigUrlSecurisee(a){tableauDesUrlSecurisees[tableauDesUrlSecurisees.length]=a;}var club={PREFIXE_CLASS_CLUB:"club_",categorieClubBebe:null,isLienClub:function(a){if((a!=null)&&(a.indexOf(this.PREFIXE_CLASS_CLUB)>=0)){return true;}return false;},getCategorieClubBebe:function(b){this.categorieClubBebe=null;var a=b.substring(this.PREFIXE_CLASS_CLUB.length,b.length);var e=false;if((g_contexte.client!=null)&&(g_contexte.client.clubs!=null)){var d=g_contexte.client.clubs;for(x=0;(x<d.length)&&!e;x++){var c=d[x];if(a==c.codeClub){this.categorieClubBebe=c.categorieClub;e=true;}}if(e&&(this.categorieClubBebe==null)){this.categorieClubBebe="NA";}}return this.categorieClubBebe;}};var analyseURL={PREFIXE_UNIVERS:"/univers+",PREFIXE_UNIVERS_REGEX:"/univers\\+",SUFFIXE_UNIVERS_CONCEPT:"+concept",SUFFIXE_UNIVERS_CONCEPT_REGEX:"\\+concept",urlAnalysee:"",isUrlUnivers:false,isUrlEspace:false,isUrlUniversConcept:false,isUrlUniversRayon:false,codeUnivers:"",codeEspace:"",PREFIXE_ESPACE_NORMAL:"/espace+",PREFIXE_CLUB_NORMAL:"/club+",PREFIXE_ESPACE_DIVERS:"/divers+",PREFIXE_ESPACE_MAGASIN:"/magasin",initClass:function(){this.urlAnalysee="";this.isUrlUnivers=false;this.isUrlUniversConcept=false;this.isUrlUniversRayon=false;this.codeUnivers="";this.isUrlEspace=false;this.codeEspace="";this.isUniversPhoto=false;this.isUrlClub=false;this.codeClub="";},analyseUnivers:function(d){this.initClass();this.urlAnalysee=d;var b=this.urlAnalysee.indexOf(this.PREFIXE_UNIVERS);if(b<0){this.isUrlUnivers=false;return false;}else{this.isUrlUnivers=true;}var c=this.urlAnalysee.substring(b+1);var a=c.indexOf(this.SUFFIXE_UNIVERS_CONCEPT);if(a<0){this.isUrlUniversConcept=false;this.isUrlUniversRayon=true;a=c.indexOf("/");if(a<0){a=c.indexOf("#");if(a<0){a=c.length;}}}else{this.isUrlUniversConcept=true;this.isUrlUniversRayon=false;}this.codeUnivers=c.substring(this.PREFIXE_UNIVERS.length-1,a);this.isUniversPhoto=(this.codeUnivers==g_contexte.codeUniversPhoto);return true;},analyseEspace:function(d){this.initClass();this.urlAnalysee=d;var c=this.urlAnalysee.indexOf(this.PREFIXE_ESPACE_NORMAL);if(c<0){c=this.urlAnalysee.indexOf(this.PREFIXE_ESPACE_MAGASIN);if(c<0){this.isUrlEspace=false;return false;}else{}}else{}this.isUrlEspace=true;var b=this.urlAnalysee.substring(c+1);var a=b.indexOf("/");if(a<0){a=b.length;}this.codeEspace=b.substring(0,a);if(this.codeEspace=="magasin"){this.codeEspace="espace-magasin";}return true;},analyseClub:function(d){this.initClass();this.urlAnalysee=d;var c=this.urlAnalysee.indexOf(this.PREFIXE_CLUB_NORMAL);if(c<0){this.isUrlClub=false;return false;}else{this.isUrlClub=true;}var b=this.urlAnalysee.substring(c+1);var a=b.indexOf("/");if(a<0){a=b.length;}this.codeClub=b.substring(0,a);return true;},debugMeUnivers:function(){alert("urlAnalysee="+this.urlAnalysee+"\nisUrlUnivers="+this.isUrlUnivers+"\nisUrlUniversConcept="+this.isUrlUniversConcept+"\nisUrlUniversRayon="+this.isUrlUniversRayon+"\ncodeUnivers="+this.codeUnivers);},debugMeEspace:function(){alert("urlAnalysee="+this.urlAnalysee+"\nisUrlEspace="+this.isUrlEspace+"\ncodeEspace="+this.codeEspace);},changeUrlUniversConceptRayon:function(c,e,a){var f="";var b="";
if(e){f="("+this.PREFIXE_UNIVERS_REGEX+a+")";b=this.PREFIXE_UNIVERS+a+this.SUFFIXE_UNIVERS_CONCEPT;}else{f="("+this.PREFIXE_UNIVERS_REGEX+a+this.SUFFIXE_UNIVERS_CONCEPT_REGEX+")";b=this.PREFIXE_UNIVERS+a;}var d=new RegExp(f,"g");return c.replace(d,b);},changeUrlUnivers:function(d,a,c){var g="";var b="";g="("+this.PREFIXE_UNIVERS_REGEX+a+")";b=this.PREFIXE_UNIVERS+c;var e=new RegExp(g,"g");var f=d.replace(e,b);return f;}};function afficherLayerChoixMagasin(a,c,b,e,h,d){var g=b;var f=e;if((g==null)&&(a!=null)){g=a.typeFiltre;}if((f==null)&&(a!=null)){f=a.paramsFiltre;}if((g=="popinFiltreAucun")||(g=="popinRechercheMagasin")){openPopin("#popinRechercheMagasin",960,390);}else{if(g=="popinFiltreUnivers"){openPopin("#popinChoixMagUnivers",960,390);}else{if(g=="popinFiltreConcept"){openPopin("#popinChoixMagConcept",960,390);}else{if(g=="popinFiltreCatalogue"){openPopin("#popinChoixMagCatalogue",960,390);}else{if(g=="popinFiltreOP"){openPopin("#popinChoixMagOP",960,390);}else{if(g=="popinFiltreProduitOP"){openPopin("#popinChoixMagOP",960,390);}}}}}}initializeLayerMagasin(c,g,f,h,d);return false;}function changerMagasinCourant(){var a=window.location.href;analyseURL.analyseUnivers(a);if(analyseURL.isUrlUnivers){afficherLayerChoixMagasin(null,a,"popinFiltreAucun",null,null,null);}else{afficherLayerChoixMagasin(null,"magasinHome","popinFiltreAucun",null,null,null);}return false;}var gIsProduitMagasin=false;function appelerLien(f,n,h,s,b,l){var o=true;var d=f.href;d=modifierUrlPourRedirectionSecuriseeOuNon(d);if(club.isLienClub(b)){var k=club.getCategorieClubBebe(b);if(k==null){faireRedirection(g_urlHomeMesClubs);return false;}else{if(k=="JP"){faireRedirection(g_urlJeuneParent);return false;}else{if(k=="FP"){faireRedirection(g_urlFuturParent);return false;}}}}var i=getConfigProtectionUrl(d);if((i!=null)&&(i.typeFiltre=="popinFiltreProduitOP")){var p=d.lastIndexOf(",");if(p!=-1){var j=d.substring(p+1);var e=j.lastIndexOf("#");if(e!=-1){j=j.substring(0,e);}}var r=d.indexOf("/univers+");var m;if(r!=-1){var q=d.substring(r+9);var a=q.indexOf("/");m=q.substring(0,a);}i.paramsFiltre=j;if((g_contexte==null)||(g_contexte.magasin==null)){o=afficherLayerChoixMagasin(i,d,n,h);}else{if((l==undefined)||(l==null)||(l!="1")){controlerProduitAppartientMagasin(g_contexte.magasin.codePanonceau,j,m);if(gIsProduitMagasin==false){o=afficherLayerChoixMagasin(i,d,n,h);}else{o=true;}}}}else{if((g_contexte==null)||(g_contexte.magasin==null)){if(n=="popinFiltreCatalogue"){o=afficherLayerChoixMagasin(null,d,n,h);}else{if(n=="popinFiltreConcept"){o=afficherLayerChoixMagasin(null,d,n,h,null,b);}else{if(i!=null){if(!estURLNonProtegee(d)){o=afficherLayerChoixMagasin(i,d,n,h,s);}else{}}}}}else{if((g_contexte.magasin!=null)&&(window.location.pathname.indexOf("/univers+photo")>=0)&&(d.indexOf("/magasin/")==-1)){retournerUrlPrestataire(g_contexte.magasin.codePanonceau,"photo");s="";window.open(paramsLayer.urlCible);window.location="/magasin/"+g_contexte.magasin.nomUrl;return false;}else{o=true;var g=h;var c=g_contexte.magasin.codePanonceau;if(n=="popinFiltreCatalogue"){if(s==""){recupererLienFlash(c,g);}else{afficher_Catalogue(s,"Catalogue");}}}}}if(o){g_ongletsUnivers.traiterUrlUnivers(d);}else{}f.href=d;return o;}var _catalogue_url_src;var _iframe_hauteur=697;var _iframe_largeur=1020;function afficher_Catalogue(a,b){_catalogue_url_src=a;openPopin("#popinPAF",_iframe_largeur,_iframe_hauteur,false,true);$(window).resize();}function afterOpenPopin_popinPAF(){$("#popinPAF .popinContent").append("<iframe id='iframePopinPAF' width='100%' height='100%' frameborder='0'></iframe>");$("#iframePopinPAF").css("display","inline");$("#iframePopinPAF").height(_iframe_hauteur);$("#iframePopinPAF").width(_iframe_largeur);$("#iframePopinPAF").attr("src",_catalogue_url_src);}function afterClosePopin_popinPAF(){$("#popinPAF").css("display","none");$("#iframePopinPAF").remove();}function onSuccessRecupererLienFlash(){var b=this.getData();var a=b.lienFlash;var c=b.numeroPage;if((c!=null)&&(c!="null")){a=a+"?page="+c;}afficher_Catalogue(a,"Catalogue");}function onErrorRecupererLienFlash(){alert(erreurRechSocleMagLayerMag);}function onSuccessProduitAppartientMagasin(){var a=this.getData();gIsProduitMagasin=a.isProduitMagasin;}function onErrorProduitAppartientMagasin(){alert(erreurRechSocleMagLayerMag);}function controlerProduitAppartientMagasin(c,a,b){var e=new Array(3);e[0]=new Array(2);e[0][0]="codePanonceauMagasin";e[0][1]=c;e[1]=new Array(2);e[1][0]="techIdProduit";e[1][1]=a;e[2]=new Array(2);e[2][0]="codeUnivers";e[2][1]=b;var d=null;d=new AjaxInvoker(prefixeUrlSocleMag+"produitop_produit_appartient_magasin.action",e,false,onSuccessProduitAppartientMagasin,onErrorProduitAppartientMagasin);d.query();}function recupererLienFlash(b,a,e){var d=new Array(3);d[0]=new Array(2);d[0][0]="codePanonceau";d[0][1]=b;d[1]=new Array(2);d[1][0]="codeOperation";d[1][1]=a;d[2]=new Array(3);d[2][0]="numeroPage";d[2][1]=null;if((e!=undefined)&&(e!=null)&&(e!="")&&(e!="null")){d[2][1]=e;}var c=null;
c=new AjaxInvoker(prefixeUrlSocleMag+"operation_recuperer_lien_flash.action",d,true,onSuccessRecupererLienFlash,onErrorRecupererLienFlash);c.query();}function redirectionLienAvecJeton(b){if(g_contexte.client!=null){var c=new Array(1);c[0]=new Array(2);c[0][0]="urlAvecJetonSSO";c[0][1]=b;var a=new AjaxInvoker(prefixeUrlSocleClient+"genere_jeton_sso.action",c,true,onSuccessRedirectionLienAvecJeton,onErrorRedirectionLienAvecJeton,false,false,false,true);a.query();}else{window.open(b);}}function onSuccessRedirectionLienAvecJeton(){var a=this.getData();if((a!=null)&&(a.urlAvecJetonSSO!=null)){window.open(a.urlAvecJetonSSO);}}function onErrorRedirectionLienAvecJeton(){}_configChargee=true;var map;var paramsLayer=$.parseJSON("{}");var latitudeInit="47.0842";var longitudeInit="2.3955";var magasinsLayer;var magasinsAutresLayer;var markersLayer;var bulleInfo;var bRedirectLayer=false;var addressToShow=null;var posDansTabCourantShared=0;var codeOperation=null;var _googlemaplib="https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false";var _urlCible;var _typeFiltreAUtiliser;var _paramsFiltreAUtiliser;var _target;var _className;var offres;function initializeLayerMagasin(a,e,c,d,b){_urlCible=a;_typeFiltreAUtiliser=e;_paramsFiltreAUtiliser=c;_target=d;_className=b;$(document).ready(function(){var f=document.getElementsByTagName("script");var j=false;for(var h=0;h<f.length;h++){var g=f[h];if(g.src.indexOf(_googlemaplib)!=-1){j=true;break;}}if(j){initializeLayerMagasinAsynchrone();}else{var g=document.createElement("script");g.type="text/javascript";var k=_googlemaplib+"&callback=initializeLayerMagasinAsynchrone";g.src=k;document.body.appendChild(g);}});}function initializeLayerMagasinAsynchrone(){var a=_urlCible;var d=_typeFiltreAUtiliser;var f=_paramsFiltreAUtiliser;var g=_target;var h=_className;bulleInfo=new google.maps.InfoWindow();paramsLayer.urlCible=a;paramsLayer.typeFiltreAUtiliser=d;paramsLayer.paramsFiltreAUtiliser=f;codeOperation=f;analyseURL.analyseUnivers(a);paramsLayer.urlCible=a;paramsLayer.isUrlUnivers=analyseURL.isUrlUnivers;paramsLayer.isUrlUniversConcept=analyseURL.isUrlUniversConcept;paramsLayer.isUrlUniversRayon=analyseURL.isUrlUniversRayon;paramsLayer.isUniversPhoto=analyseURL.isUniversPhoto;paramsLayer.codeUnivers=analyseURL.codeUnivers;paramsLayer.target=g;$("#popinRechercheMagasin .gmaps .zone_map").attr("id","");$("#popinChoixMagUnivers .gmaps .zone_map").attr("id","");$("#popinChoixMagConcept .gmaps .zone_map").attr("id","");$("#popinChoixMagCatalogue .gmaps .zone_map").attr("id","");$("#popinIdentifie .gmaps .zone_map").attr("id","");$("#popinChoixMagClient .gmaps .zone_map").attr("id","");if(h=="useParamsFiltreAUtiliser"){paramsLayer.codeUnivers=f;}if(d=="popinFiltreAucun"){$("#popinRechercheMagasin #adressesSelection ul li").remove();$("#popinRechercheMagasin #currentMag div").html("");$("#popinRechercheMagasin #rechercheMagasin").val("");$("#popinRechercheMagasin li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinRechercheMagasin .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreUnivers"){$("#popinChoixMagUnivers #adresse ul li").remove();$("#popinChoixMagUnivers #currentMag div").html("");$("#popinChoixMagUnivers #rechercheMagUnivers").val("");$("#popinChoixMagUnivers li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});if(paramsLayer.isUrlUniversConcept==true){$("#popinClassChoixMagUnivers").removeClass();$("#popinClassChoixMagUnivers").addClass("gmaps gmapsEnseignes "+paramsLayer.codeUnivers);}$("#popinChoixMagUnivers .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreConcept"){$("#popinChoixMagConcept #adresse ul li").remove();$("#popinChoixMagConcept .autres ul li").remove();$("#popinChoixMagConcept #currentMag div").html("");$("#popinChoixMagConcept #rechercheMagConcept").val("");$("#popinChoixMagConcept li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinClassChoixMagConcept").removeClass();$("#popinClassChoixMagConcept").addClass("gmaps gmapsEnseignes "+paramsLayer.codeUnivers);$("#popinChoixMagConcept .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreCatalogue"){$("#popinChoixMagCatalogue #adresse ul li").remove();$("#popinChoixMagCatalogue #currentMag div").html("");$("#popinChoixMagCatalogue #rechercheMagCatalogue").val("");$("#popinChoixMagCatalogue #adresse li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinChoixMagCatalogue .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreOP"){$("#popinChoixMagOP #adresse ul li").remove();$("#popinChoixMagOP #currentMag div").html("");$("#popinChoixMagOP #rechercheMagOP").val("");$("#popinChoixMagOP #adresse li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinChoixMagOP .gmaps .zone_map").attr("id","gmapsCarte");
}else{if(d=="popinFiltreProduitOP"){$("#popinChoixMagOP #adresse ul li").remove();$("#popinChoixMagOP#currentMag div").html("");$("#popinChoixMagOP #rechercheMagOP").val("");$("#popinChoixMagOP #adresse li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinChoixMagOP .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreClientIdentifie"){$("#popinIdentifie #adresse").css("display","none");$("#popinIdentifie .hrHorizontal").css("display","none");$("#popinIdentifie #adresse ul li").remove();$("#popinIdentifie #currentMag div").html("");$("#popinIdentifie #rechercheIdentifie").val("");$("#popinIdentifie #adresse li a").live("hover",function(){var j=$(this).parent().find(".posDansTab").val();synchroInfosEtMap(j);});$("#popinIdentifie .gmaps .zone_map").attr("id","gmapsCarte");}else{if(d=="popinFiltreClient"){if(videSiNull(addressToShow)==""){$("#popinChoixMagClient #adresse").css("display","none");$("#popinChoixMagClient .hrHorizontal").css("display","none");}else{$("#popinChoixMagClient #adresse").css("display","block");$("#popinChoixMagClient .hrHorizontal").css("display","block");$("#popinChoixMagClient #rechercheMagClient").val(addressToShow);}$("#popinChoixMagClient #adresse ul li").remove();if(!(($("#magasin #magProche")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS").val()!=undefined)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS").val()!=""))){$("#popinChoixMagClient #currentMag div").html("");}$("#popinChoixMagClient .gmaps .zone_map").attr("id","gmapsCarte");$("#popinChoixMagClient #adresse li a").live("hover",function(){synchroInfosEtMap(posDansTabCourantShared);});}}}}}}}}if(videSiNull(addressToShow)==""){var b=new google.maps.LatLng(latitudeInit,longitudeInit);var i={zoom:5,center:b,mapTypeId:google.maps.MapTypeId.ROADMAP};map=new google.maps.Map(document.getElementById("gmapsCarte"),i);if(($("#magasin #magProche")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS")!=null)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS").val()!=undefined)&&($("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS").val()!="")){var c=$("#magasin #magProche #liMagasinLayerMagClient_0 .latitudeGPS").val();var e=$("#magasin #magProche #liMagasinLayerMagClient_0 .longitudeGPS").val();rechercherAdresseGoogle(true,c,e);}}else{rechercherAdresseGoogle();if(!leMagasinEstChoisi){synchroInfosEtMap(posDansTabCourantShared);}}}function synchroInfosEtMap(a){if(a==null){return;}if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){var b=$("#popinRechercheMagasin #adresse #liMagasinLayerMag_"+a+" div").html();$(" #popinRechercheMagasin .classPopinRechercheMagasin div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){var b=$("#popinChoixMagUnivers #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagUnivers .classPopinChoixMagUnivers div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){var b=$("#popinChoixMagConcept #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagConcept .classPopinChoixMagConcept div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){var b=$("#popinChoixMagCatalogue #adresse #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagCatalogue .classPopinChoixMagCatalogue div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){var b=$("#popinChoixMagOP #adresse #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagOP .classPopinChoixMagOP div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){var b=$("#popinChoixMagOP #adresse #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagOP .classPopinChoixMagOP div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientIdentifie"){var b=$("#popinIdentifie #adresse #liMagasinLayerMag_"+a+" div").html();$("#popinIdentifie .classPopinIdentifie div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClient"){var b=$("#popinChoixMagClient #adresse #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagClient .classPopinChoixMagClient div").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientFragment"){var b=$("#magasin #magProche #liMagasinLayerMag_"+a+" div").html();$("#currentMag div").html(b);}}}}}}}}}bulleInfo.close();bulleInfo.setContent(b);bulleInfo.open(map,markersLayer[a]);}function majGoogleMaps(b,c){var d=new google.maps.LatLng(b,c);var a={zoom:10,center:d,mapTypeId:google.maps.MapTypeId.ROADMAP};map=new google.maps.Map(document.getElementById("gmapsCarte"),a);}function markMagasin(c,b){var d=new google.maps.LatLng(c.coordonnee.latitudeGPS,c.coordonnee.longitudeGPS);var a=new google.maps.Marker({position:d,map:map,title:videSiNull(c.nom),icon:imageMarkerLeclerc,content:b});
google.maps.event.addListener(a,"click",function(){synchroInfosEtMap(this.content);});return a;}function selectionnerCatalogue(){var a=null;a=$("#popinChoixMagCatalogue #currentMag .posDansTab").val();if((a==null)||(a==undefined)){return false;}var b=magasinsLayer[a];g_contexte.magasin=new ContexteMagasin(b.techid,b.codePanonceau,b.nom,b.nomNormalise,b.delegationCentrale,b.codeInsee);cookiesSite.saveMagasinCourant(b.nomNormalise);$.cookie("PAFcodePanonceau",b.codePanonceau,{path:"/",domain:_domainSiteELeclerc,secure:false,expires:1});$.cookie("PAFcodeOperation",codeOperation,{path:"/",domain:_domainSiteELeclerc,secure:false,expires:1});redirigerVersEspaceMagasin(false);return false;}function selectionnerMagasin(){var a=null;var c=null;if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){a=$("#popinRechercheMagasin #currentMag .posDansTab").val();}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){a=$("#popinChoixMagUnivers #currentMag .posDansTab").val();}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){a=$("#popinChoixMagConcept #currentMag .posDansTab").val();}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){a=$("#popinChoixMagCatalogue #currentMag .posDansTab").val();}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){a=$("#popinChoixMagOP #currentMag .posDansTab").val();}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){a=$("#popinChoixMagOP #currentMag .posDansTab").val();}}}}}}if((a==null)||(a==undefined)){return false;}if(a>=5){var c=magasinsAutresLayer[a-5];}else{var c=magasinsLayer[a];}if(paramsLayer.isUrlUnivers||((cookiesSite.getMagasinCourant()!="")&&(paramsLayer.urlCible=="magasinHome"))){if(paramsLayer.isUniversPhoto){retournerUrlPrestataire(c.codePanonceau,paramsLayer.codeUnivers);}else{lireOffreMagasin(c.techid);paramsLayer.urlCible=g_miseAjourCookiesUnivers.refreshCookiesUnivers(offres,paramsLayer.urlCible);}}g_contexte.magasin=new ContexteMagasin(c.techid,c.codePanonceau,c.nom,c.nomNormalise,true,null);cookiesSite.saveMagasinCourant(c.nomNormalise);var b=window.location;if((paramsLayer.urlCible.indexOf("espace+magasin")>=0)&&(c!=null)){paramsLayer.urlCible=paramsLayer.urlCible.replace("espace+magasin","magasin/"+c.nomNormalise);}if((b.pathname.indexOf("/univers+photo")>=0)&&(c!=null)){b=b.href.substring(0,b.href.length-b.pathname.length)+"/magasin/"+c.nomNormalise;}if((paramsLayer.target=="blank")||(paramsLayer.target=="_blank")){if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){$("#btnRentrerRechercheMagasin").attr("href",b);$("#liMagasinLayerMag_"+a+" a").attr("href",b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){$("#btnRentrerMagUnivers").attr("href",b);$("#popinChoixMagUnivers #liMagasinLayerMag_"+a+" a").attr("href",b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){$("#popinChoixMagConcept #btnRentrerConcept").attr("href",b);$("#popinChoixMagConcept #liMagasinLayerMag_"+a+" a").attr("href",b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){$("#popinChoixMagCatalogue #btnRentrerMagCatalogue").attr("href",b);$("#popinChoixMagCatalogue #liMagasinLayerMag_"+a+" a").attr("href",b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){$("#popinChoixMagOP #btnRentrerMagOP").attr("href",b);$("#popinChoixMagOP #liMagasinLayerMag_"+a+" a").attr("href",b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){$("#popinChoixMagOP #btnRentrerMagOP").attr("href",b);$("#popinChoixMagOP #liMagasinLayerMag_"+a+" a").attr("href",b);}}}}}}window.open(paramsLayer.urlCible);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){if(paramsLayer.urlCible=="magasinHome"){$("#popinRechercheMagasin #btnRentrerRechercheMagasin").attr("href","/magasin/"+c.nomNormalise);$("#popinRechercheMagasin #liMagasinLayerMag_"+a+" a").attr("href","/magasin/"+c.nomNormalise);}else{$("#popinRechercheMagasin #btnRentrerRechercheMagasin").attr("href",paramsLayer.urlCible);$("#popinRechercheMagasin #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){if(paramsLayer.urlCible=="magasinHome"){$("#popinChoixMagUnivers #btnRentrerMagUnivers").attr("href","/magasin/"+c.nomNormalise);$("#popinChoixMagUnivers #liMagasinLayerMag_"+a+" a").attr("href","/magasin/"+c.nomNormalise);}else{$("#popinChoixMagUnivers #btnRentrerMagUnivers").attr("href",paramsLayer.urlCible);$("#popinChoixMagUnivers #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){if(a>=5){$("#popinChoixMagConcept #btnRentrerConcept").attr("href","/magasin/"+c.nomNormalise);$("#popinChoixMagConcept #liMagasinLayerMag_"+a+" a").attr("href","/magasin/"+c.nomNormalise);}else{$("#popinChoixMagConcept #btnRentrerConcept").attr("href",paramsLayer.urlCible);$("#popinChoixMagConcept #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){$("#popinChoixMagCatalogue #btnRentrerMagCatalogue").attr("href",paramsLayer.urlCible);
$("#popinChoixMagCatalogue #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){$("#popinChoixMagOP #btnRentrerMagOP").attr("href",paramsLayer.urlCible);$("#popinChoixMagOP #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){$("#popinChoixMagOP #btnRentrerMagOP").attr("href",paramsLayer.urlCible);$("#popinChoixMagOP #liMagasinLayerMag_"+a+" a").attr("href",paramsLayer.urlCible);}}}}}}}return true;}function entrerDansMagasin(b){var a=$(b).parent().find(".posDansTab").val();if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){var e=$("#popinChoixMagOP .autres #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagOP .classPopinChoixMagOP div").html(e);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){var e=$("#popinChoixMagOP .autres #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagOP .classPopinChoixMagOP div").html(e);}else{var e=$("#popinChoixMagCatalogue .autres #liMagasinLayerMag_"+a+" div").html();$("#popinChoixMagCatalogue .classPopinChoixMagCatalogue div").html(e);}}var c=""+paramsLayer.urlCible;var d=c.indexOf("#");paramsLayer.urlCible=c.substring(0,d)+"espace+magasin";return selectionnerMagasin();}function onSuccessRechercherMagasinGPS(){var h=0;var g=this.getData();var l=g.magasins;var m=g.magasinsAutres;var b="";var n="";var p="";var d="";var o="";markersLayer=new Array();if(l==null){magasinsLayer=null;}else{magasinsLayer=l;magasinsAutresLayer=m;var a=0;if(l.length>5){a=5;}else{a=l.length;}if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){o="selectionnerCatalogue();";}else{o="selectionnerMagasin();";}for(h;h<a;h++){b+="<li id='liMagasinLayerMag_"+h+"'><a href='#' onclick='return "+o+"'>"+videSiNull(magasinsLayer[h].coordonnee.codePostal)+" "+videSiNull(magasinsLayer[h].nom)+"</a>";n="";n+="<div>";n+="<h3>"+videSiNull(magasinsLayer[h].nom)+"</h3>";n+=videSiNull(magasinsLayer[h].coordonnee.numeroVoie)+" "+videSiNull(magasinsLayer[h].coordonnee.voie)+"<br/>";n+=videSiNull(magasinsLayer[h].coordonnee.codePostal)+" "+videSiNull(magasinsLayer[h].coordonnee.ville);n+="<br/><br/><strong>"+aujourdhuiLayerMag+" "+dateDuJour_ddmoisyyyy()+"</strong><br/>";var c=getHorairesJournee(magasinsLayer[h].horairesExceptionnels,magasinsLayer[h].horairesMagasins,magasinsLayer[h].fermetures,0);if(c!=null){n+=determineHoraires(c,separateurHoraireLayerMag,separateurPaireHeuresLayerMag,separateur2HorairesLayerMag,etatOuvertLayerMag,etatFermeLayerMag)+"<br/>";}n+="<input type='hidden' class='posDansTab' value='"+h+"'/>";n+="</div>";b+=n;b+="</li>";markersLayer[h]=markMagasin(magasinsLayer[h],h);}}if(m==null){magasinsAutresLayer=null;}else{magasinsAutresLayer=m;if(m.length>5){a=5;}else{a=m.length;}var f=5;for(h=0;h<a;h++){p+="<li id='liMagasinLayerMag_"+f+"'><a href='#' onclick='return entrerDansMagasin($(this))'>"+videSiNull(magasinsAutresLayer[h].coordonnee.codePostal)+" "+videSiNull(magasinsAutresLayer[h].nom)+"</a>";d="";d+="<div>";d+="<h3>"+videSiNull(magasinsAutresLayer[h].nom)+"</h3>";d+=videSiNull(magasinsAutresLayer[h].coordonnee.numeroVoie)+" "+videSiNull(magasinsAutresLayer[h].coordonnee.voie)+"<br/>";d+=videSiNull(magasinsAutresLayer[h].coordonnee.codePostal)+" "+videSiNull(magasinsAutresLayer[h].coordonnee.ville);d+="<br/><br/><strong>"+aujourdhuiLayerMag+" "+dateDuJour_ddmoisyyyy()+"</strong><br/>";var c=getHorairesJournee(magasinsAutresLayer[h].horairesExceptionnels,magasinsAutresLayer[h].horairesMagasins,magasinsAutresLayer[h].fermetures,0);if(c!=null){n+=determineHoraires(c,separateurHoraireLayerMag,separateurPaireHeuresLayerMag,separateur2HorairesLayerMag,etatOuvertLayerMag,etatFermeLayerMag)+"<br/>";}d+=determineHoraires(c,separateurHoraireLayerMag,separateurPaireHeuresLayerMag,separateur2HorairesLayerMag,etatOuvertLayerMag,etatFermeLayerMag)+"<br/>";d+="<input type='hidden' class='posDansTab' value='"+f+"'/>";d+="</div>";p+=d;p+="</li>";markersLayer[f]=markMagasin(magasinsAutresLayer[h],h);f=f+1;}}if((l==null)&&(m==null)){alert(aucunMagasinLayerMag);}if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){$("#popinRechercheMagasin #adressesSelection ul li").remove();$("#popinRechercheMagasin #adressesSelection ul").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){$("#popinChoixMagUnivers #adresse ul li").remove();$("#popinChoixMagUnivers #adresse ul").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){$("#popinChoixMagConcept #adresse ul li").remove();$("#popinChoixMagConcept .autres ul li").remove();$("#popinChoixMagConcept #adresse ul").html(b);$("#popinChoixMagConcept .autres ul").html(p);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){$("#popinChoixMagCatalogue #adresse ul li").remove();$("#popinChoixMagCatalogue .autres ul li").remove();$("#popinChoixMagCatalogue #adresse ul").html(b);$("#popinChoixMagCatalogue .autres ul").html(p);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){$("#popinChoixMagOP #adresse ul li").remove();
$("#popinChoixMagOP .autres ul li").remove();$("#popinChoixMagOP #adresse ul").html(b);$("#popinChoixMagOP .autres ul").html(p);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){$("#popinChoixMagOP #adresse ul li").remove();$("#popinChoixMagOP .autres ul li").remove();$("#popinChoixMagOP #adresse ul").html(b);$("#popinChoixMagOP .autres ul").html(p);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientIdentifie"){$("#popinIdentifie #adresse ul li").remove();$("#popinIdentifie .autres ul li").remove();$("#popinIdentifie #adresse ul").html(b);$("#popinIdentifie .autres ul").html(p);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClient"){miseAJourListeMagasinClient(l);$("#popinChoixMagClient #adresse ul li").remove();$("#popinChoixMagClient #adresse ul").html(b);}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientFragment"){miseAJourListeMagasinClient(l);return;}}}}}}}}}if(l!=null){try{synchroInfosEtMap(posDansTabCourantShared);}catch(k){}}}function onErrorRechercherMagasinGPS(){alert(erreurRechSocleMagLayerMag);}var _latitudeCherchee;var _longitudeCherchee;function rechercherMagasinGPS(b,a){_latitudeCherchee=b;_longitudeCherchee=a;$(document).ready(function(){var c=document.getElementsByTagName("script");var f=false;for(var e=0;e<c.length;e++){var d=c[e];if(d.src.indexOf(_googlemaplib)!=-1){f=true;break;}}if(f){rechercherMagasinGPSAsynchrone();}else{var d=document.createElement("script");d.type="text/javascript";var g=_googlemaplib+"&callback=rechercherMagasinGPSAsynchrone";d.src=g;document.body.appendChild(d);}});}function rechercherMagasinGPSAsynchrone(){var g=_latitudeCherchee;var d=_longitudeCherchee;if(paramsLayer.typeFiltreAUtiliser!="popinFiltreClientFragment"){majGoogleMaps(g,d);}var f;var e=0;switch(paramsLayer.typeFiltreAUtiliser){case"popinFiltreConcept":f=new Array(5);f[e]=new Array(2);f[e][0]="codeUnivers";f[e][1]=paramsLayer.codeUnivers;e=e+1;f[e]=new Array(2);f[e][0]="estConcept";f[e][1]=true;e=e+1;f[e]=new Array(2);f[e][0]="techIdProduit";f[e][1]="";e=e+1;break;case"popinFiltreCatalogue":f=new Array(4);f[e]=new Array(2);f[e][0]="codeOperation";f[e][1]=paramsLayer.paramsFiltreAUtiliser;e=e+1;f[e]=new Array(2);f[e][0]="techIdProduit";f[e][1]="";e=e+1;break;case"popinFiltreOP":f=new Array(4);f[e]=new Array(2);f[e][0]="codeOperation";f[e][1]=paramsLayer.paramsFiltreAUtiliser;e=e+1;f[e]=new Array(2);f[e][0]="techIdProduit";f[e][1]="";e=e+1;break;case"popinFiltreProduitOP":f=new Array(3);f[e]=new Array(2);f[e][0]="techIdProduit";f[e][1]=paramsLayer.paramsFiltreAUtiliser;e=e+1;break;case"popinRechercheMagasin":case"popinFiltreUnivers":case"popinFiltreAucun":case"popinFiltreClientIdentifie":case"popinFiltreClient":case"popinFiltreClientFragment":default:f=new Array(3);f[e]=new Array(2);f[e][0]="techIdProduit";f[e][1]="";e=e+1;break;}f[e]=new Array(2);f[e][0]="latitudeGPS";var c=""+g;f[e][1]=c.replace(".",",");e=e+1;f[e]=new Array(2);f[e][0]="longitudeGPS";var b=""+d;f[e][1]=b.replace(".",",");e=e+1;var a=null;a=new AjaxInvoker(prefixeUrlSocleMag+"magasin_rechercher_gps.action",f,true,onSuccessRechercherMagasinGPS,onErrorRechercherMagasinGPS);a.query();}function onSuccessLireOffreMagasin(){var a=0;var b=this.getData();if(b==null){return;}offres=b.offres;if(offres!=null){for(a;a<offres.length;a++){if(offres[a].univers.code==paramsLayer.codeUnivers){if((offres[a].techid!=null)&&(offres[a].estConcept!=null)){if(offres[a].estConcept&&!paramsLayer.isUrlUniversConcept){paramsLayer.urlCible=analyseURL.changeUrlUniversConceptRayon(paramsLayer.urlCible,true,paramsLayer.codeUnivers);return;}if(!offres[a].estConcept&&paramsLayer.isUrlUniversConcept){paramsLayer.urlCible=analyseURL.changeUrlUniversConceptRayon(paramsLayer.urlCible,false,paramsLayer.codeUnivers);return;}}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){paramsLayer.urlCible="magasinHome";}return;}}}}}function onErrorLireOffreMagasin(){alert(erreurRechSocleOffreLayerMag);}function lireOffreMagasin(b){var c=new Array(1);c[0]=new Array(2);c[0][0]="techidMagasin";c[0][1]=b;var a=null;a=new AjaxInvoker(prefixeUrlSocleMag+"offre_lister.action",c,false,onSuccessLireOffreMagasin,onErrorLireOffreMagasin);a.query();}var _isInitPopinClientSurGPS;var _latitudePopinClientSurGPS;var _longitudePopinClientSurGPS;function rechercherAdresseGoogle(a,f,e){var b=a;var d=f;var c=e;$(document).ready(function(){var g=document.getElementsByTagName("script");var k=false;for(var j=0;j<g.length;j++){var h=g[j];if(h.src.indexOf(_googlemaplib)!=-1){k=true;break;}}if(k){rechercherAdresseGoogleAsynchrone();}else{var h=document.createElement("script");h.type="text/javascript";var l=_googlemaplib+"&callback=rechercherAdresseGoogleAsynchrone";h.src=l;document.body.appendChild(h);}});}function rechercherAdresseGoogleAsynchrone(){var a=_isInitPopinClientSurGPS;var d=_latitudePopinClientSurGPS;var c=_longitudePopinClientSurGPS;if(paramsLayer.typeFiltreAUtiliser=="popinFiltreAucun"){var b=$("#popinRechercheMagasin #rechercheMagasin").val();
if(videSiNull(b)==""){return;}$("#popinRechercheMagasin #adressesSelection ul li").remove();$("#popinRechercheMagasin #currentMag div").html("");$("#popinRechercheMagasin #adressesSelection ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreUnivers"){var b=$("#popinChoixMagUnivers #rechercheMagUnivers").val();if(videSiNull(b)==""){return;}$("#popinChoixMagUnivers #adresse ul li").remove();$("#popinChoixMagUnivers #currentMag div").html("");$("#popinChoixMagUnivers #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreConcept"){var b=$("#popinChoixMagConcept #rechercheMagConcept").val();if(videSiNull(b)==""){return;}$("#popinChoixMagConcept #adresse ul li").remove();$("#popinChoixMagConcept #currentMag div").html("");$("#popinChoixMagConcept #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreCatalogue"){var b=$("#popinChoixMagCatalogue #rechercheMagCatalogue").val();if(videSiNull(b)==""){return;}$("#popinChoixMagCatalogue #adresse ul li").remove();$("#popinChoixMagCatalogue #currentMag div").html("");$("#popinChoixMagCatalogue #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreOP"){var b=$("#popinChoixMagOP #rechercheMagOP").val();if(videSiNull(b)==""){return;}$("#popinChoixMagOP #adresse ul li").remove();$("#popinChoixMagOP #currentMag div").html("");$("#popinChoixMagOP #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreProduitOP"){var b=$("#popinChoixMagOP #rechercheMagOP").val();if(videSiNull(b)==""){return;}$("#popinChoixMagOP #adresse ul li").remove();$("#popinChoixMagOP #currentMag div").html("");$("#popinChoixMagOP #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientIdentifie"){var b=$("#popinIdentifie #rechercheIdentifie").val();if(videSiNull(b)==""){return;}$("#popinIdentifie #adresse").css("display","block");$("#popinIdentifie .hrHorizontal").css("display","block");$("#popinIdentifie #adresse ul li").remove();$("#popinIdentifie #currentMag div").html("");$("#popinIdentifie #adresse ul").html("<img src='"+imagePatienceLayerMag+"'/>");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClientFragment"){var b=$("#magasin #modifCP").val();$("#magasin #magProche ul li").remove();$("#currentMagasin div").html("");$("#magasin #currentMagasin .btnChoose").css("display","none");if(videSiNull(b)==""){$("#magasin #magProche").css("display","none");$("#magasin #currentMagasin").css("display","none");$("#magasin .sepaOu").css("display","none");}else{$("#magasin #magProche").css("display","block");$("#magasin #currentMagasin").css("display","block");$("#magasin .sepaOu").css("display","block");$(".btnChoose").css("display","block");}addressToShow=b;if(videSiNull(b)==""){alert(aucunCodePostal);return;}$("#magasin #magProche ul").html("<img src='"+imagePatienceLayerMag+"'/>");$("#magasin #modifCP").val("");}else{if(paramsLayer.typeFiltreAUtiliser=="popinFiltreClient"){var b=$("#popinChoixMagClient #rechercheMagClient").val();$("#magasin #modifCP").val(b);$("#magasin #magProche ul li").remove();$("#currentMagasin div").html("");$("#popinChoixMagClient #adresse ul li").remove();$("#popinChoixMagClient #currentMag div").html("");if((videSiNull(b)=="")&&!(((a!=null)&&a))){$("#popinChoixMagClient #adresse").css("display","none");$("#popinChoixMagClient .hrHorizontal").css("display","none");$("#magasin #magProche").css("display","none");$("#magasin #currentMagasin").css("display","none");$("#magasin .sepaOu").css("display","none");}else{$("#popinChoixMagClient #adresse").css("display","block");$("#popinChoixMagClient .hrHorizontal").css("display","block");if(videSiNull(codePanonceau)==""){$("#magasin #magProche").css("display","block");$("#magasin #currentMagasin").css("display","block");$("#magasin .sepaOu").css("display","block");}}addressToShow=b;if((a!=null)&&a){$("#popinChoixMagClient #adresse").css("display","block");$("#popinChoixMagClient .hrHorizontal").css("display","block");rechercherMagasinGPS(d,c);return;}if(videSiNull(b)==""){alert(aucunCodePostal);return;}}}}}}}}}}var e=new google.maps.Geocoder();if(e){e.geocode({address:b,region:"fr"},function(g,f){if((f==google.maps.GeocoderStatus.OK)&&(g!=null)&&(g[0]!=null)&&(g[0].geometry!=null)&&(g[0].geometry.location!=null)){rechercherMagasinGPS(g[0].geometry.location.lat(),g[0].geometry.location.lng());return;}if(f!=google.maps.GeocoderStatus.OK){if(f==google.maps.GeocoderStatus.ZERO_RESULTS){alert(erreurGmapZeroResultLayerMag);}else{alert(erreurGmapLayerMag+" : "+f);}}});}}function onSuccessUrlPrestataire(){var a=this.getData();if(a!=null){if(a.url!=null){paramsLayer.urlCible=a.url;paramsLayer.target="blank";}else{paramsLayer.urlCible="magasinHome";paramsLayer.target=null;}}}function onErrorUrlPrestataire(){alert("erreur lors de la recherche du prestataire photo");
}function retournerUrlPrestataire(b,a){var d=new Array(2);d[0]=new Array(2);d[0][0]="codePanonceau";d[0][1]=b;d[1]=new Array(2);d[1][0]="codeUnivers";d[1][1]=a;var c=null;c=new AjaxInvoker(prefixeUrlSocleMag+"offre_url_prestataire.action",d,false,onSuccessUrlPrestataire,onErrorUrlPrestataire);c.query();}
