var nbbh=2;var gg_ad_width=468;var gg_ad_height=60;var box_width='100%';var box_width_min=300;var width_side=280;var x=0,y=0;var chor=0;
if( typeof(window.innerWidth)=='number' ) {x=window.innerWidth;y=window.innerHeight;
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {x=document.documentElement.clientWidth;y=document.documentElement.clientHeight;
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {x=document.body.clientWidth;y=document.body.clientHeight;}
if(x>1000)nbbh=3;
if(x>1200){gg_ad_width=728;gg_ad_height=90;}
var gg_ad_format=gg_ad_width+'x'+gg_ad_height+'_as';
if((x-width_side)/4>=box_width_min) box_width='25%';
else if((x-width_side)/3>=box_width_min) box_width='33.3%';
else if((x-width_side)/2>=box_width_min) box_width='50%';
function load_add_bb() { document.write('<'+'script type=\"text/javascript\" src=\"http://www.blogbang.com/demo/js/blogbang_ad.php?id='+key_bb+'&amp;n='+nbbh+'&amp;p=L&amp;o=L&amp;bg=ffffff&amp;c=ffffff\"></'+'script>'); }
function load_box() { var boxd=''; if(box_width!='33.3%') boxd='#index .box_divers{width:100%;}';  document.write('<'+'style type=\"text/css\">#index .box{width:'+box_width+';}'+boxd+'</'+'style>'); }
function d(t,id) { if(document.getElementById(id)) document.getElementById(id).innerHTML=t; }
function f(fi) {
if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
else return(false);
xhr_object.open("POST",fi,false);
xhr_object.send(null);
if(xhr_object.readyState==4) return(xhr_object.responseText);
else return(false);
}
function fd(fi,id) {
var data=null;
var xhr_object=null;
if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
else return(false);
xhr_object.open("POST",fi,true);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState==4) {
if(xhr_object.status==200){ d(xhr_object.responseText,id); }
else alert('problem...');
}
else d('<div class="load"></div>',id);
}
xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr_object.send(data);
}
function w() {
var data=null;
var xhr_object=null;
if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
else return(false);
xhr_object.open("POST",'/js'+'/js'+'.p'+'hp?m=w',true);
xhr_object.onreadystatechange = function() {
if(xhr_object.readyState==4) {
if(xhr_object.status==200) d(xhr_object.responseText,'wiki');
else alert('problem...');
}
else d('<div class="load"></div>','wiki');
}
xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xhr_object.send(data);
}
var tfs=new Array('xx-small','x-small','small','medium','large','x-large','xx-large');
var sz=3;
function fs(n){sz+=n;if(sz<0)sz=0;if(sz>6)sz=6;var test=/div_/;var divs=document.getElementsByTagName('div');
for(var i=0;i<divs.length;i++){ if(test.test(divs[i].id)) divs[i].style.fontSize = tfs[sz]; }
}
function s_pai(id){var s=f('/js/js.php?m=s_pai&id='+id+'&t='+radio_value(document.form_pub.t)+'&d='+radio_value(document.form_pub.d));return s;}
function ban_right(){document.write(f('/j'+'s/j'+'s_static'+'.p'+'hp?m=ban_right'));}
function radio_value(r){for(var i=0;i<r.length;i++){if(r[i].checked) return r[i].value;}}
function addfav(){if(document.all) window.external.AddFavorite(urlfav,titlefav); else if (window.sidebar) window.sidebar.addPanel(titlefav,urlfav,""); else alert("Désolé, mais votre navigateur ne supporte pas cette fonction.");}
function addfav2(u,t){if(document.all) window.external.AddFavorite(u,t); else if (window.sidebar) window.sidebar.addPanel(t,u,""); else alert("Désolé, mais votre navigateur ne supporte pas cette fonction.");}
function get_criteo(i){var m3_u= (location.protocol=="https:"?"https://cas.criteo.com/delivery/ajs.php":"http://cas.criteo.com/delivery/ajs.php"); var m3_r = Math.floor(Math.random()*99999999999); if (!document.MAX_used) document.MAX_used = ","; document.write ("<scr"+"ipt type=\"text/javascript\" src=\""+m3_u); document.write ("?nodis=1&amp;zoneid="+i); document.write ("&amp;cb=" + m3_r); if (document.MAX_used != ",") document.write ("&amp;exclude=" + document.MAX_used); document.write (document.charset ? "&amp;charset="+document.charset : (document.characterSet ? "&amp;charset="+document.characterSet : "")); if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer)); if (document.context) document.write ("&amp;context=" + escape(document.context)); if (document.mmm_fo) document.write ("&amp;mmm_fo=1"); document.write ("\"><\/scr"+"ipt>"); }
function get_hit_parade(){document.write('<a href="http://www.hit-parade.com/hp.asp?site=p535692"><img src="http://logp.hit-parade.com/logohp1.gif?site=p535692" alt="Hit-Parade" style="width:77px;height:15px;"/></a>');}
function ajaxfunc(t,id){var contact=/contact/g;if(t=='part' || id=='mm' || id=='telmairie' || id=='sidetel' || contact.test(t)) var sjs='_static'; else var sjs=''; d(f('/j'+'s/'+'js'+sjs+'.p'+'hp'+'?m='+t),id);}
function ajaxfunc2(t){var tel=/tel/g;if(tel.test(t)) var sjs='_static'; else var sjs=''; return f('/j'+'s/'+'js'+sjs+'.p'+'hp'+'?m='+t);}
function tz(tz){return f('/j'+'s/'+'js'+'_static'+'.p'+'hp'+'?m=tz&tz='+encodeURI(tz));}
function bgeo(){document.write(f('/j'+'s/'+'js'+'_static'+'.p'+'hp'+'?m=bgeo'));}
function za(v){return(v>9)?""+v:"0"+v;}
function hor(s){jh=new Date;jh.setTime(s+(chor*1000));sh=il_est+' '+za(jh.getHours())+":"+za(jh.getMinutes())+":"+za(jh.getSeconds())+' '+le_date+' '+za(jh.getDate())+" "+month[jh.getMonth()]+" "+jh.getFullYear();document.getElementById("hor").innerHTML=sh;chor+=1;setTimeout('hor('+s+')',1000);}
function letter(l){ for(c=1;c<=43;c=c+1){ var s=String.fromCharCode(c+47); if(document.getElementById("l2_"+s)){ document.getElementById("l1_"+s).style.display="none"; if(s==l) document.getElementById("l2_"+s).style.display="table-row"; else document.getElementById("l2_"+s).style.display="none"; } } }
function var_gg_ads(w,h,bg,bo,l,u,t){if(bg==null || bg=='') bg='FFFFFF';if(bo==null || bo=='') bo='FFFFFF';if(l==null || l=='') l='0000FF';if(u==null || u=='') u='008000';if(t==null || t=='') t='000000';<!--
google_ad_client=gg_ad_client;google_ad_channel=gg_ad_channel;google_ad_width=w;google_ad_height=h;google_ad_format=w+'x'+h+'_as';google_color_bg=bg;google_color_border=bo;google_color_link=l;google_color_url=u;google_color_text=t;
//-->
}
function dw(s){document.write(s);}
function addzero(v){ while(v.length<2) v=String("0")+v; return v; }
function omo(d,c){d.style.background=c;}
function omb(d,c){d.style.border='1px solid '+c;}
function select_hotel(type){
if(type=='in') document.writeln('<select id="b_checkin_month" name="checkin_year_month" onchange="checkDateOrder(\'frm\', \'b_checkin_day\', \'b_checkin_month\', \'b_checkout_day\', \'b_checkout_month\') ; tickCheckBox(\'b_availcheck\');">');
else if(type=='out') document.writeln('<select id="b_checkout_month" name="checkout_year_month" onchange="tickCheckBox(\'b_availcheck\');">');
var today = new Date();
var mth= today.getMonth();
var year = today.getFullYear()%100;
var fullYear=today.getFullYear();
year=new String(year);
year=addzero(year);
var countMonth=mth;
for(var i=0;i<12;i++,countMonth++){
if(countMonth%12==0 && i>0){
countMonth=0;
year++;
year=new String(year);
year=addzero(year);
fullYear++;
}
document.writeln('<option value="'+fullYear+'-'+(countMonth+1)+'">'+month[countMonth]+' '+fullYear+'</option>');
}
document.writeln('</select>');
}
function checkDateOrder(frm, ci_day, ci_month_year, co_day, co_month_year) {
if (document.getElementById) {
var frm = document.getElementById(frm);
var my = frm[ci_month_year].value.split("-");
var ci = new Date (my[0], my[1]-1, frm[ci_day].value, 12, 0, 0, 0);
my = frm[co_month_year].value.split("-");
var co = new Date (my[0], my[1]-1, frm[co_day].value, 12, 0, 0, 0);
if (ci >= co){
co.setTime(ci.getTime() + 1000 * 60 * 60 * 24);
frm[co_day].value =  co.getDate();
var com = co.getMonth()+1;
frm[co_month_year].value = co.getFullYear() + "-" + com;
}
}
}
function tickCheckBox(el){
if(document.getElementById){
if(document.getElementById(el)) document.getElementById(el).checked = false;
} return true;
}
function hotel_load_search(){
var currentDate = new Date(); var currentYear = 1900 + currentDate.getYear();
var dailyMS = 24*60*60*1000;
var arrivalDate = new Date(currentDate.getTime());
var departureDate = new Date(currentDate.getTime() + 1*dailyMS);
var arrivalYear = 1900+arrivalDate.getYear();
var arrivalMonth = 1+arrivalDate.getMonth(); var arrivalDay = arrivalDate.getDate();
var departureYear = 1900+departureDate.getYear();
var departureMonth = 1+departureDate.getMonth(); var departureDay = departureDate.getDate();
var a=document.frm;
if ((a.checkin_monthday.selectedIndex == 0) && (a.checkout_monthday.selectedIndex == 0)){
a.checkin_monthday.options[arrivalDay-1].selected = true;
a.checkout_monthday.options[departureDay-1].selected = true;
}
var frm = document.getElementById('frm');
var my = frm['b_checkin_month'].value.split("-");
var ci = new Date (my[0], my[1]-1, frm['b_checkin_day'].value, 12, 0, 0, 0);
my = frm['b_checkout_month'].value.split("-");
var co = new Date (my[0], my[1]-1, frm['b_checkout_day'].value, 12, 0, 0, 0);
if (ci >= co){
co.setTime(ci.getTime() + 1000 * 60 * 60 * 24);
frm['b_checkout_day'].value =  co.getDate();
var com = co.getMonth()+1;
frm['b_checkout_month'].value = co.getFullYear() + "-" + com;
}
}
function flash_logo(f,i){return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="224" height="120" type="application/x-shockwave-flash" data="'+f+'"><param name="movie" value="'+f+'"/><param name="quality" value="high"/><param name="wmode" value="transparent"/>'+i+'</object>';}
function clearAbsolutes() {
var div=document.getElementById('container');
oh=[]; for(j=0;j<div.childNodes.length;j++){ c=div.childNodes[j]; if(c.nodeName=='DIV'){ oh[oh.length]=parseInt(c.offsetHeight); }}
h=0; for(k=0;k<oh.length;k++){ h=(oh[k]>h)?oh[k]:h;}
for(j=0;j<div.childNodes.length;j++){ c=div.childNodes[j]; if(c.nodeName=='DIV'){ c.style.height=h+'px'; }}
div.style.height=h+'px';
}

function codeAddress(){
var address=document.getElementById("address").value;
geocoder.geocode( { "address": address}, function(results,status) {
if(status==google.maps.GeocoderStatus.OK){ map.setCenter(results[0].geometry.location);map.setZoom(15);
var marker=new google.maps.Marker({ map: map,position: results[0].geometry.location });
}else{ alert(address+" introuvable !"); } }); }
function calcDir(s,e){
if(s!='') var start=s; else var start=document.getElementById("dirstart").value;
if(e!='') var end=e; else var end=document.getElementById("dirend").value;
var request= { origin:start,destination:end,travelMode: google.maps.DirectionsTravelMode.DRIVING };
directionsService.route(request, function(response, status) {
if(status==google.maps.DirectionsStatus.OK){ directionsDisplay.setDirections(response); } }); }
function finputq(){ var inputq=document.getElementById('inputq').value; if(inputq=='' || inputq=='Recherche rapide'){ alert('Merci de faire une recherche valide !'); return false; }else{ return true; } }
function o_emploi(la,lb,adm){var s=document.getElementById('e_sec').value;var e=document.getElementById('e_exp').value;var c=document.getElementById('e_con').value;var d=document.getElementById('e_dis').value;var s=fd('/js/js.php?m=emploi&la='+encodeURI(la)+'&lb='+encodeURI(lb)+'&adm='+encodeURI(adm)+'&s='+encodeURI(s)+'&e='+encodeURI(e)+'&c='+encodeURI(c)+'&d='+encodeURI(d),'div_offre_emploi');}
function juizrfg(v){ return f('/j'+'s/'+'js'+'_st'+'atic'+'.p'+'hp'+'?m=juizrfg&v='+encodeURIComponent(v)); }
