function gc_CreateCookie(nom,valeur,expires){document.cookie=nom+"="+escape(valeur)+
((expires==null)?"":("; expires="+expires.toGMTString()))+";path=/";}
function gc_CookiesArguments(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function gc_ReadCookie(nom){var arg=nom+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)
return gc_CookiesArguments(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;}
function autoCompOff(id){}
function EmptyField(field,etat){if(etat=='true'){$(field).value='';}}
function GetLieuPublic(depart,idLieu){html=$.ajax({url:"/ajax/trajets.php?action=GetLieuPublic&geonameid="+depart,async:false}).responseText;reg=new RegExp("[;]+","g");tableau=html.split(reg);tmp=new Array();data_lieu=new Object();if(tableau.length>1){delete data_lieu;data_lieu=new Object();data_lieu['0']='--Sélectionner un lieu--';}
for(var i=0;i<tableau.length;i++){reg2=new RegExp("[|]+","g");tmp=tableau[i].split(reg2);index=tmp[0];data_lieu[index]=tmp[1];}
$(idLieu).children().remove();if(tableau.length==1){delete data_lieu;data_lieu=new Object();data_lieu['none']='Aucun lieu correspondant';}
$.each(data_lieu,function(val,text){reg3=new RegExp("[_]+","g");tmp=val.split(reg3);chaineDebut=tmp[0];chaineDebut=chaineDebut.replace(/^\s*|\s*$/,"");if(chaineDebut=='local'){$(idLieu).append($('<option></option>').val(tmp[1]).html(text));}else if(chaineDebut=='group'){$(idLieu).append('<optgroup label="'+text+'"></optgroup>');}else{$(idLieu).append($('<option></option>').val(val).html(text));$(idLieu).attr("disabled",true);}});if(tableau.length>1){$(idLieu).attr("disabled",false);}}
function GetLieuPro(depart,idLieu){var html=$.ajax({url:"/ajax/trajets.php?action=GetLieuPro&geonameid="+depart,async:false}).responseText;reg=new RegExp("[;]+","g");tableau=html.split(reg);tmp=new Array();data_lieu=new Object();if(tableau.length>1){delete data_lieu;data_lieu=new Object();}
for(var i=0;i<tableau.length;i++){reg2=new RegExp("[|]+","g");tmp=tableau[i].split(reg2);index=tmp[0];data_lieu[index]=tmp[1];}
$(idLieu).children().remove();if(tableau.length==1){delete data_lieu;data_lieu=new Object();data_lieu['none']='Aucun lieu correspondant';}
$.each(data_lieu,function(val,text){reg3=new RegExp("[_]+","g");tmp=val.split(reg3);if(tmp[0]=='local'){$(idLieu).append($('<option></option>').val(tmp[1]).html(text));}else if(tmp[0]=='group'){$(idLieu).append('<optgroup label="'+text+'"></optgroup>');}else{$(idLieu).append($('<option></option>').val(val).html(text));$(idLieu).attr("disabled",true);}});if(tableau.length>1){$(idLieu).attr("disabled",false);}}
function GetLieuProEntreprise(depart,idLieu){var html=$.ajax({url:"/ajax/trajets.php?action=GetLieuPro&geonameid="+depart,async:false}).responseText;reg=new RegExp("[;]+","g");tableau=html.split(reg);tmp=new Array();data_lieu=new Object();if(tableau.length>1){delete data_lieu;data_lieu=new Object();}
for(var i=0;i<tableau.length;i++){reg2=new RegExp("[|]+","g");tmp=tableau[i].split(reg2);index=tmp[0];data_lieu[index]=tmp[1];}
$(idLieu).children().remove();if(tableau.length==1){delete data_lieu;data_lieu=new Object();data_lieu['none']='Aucun lieu correspondant';}
$.each(data_lieu,function(val,text){reg3=new RegExp("[_]+","g");tmp=val.split(reg3);if(tmp[0]=='local'){$(idLieu).append($('<option></option>').val(tmp[1]).html(text));}else if(tmp[0]=='group'){$(idLieu).append('<optgroup label="'+text+'"></optgroup>');}else{$(idLieu).append($('<option></option>').val(val).html(text));$(idLieu).attr("disabled",true);}});if(tableau.length>1){$(idLieu).attr("disabled",false);}}
var dtCh="/";var minYear=1900;var maxYear=2100;function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(((c<"0")||(c>"9")))return false;}
return true;}
function stripCharsInBag(s,bag){var i;var returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c;}
return returnString;}
function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31
if(i==4||i==6||i==9||i==11){this[i]=30}
if(i==2){this[i]=29}}
return this}
function isDate(champ){dtStr=$('#'+champ).val();var daysInMonth=DaysArray(12)
var pos1=dtStr.indexOf(dtCh)
var pos2=dtStr.indexOf(dtCh,pos1+1)
var strDay=dtStr.substring(0,pos1)
var strMonth=dtStr.substring(pos1+1,pos2)
var strYear=dtStr.substring(pos2+1)
strYr=strYear
if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1)
if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1)
for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1)}
month=parseInt(strMonth)
day=parseInt(strDay)
year=parseInt(strYr)
if(pos1==-1||pos2==-1){return false}
if(strMonth.length<1||month<1||month>12){return false}
if(strDay.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]){return false}
if(strYear.length!=4||year==0||year<minYear||year>maxYear){return false}
if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){return false}
return true}
function DisplayLoading(id){$(id).show();}
function HiddenLoading(id){$(id).hide();}
function majListeLieuProximite(champGeonameid,nbLieu,km,champResult,idLieuDefault){action='GetLieuPublicProximite';geonameid=$(champGeonameid).val();if(geonameid!=''){parametres='action='+action+'&geonameid='+geonameid+'&nbLieu='+nbLieu+'&km='+km+'&idLieuDefault='+idLieuDefault;$.ajax({type:'GET',url:'/ajax/membres.php',data:parametres,success:function(data){$(champResult).html(data);},complete:function(data){$('#idLieuProxi').show();}});}};$(document).ready(function(){function redirectionLiens(url){$(location).attr('href',url);}
function formatItem(row){return row[0]+" (<strong>id: "+row[1]+"</strong>)";}
function formatResult(row){return row[0].replace(/(<.+?>)/gi,'');}
function redirectFadeIn(url,idOui,idNoir,id){$(idOui).attr('href',url);$(idNoir).fadeIn(300);$(id).fadeIn(300);}
function calculPlacementModal(){if(navigator.appName.substring(0,3)=="Mic"){var xModal=document.documentElement.scrollTop+document.body.scrollTop+windowHeight/2-$('#gc_fmk_suppression').height()/2;$('#gc_fmk_suppression').css('top',xModal+"px");$('#gc_fmk_suppression').css('left',windowWidth/2-$('#gc_fmk_suppression').width()/2);}else{$('#gc_fmk_suppression').css('position','fixed');$('#gc_fmk_suppression').css('top',windowHeight/2-$('#gc_fmk_suppression').height()/2);$('#gc_fmk_suppression').css('left',windowWidth/2-$('#gc_fmk_suppression').width()/2);}}
function calculPlacementLoader(){if(navigator.appName.substring(0,3)=="Mic"){var xOx=document.documentElement.scrollTop+document.body.scrollTop+windowHeight/2-$('#gc_fmk_suppression').height()/2;$('#gc_fmk_loader').css('top',xOx+"px");$('#gc_fmk_loader').css('left',windowWidth/2-$('#gc_fmk_suppression').width()/2);}else{$('#gc_fmk_loader').css('position','fixed');$('#gc_fmk_loader').css('top',windowHeight/2-$('#gc_fmk_suppression').height()/2);$('#gc_fmk_loader').css('left',windowWidth/2-$('#gc_fmk_suppression').width()/2);}}
var suppressionLink="";var documentWidth=$(document).width()+'px';var documentHeight=$(document).height()+'px';var windowWidth=$(window).width();var windowHeight=$(window).height();$('#gc_fmk_suppression_noir').css({width:documentWidth,height:documentHeight,opacity:0.8});$('#gc_fmk_loader_noir').css({width:documentWidth,height:documentHeight,opacity:0.8});$('#gc_fmk_suppression_noir').click(function(){$('#gc_fmk_suppression_noir').fadeOut(300);$('#gc_fmk_suppression').fadeOut(300);});$('.gc_fmk_load_action').click(function(){calculPlacementLoader();$('#gc_fmk_loader_noir').fadeIn(300);$('#gc_fmk_loader').fadeIn(300);});$('#gc_fmk_suppression_noir').click(function(){$('#gc_fmk_suppression_noir').fadeOut(300);$('#gc_fmk_suppression').fadeOut(300);});$('.gc_fmk_suppression_mesTrajets').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idTrajet=suppressionId.split('_');urlRedirect='/trajets.php?action=Delete&idTrajet='+idTrajet[1]+'&confDel=1';redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_mesTrajetsFavoris').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idFavori=suppressionId.split('|');urlRedirect='/trajets.php?action=DeleteTrajetFavoris&idvd='+idFavori[1]+'&idva='+idFavori[2];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_mesEquipages').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idEquipage=suppressionId.split('_');urlRedirect='/equipages/DeleteMembre/suppression-membre/id='+idEquipage[1];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_messagerie').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idMessage=suppressionId.split('_');urlRedirect='/messagerie.php?action=Delete&idMessage='+idMessage[1]+'&r='+idMessage[2];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_mesContacts').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idMembre=suppressionId.split('_');urlRedirect='/membres.php?action=DeleteMembreFavoris&idmf='+idMembre[1];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_mesEntreprises').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idEntreprise=suppressionId.split('_');urlRedirect='/membres.php?action=DetacherEntreprise&id='+idEntreprise[1];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('.gc_fmk_suppression_mesSitesEntreprises').click(function(){calculPlacementModal();suppressionId=$(this).attr("id");idSite=suppressionId.split('_');urlRedirect='/membres.php?action=DetacherSiteEntreprise&id='+idSite[1];redirectFadeIn(urlRedirect,'#gc_fmk_suppression a.gc_fmk_suppression_oui','#gc_fmk_suppression_noir','#gc_fmk_suppression');return false;});$('#gc_fmk_suppression a.gc_fmk_suppression_non').click(function(){$('#gc_fmk_suppression_noir').fadeOut(300);$('#gc_fmk_suppression').fadeOut(300);return false;});});;$(document).ready(function(){$(".gc_fmk_target_blank_links").attr('target','_blank');$("#listeDates").change(function(){$("#dateDepart").attr('value',($(this).val()));});$('#lexique_def ul li').hide();$('#lexique_def ul li#box_lettre_1').show();$('#lexique_menu a.gc_fmk_bouton').click(function(){$('#lexique_def li').hide();var IDlienClic=$(this).attr("id");$('#lexique_def li#box_'+IDlienClic).fadeIn(400);return false;});$('.gc_fmk_table_general tr').hover(function(){$(this).addClass("table_hover");},function(){$(this).removeClass("table_hover");});$('.gc_form_envoyer').hover(function(){$(this).addClass("submit_hover");},function(){$(this).removeClass("submit_hover");});$('.gc_sidebar_envoyer').hover(function(){$(this).addClass("submit_sidebar_hover");},function(){$(this).removeClass("submit_sidebar_hover");});$(" #nav ul ").css({display:"none"});$(" #nav li").hover(function(){$(this).find('ul:first').css({visibility:"visible",display:"none"}).slideDown(300);},function(){$(this).find('ul:first').css({visibility:"hidden"});});$('#display_constantes').click(function(){$('#gc_fmk_constantes').show();});});;var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1)
return data[i].identity;}
else if(dataProp)
return data[i].identity;}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();;$(document).ready(function(){idChampValue_depart='#villeDepart';idChampHiddenValue_depart='#idVilleDepart';idChampPaysValue_depart='#paysDepart';$(".autocomplete_1 "+idChampValue_depart).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_1 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);$(idChampPaysValue_depart).val(data_depart[3]);}});idChampValue_arrivee='#villeArrivee';idChampHiddenValue_arrivee='#idVilleArrivee';idChampPaysValue_arrivee='#paysArrivee';$(".autocomplete_1 "+idChampValue_arrivee).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_1 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);$(idChampPaysValue_arrivee).val(data_arrivee[3]);}});idChampValue_depart='#villeDepart';idChampHiddenValue_depart='#idVilleDepart';idChampPaysValue_depart='#paysDepart';if($(idChampHiddenValue_depart).val()!=''){}
$(".autocomplete_2 "+idChampValue_depart).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});HiddenLoading('#loadingLieuDepart');$(".autocomplete_2 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);$(idChampPaysValue_depart).val(data_depart[3]);if($('#idVilleDepart').val()!=''){DisplayLoading('#loadingLieuDepart');}else{HiddenLoading('#loadingLieuDepart');}
GetLieuPublic($(idChampHiddenValue_depart).val(),'#idLieuDepart');if($('#idVilleDepart').val()!=''){HiddenLoading('#loadingLieuDepart');}}});idChampValue_arrivee='#villeArrivee';idChampHiddenValue_arrivee='#idVilleArrivee';idChampPaysValue_arrivee='#paysArrivee';if($(idChampHiddenValue_arrivee).val()!=''){}
$(".autocomplete_2 "+idChampValue_arrivee).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});HiddenLoading('#loadingLieuArrivee');$(".autocomplete_2 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);$(idChampPaysValue_arrivee).val(data_arrivee[3]);if($('#idVilleArrivee').val()!=''){DisplayLoading('#loadingLieuArrivee');}else{HiddenLoading('#loadingLieuArrivee');}
GetLieuPublic($(idChampHiddenValue_arrivee).val(),'#idLieuArrivee');if($('#idVilleArrivee').val()!=''){HiddenLoading('#loadingLieuArrivee');}}});idChampValue_depart='#villeDepart';idChampHiddenValue_depart='#idVilleDepart';$(".autocomplete_3 "+idChampValue_depart).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_3 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);}});idChampValue_arrivee='#villeArrivee';idChampHiddenValue_arrivee='#idVilleArrivee';if($(idChampHiddenValue_arrivee).val()!=''){}
$(".autocomplete_3 "+idChampValue_arrivee).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_3 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);}});idChampValue_etape1='#villeEtape1';idChampHiddenValue_etape1='#idVilleEtape1';if($(idChampHiddenValue_etape1).val()!=''){}
$(".autocomplete_3 "+idChampValue_etape1).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_3 "+idChampValue_etape1).result(function(event,data_etape1,formatted){if(data_etape1){$(idChampValue_etape1).val(data_etape1[2]);$(idChampHiddenValue_etape1).val(data_etape1[1]);}});idChampValue_etape2='#villeEtape2';idChampHiddenValue_etape2='#idVilleEtape2';if($(idChampHiddenValue_etape2).val()!=''){}
$(".autocomplete_3 "+idChampValue_etape2).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_3 "+idChampValue_etape2).result(function(event,data_etape2,formatted){if(data_etape2){$(idChampValue_etape2).val(data_etape2[2]);$(idChampHiddenValue_etape2).val(data_etape2[1]);}});idChampValue_depart='#villeDepart';idChampHiddenValue_depart='#idVilleDepart';$(".autocomplete_4 "+idChampValue_depart).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_4 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);}});$(".autocomplete_4 "+idChampValue_depart).blur(function(){if($(idChampHiddenValue_depart).val()==''){$(idChampValue_depart).val('');}});$(".autocomplete_4 "+idChampValue_arrivee).blur(function(){if($(idChampHiddenValue_arrivee).val()==''){$(idChampValue_arrivee).val('');}});$(".autocomplete_4 "+idChampValue_etape1).blur(function(){if($(idChampHiddenValue_etape1).val()==''){$(idChampValue_etape1).val('');}});$(".autocomplete_4 "+idChampValue_etape2).blur(function(){if($(idChampHiddenValue_etape2).val()==''){$(idChampValue_etape2).val('');}});HiddenLoading('#loadingLieuDepart');$(".autocomplete_4 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);$(idChampPaysValue_depart).val(data_depart[3]);if($(idChampHiddenValue_depart).val()!=''){DisplayLoading('#loadingLieuDepart');}else{HiddenLoading('#loadingLieuDepart');}
GetLieuPublic($(idChampHiddenValue_depart).val(),'#idLieuDepart');if($(idChampHiddenValue_depart).val()!=''){HiddenLoading('#loadingLieuDepart');}}});if($(idChampHiddenValue_depart).val()!=''&&$('#idLieuDepart').val()!=''&&typeof($('#idLieuDepart').val())!="undefined"){GetLieuPublic($(idChampHiddenValue_depart).val(),'#idLieuDepart');HiddenLoading('#loadingLieuDepart');$("#idLieuDepart").val(ReturnParamGet('idLieuDepart'));}
idChampValue_arrivee='#villeArrivee';idChampHiddenValue_arrivee='#idVilleArrivee';if($(idChampHiddenValue_arrivee).val()!=''){}
$(".autocomplete_4 "+idChampValue_arrivee).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_4 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);}});HiddenLoading('#loadingLieuArrivee');$(".autocomplete_4 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);$(idChampPaysValue_arrivee).val(data_arrivee[3]);if($(idChampHiddenValue_arrivee).val()!=''){DisplayLoading('#loadingLieuArrivee');}else{HiddenLoading('#loadingLieuArrivee');}
GetLieuPublic($(idChampHiddenValue_arrivee).val(),'#idLieuArrivee');if($(idChampHiddenValue_arrivee).val()!=''){HiddenLoading('#loadingLieuArrivee');}}});if($(idChampHiddenValue_arrivee).val()!=''&&$('#idLieuArrivee').val()!=''&&typeof($('#idLieuArrivee').val())!="undefined"){GetLieuPublic($(idChampHiddenValue_arrivee).val(),'#idLieuArrivee');HiddenLoading('#loadingLieuArrivee');$("#idLieuArrivee").val(ReturnParamGet('idLieuArrivee'));}
idChampValue_etape1='#villeEtape1';idChampHiddenValue_etape1='#idVilleEtape1';if($(idChampHiddenValue_etape1).val()!=''){}
$(".autocomplete_4 "+idChampValue_etape1).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_4 "+idChampValue_etape1).result(function(event,data_etape1,formatted){if(data_etape1){$(idChampValue_etape1).val(data_etape1[2]);$(idChampHiddenValue_etape1).val(data_etape1[1]);}});idChampValue_etape2='#villeEtape2';idChampHiddenValue_etape2='#idVilleEtape2';if($(idChampHiddenValue_etape2).val()!=''){}
$(".autocomplete_4 "+idChampValue_etape2).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_4 "+idChampValue_etape2).result(function(event,data_etape2,formatted){if(data_etape2){$(idChampValue_etape2).val(data_etape2[2]);$(idChampHiddenValue_etape2).val(data_etape2[1]);}});idChampValue_etape3='#villeEtape3';idChampHiddenValue_etape3='#idVilleEtape3';$(".autocomplete_4 "+idChampValue_etape3).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_4 "+idChampValue_etape3).result(function(event,data_etape3,formatted){if(data_etape3){$(idChampValue_etape3).val(data_etape3[2]);$(idChampHiddenValue_etape3).val(data_etape3[1]);}});$('#villeEtape1').focus(function(){if($('#villeEtape1').val()=='Etape 1 :'){$('#villeEtape1').val('');}});$('#villeEtape1').blur(function(){if($('#villeEtape1').val()==''){$('#villeEtape1').val('Etape 1 :');}});$('#villeEtape2').focus(function(){if($('#villeEtape2').val()=='Etape 2 :'){$('#villeEtape2').val('');}});$('#villeEtape2').blur(function(){if($('#villeEtape2').val()==''){$('#villeEtape2').val('Etape 2 :');}});$('#villeEtape3').focus(function(){if($('#villeEtape3').val()=='Etape 3 :'){$('#villeEtape3').val('');}});$('#villeEtape3').blur(function(){if($('#villeEtape3').val()==''){$('#villeEtape3').val('Etape 3 :');}});idChampValue_depart='#villeDepart';idChampHiddenValue_depart='#idVilleDepart';idChampPaysValue_depart='#paysDepart';$(".autocomplete_5 "+idChampValue_depart).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_5 "+idChampValue_depart).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart).val(data_depart[2]);$(idChampHiddenValue_depart).val(data_depart[1]);$(idChampPaysValue_depart).val(data_depart[3]);}});idChampValue_arrivee='#villeArrivee';idChampHiddenValue_arrivee='#idVilleArrivee';idChampPaysValue_arrivee='#paysArrivee';$(".autocomplete_5 "+idChampValue_arrivee).autocomplete("/ajax/geonames.php?action=SearchCityMemory&dept=1",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_5 "+idChampValue_arrivee).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee).val(data_arrivee[2]);$(idChampHiddenValue_arrivee).val(data_arrivee[1]);$(idChampPaysValue_arrivee).val(data_arrivee[3]);}});idChampValue_depart_6='#villeDepartTrajetMembre';idChampHiddenValue_depart_6='#idVilleDepartTrajetMembre';idChampPaysValue_depart_6='#paysDepartTrajetMembre';$(".autocomplete_6 "+idChampValue_depart_6).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_6 "+idChampValue_depart_6).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart_6).val(data_depart[2]);$(idChampHiddenValue_depart_6).val(data_depart[1]);GetLieuPublic($(idChampHiddenValue_depart_6).val(),'#id_lieu_start');}});idChampValue_arrivee_6='#villeArriveeTrajetMembre';idChampHiddenValue_arrivee_6='#idVilleArriveeTrajetMembre';idChampPaysValue_arrivee_6='#paysArriveeTrajetMembre';$(".autocomplete_6 "+idChampValue_arrivee_6).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_6 "+idChampValue_arrivee_6).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee_6).val(data_arrivee[2]);$(idChampHiddenValue_arrivee_6).val(data_arrivee[1]);GetLieuPublic($(idChampHiddenValue_arrivee_6).val(),'#id_lieu_end');}});idChampValue_depart_7='#LieuDepart';idChampHiddenValue_depart_7='#idLieuDepart';idChampHiddenValue_villeDepart_7='#idVilleDepart';$(".autocomplete_7 "+idChampValue_depart_7).autocomplete("/ajax/local.php?action=SearchLocal",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_7 "+idChampValue_depart_7).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_depart_7).val(data_depart[2]);$(idChampHiddenValue_depart_7).val(data_depart[1]);$(idChampHiddenValue_villeDepart_7).val(data_depart[3]);}});idChampValue_arrivee_7='#LieuArrivee';idChampHiddenValue_arrivee_7='#idLieuArrivee';idChampHiddenValue_villeArrivee_7='#idVilleArrivee';$(".autocomplete_7 "+idChampValue_arrivee_7).autocomplete("/ajax/local.php?action=SearchLocal",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_7 "+idChampValue_arrivee_7).result(function(event,data_arrivee,formatted){if(data_arrivee){$(idChampValue_arrivee_7).val(data_arrivee[2]);$(idChampHiddenValue_arrivee_7).val(data_arrivee[1]);$(idChampHiddenValue_villeArrivee_7).val(data_arrivee[3]);}});idChampValue_ville_8='#ville';idChampHiddenValue_idVille_8='#idVille';idChampPaysValue_pays_8='#pays';$(".autocomplete_8 "+idChampValue_ville_8).autocomplete("/ajax/geonames.php?action=SearchCityMemory",{width:260,minChars:2,selectFirst:true,delay:0,cacheLength:0,max:150});$(".autocomplete_8 "+idChampValue_ville_8).result(function(event,data_depart,formatted){if(data_depart){$(idChampValue_ville_8).val(data_depart[2]);$(idChampHiddenValue_idVille_8).val(data_depart[1]);$(idChampPaysValue_pays_8).val(data_depart[3]);}});});