﻿function GVA_ArrivalDepartureScroll(a,b,c,V,Q,R,S,T,U){function v(a,d,b,s,e,f,g){var h,c,k;d==p?(h=w,c=$(x+y),k=$(z+y)):(h=A,c=$(x+B),k=$(z+B));$(a).slider({value:e,min:0,max:23,animate:!0,slide:function(d,b){$(a+C).html(b.value+D)},stop:function(e,g){i($(a),h,b+l+d+m+g.value+n+s+o+f+t+j+"0",0,c,k)}});$(a+C).html($(a).slider(q)+D);g&&k.click(function(){i($(a),h,b+l+d+m+$(a).slider(q)+n+s+o+f+t+j+"1",1,c,k)});i($(a),h,b+l+d+m+e+n+s+o+f+t+j+"0",0,c,k)}function i(a,d,b,c,e,f){a.slider("disable");$.ajax({url:b,context:document.body,cache:!1,success:function(g){if(g!=u){var g=g.split("~"),h="<li class='header'>"+$(d+" li.header").html()+"</li>";$(d).html(h+g[1]);$("#arrivalDepartureUpdateDate").html(g[0]);c>0?(e.unbind(r),e.click(function(){i(a,d,b.replace(j+c,j+(c-1)),c-1,e,f)}),e.css({opacity:1})):(e.unbind(r),e.css({opacity:0.6}));g[2]>0?(f.unbind(r),f.click(function(){i(a,d,b.replace(j+c,j+(c+1)),c+1,e,f)}),f.css({opacity:1})):(f.unbind(r),f.css({opacity:0.6}))}E(d);a.slider("enable")}})}function E(a){$(a+" a.various3").click(function(){window.open(this.href,"TrackFlight"+$(this).find("div.flightno").html(),"height=550,width=350,top=50,left=50,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,status=no");return!1})}function F(){var a=$(G).val()==p?H:I;a+="?Day="+$(J).val();var b=$(K).val();b!=null&&b!=L&&(a+="&Town="+b);b=$(M).val();b!=null&&b!=L&&(a+="&CompanyCode="+b);b=$(N).val();b!=null&&b.trim()!=u&&(a+="&Flight="+b);a+="&Hour="+$(O).val();window.location.href=a+"#ArrivalDepartureSearchResults"}var I,H,w="#arrivalsList",A="#departuresList",p="a",l="?type=",m="&time=",n="&lang=",o="&place=",q="value",x="#prev",z="#next",y="Arrivals",B="Departures",C=" .ui-slider-handle",j="offset=",t="&",D="h",r="click",G="#ArrivalsDeparturesScrollSearchType",J="#ArrivalsDeparturesScrollSearchDay",K="#ArrivalsDeparturesScrollSearchCity",M="#ArrivalsDeparturesScrollSearchCompany",N="#ArrivalsDeparturesScrollSearchFlight",O="#ArrivalsDeparturesScrollSearchHour",L="all",u="",P=afficherMonHeure2(1);if(typeof GVA_ArrivalDepartureScroll.initialized=="undefined")GVA_ArrivalDepartureScroll.prototype.reset=function(){$(G+" option:eq(0)").attr("selected","selected");$(J+" option:eq(1)").attr("selected","selected");$(K+" option:eq(0)").attr("selected","selected");$(O+" option:eq(0)").attr("selected","selected");$(M+" option:eq(0)").attr("selected","selected");$(N).val(u);Custom.init()},GVA_ArrivalDepartureScroll.prototype.submit=function(){F()},GVA_ArrivalDepartureScroll.initialized=!0;(function(){v("#sliderSilver_0",p,a,b,P,c,R);v("#sliderSilver_1","d",a,b,P,c,S);$.timer(Q,function(){i($("#sliderSilver_0"),w,a+l+p+m+$("#sliderSilver_0").slider(q)+n+b+o+c);i($("#sliderSilver_1"),A,a+l+"d"+m+$("#sliderSilver_1").slider(q)+n+b+o+c);E()});I=U;H=T;$("#ArrivalsDeparturesScrollSearchFlight").keypress(function(a){if(a.which==13)return F(),!1})})()}Date.prototype.correctionHeureHiverEte=function(){var a=dernierDimanche(this.getFullYear(),3,2),b=dernierDimanche(this.getFullYear(),10,2);dd_gmt=" GMT+1";this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()&&(dd_gmt=" GMT+2",this.setTime(this.getTime()+36E5))};function dernierDimanche(a,b,c){a=new Date(a,b,1,c,0,0);b=a.getDay();a.getDay()==0&&(b=7);a.setTime(a.getTime()-b*864E5);return a}Date.prototype.afficherOnlyHeure=function(){return complete2(this.getHours())};function complete2(a){return a<10?"0"+a:a}function bissextile(a){return a%4==0&&a%100!=0||a%400==0}function afficherMonHeure2(a){a=calculerHeureLocale(a);a.correctionHeureHiverEte();a=a.afficherOnlyHeure();return parseInt(a,10)}function calculerHeureLocale(a){var b=new Date;b.setTime(b.getTime()+(b.getTimezoneOffset()+a*60)*6E4);return b};
