tou = new Array();auto = new Array();news = new Array();adverSite = "ad.fr.doubleclick.net";advertPage = "www.viamichelin.fr";actForm = "map";function subj(im,titre,url){ this.im = im; this.titre = titre; this.url = url;}isInit = false;function rotate(){ if (!isInit) { var touRnd = parseInt(Math.random()*tou.length); var autoRnd = parseInt(Math.random()*auto.length); for (var i=0;i<touRnd;i++) tou.push(tou.shift()); for (var i=0;i<autoRnd;i++) auto.push(auto.shift()); isInit = true; } else { tou.push(tou.shift()); auto.push(auto.shift()); } for (var i=0;i<2;i++) { document.getElementById("tou"+(i+1)).innerHTML = "<a href='"+tou[i].url+"'><img src='"+tou[i].im+"' style='float:left'/></a><a href='"+tou[i].url+"'>"+tou[i].titre+"</a>"; document.getElementById("auto"+(i+1)).innerHTML = "<a href='"+auto[i].url+"'><img src='"+auto[i].im+"' style='float:left'/></a><a href='"+auto[i].url+"'>"+auto[i].titre+"</a>"; } setTimeout("rotate()",5000);}function writer(n,t){ strTmp = news[n].titre.substring(0,t); document.getElementById("newsDiv").innerHTML = strTmp; if (strTmp.length < news[n].titre.length) setTimeout("writer("+n+","+(t+1)+")",50); else { news.push(news.shift()); setTimeout("writer(0,1)",1000); }}function addToFavorite(){ if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) { window.sidebar.addPanel ("ViaMichelin : itinéraire routier - carte France Michelin - guide restaurant - hotel Europe", "http://www.viamichelin.fr/viamichelin/fra/tpl/hme/MaHomePage.htm",""); } if (document.all) window.external.AddFavorite("http://www.viamichelin.fr/viamichelin/fra/tpl/hme/MaHomePage.htm","ViaMichelin : itinéraire routier - carte France Michelin - guide restaurant - hotel Europe");}function testAll(frm){ if (frm != "") { el = document.forms["vmFrm"].elements; if (frm == "iti") { el = document.forms["vmFrm1"].elements; modCookie(el["strDestCityCountry"].value,el["strStartCityCountry"].value,mapCountry); if (testAddressZipAndCity(el["strStartAddress"],el["strStartCity"],el["strStartCP"],"vmFrm1","Renseigner au moins un des champs pour préciser la demande")) { if (testAddressZipAndCity(el["strDestAddress"],el["strDestCity"],el["strDestCP"],"vmFrm1","Renseigner au moins un des champs pour préciser la demande")) return true; else return false; } else return false; } if (frm == "map") { modCookie(destCountry,startCountry,el["strCountry"].value); if (el["BP"]) if (el["BP"].checked) document.forms["vmFrm"].action = "../../dyn/controller/mapHomePage"; if (testAddressZipAndCity(el["strAddress"],el["strLocation"],el["strCP"],"vmFrm","Renseigner au moins un des champs pour préciser la demande")) return true; else return false; } }}function testAddressZipAndCity(address,city,zip,frm,msg){ if (address.value==""&&city.value==""&&zip.value=="") { alert(msg); address.focus(); return false; } else return true;}function MM_openBrWindow(theURL) { newWin = window.open(theURL,'Selections','width=330,height=305,screenX=100,screenY=100,scrollbars=auto,status=no,resizable=yes,left=100, top=100,alwaysRaised=yes');}var hideAble = true;var hideAble2 = true;function guidesMichelin(o){ hideMenu2(); document.getElementById("sousMenu").style.top = findPosition(o)[1] + 15; document.getElementById("sousMenu").style.left = findPosition(o)[0] - 50; if (document.getElementById("sousMenu").style.display == "none") { document.getElementById("sousMenu").style.display = ""; } else { setTimeout("hideMenu()",500); }}function guidesMichelin2(o){ hideMenu(); document.getElementById("sousMenu2").style.top = findPosition(o)[1] + 15; document.getElementById("sousMenu2").style.left = findPosition(o)[0] - 60; if (document.getElementById("sousMenu2").style.display == "none") { document.getElementById("sousMenu2").style.display = ""; } else { setTimeout("hideMenu2()",500); }}function hideMenu(){ if (hideAble) { document.getElementById("sousMenu").style.display = "none"; if (document.getElementById("GR").className != "on") document.getElementById("GR").className = "off"; }}function hideMenu2(){ if (hideAble2) { document.getElementById("sousMenu2").style.display = "none"; if (document.getElementById("GR2").className != "on") document.getElementById("GR2").className = "off"; }}function findPosition( oLink ) { if( oLink.offsetParent ) { for( var posX = 0, posY = 0; oLink.offsetParent; oLink = oLink.offsetParent ) { posX += oLink.offsetLeft; posY += oLink.offsetTop; } return [ posX, posY ]; } else { return [ oLink.x, oLink.y ]; }}function menuOn(o){ hideAble = true; hideMenu(); o.className = "over";}function menuOff(o){ o.className = "off";}function shopOn(o){ hideAble = true; hideMenu(); o.className = "over";}function shopOff(o){ o.className = "shop";}function config(){ location.href="../../htm/div/MaConfig.htm";}function popBubble(o,url,y,x){ document.getElementById(o).style.top = y; document.getElementById(o).style.left = x; document.getElementById(o).style.visibility = "visible"; document.getElementById(o).src = url;}function killBubble(o){ document.getElementById(o).style.visibility = "hidden";}function ifResize(o,t){ o.style.height = frames[t].document.body.scrollHeight + 20;}function modCookie(destCountry,startCountry,mapCountry){ oDate = new Date(2038,1,1); str = "countries=" + mapCountry + "|"; str += "start=" + startCountry + "|"; str += "dest=" + destCountry + "|"; c = document.cookie; if (c.indexOf("distUnit") != -1) { str+= "distUnit=" + c.substring(c.indexOf("distUnit")+9,c.indexOf("/",c.indexOf("distUnit")+9)); str+= "/tollVh=" + c.substring(c.indexOf("tollVh")+7,c.indexOf("/",c.indexOf("tollVh")+7)); str+= "/devise=" + c.substring(c.indexOf("devise")+7,c.indexOf("/",c.indexOf("devise")+7)); str+= "/carCost=" + c.substring(c.indexOf("carCost")+8,c.indexOf("/",c.indexOf("carCost")+8)); carTypev = ""; if (c.indexOf("carType")!=-1) carTypev = c.substring(c.indexOf("carType")+8,c.indexOf("/",c.indexOf("carType")+8)); caravanv = ""; if (c.indexOf("caravan")!=-1) caravanv = c.substring(c.indexOf("caravan")+8,c.indexOf("/",c.indexOf("caravan")+8)); carbTypev = ""; if (c.indexOf("carbType")!=-1) carbTypev = c.substring(c.indexOf("carbType")+9,c.indexOf("/",c.indexOf("carbType")+9)); str += "/carType=" + carTypev ; str += "/caravan=" + caravanv; str += "/carbType=" + carbTypev+ "/"; } str += ";path=/viamichelin/"; str += ";expires=" + oDate.toGMTString(); document.cookie = str;}var mapCountry;var startCountry;var destCountry;function readCookie(){ c = document.cookie; if ((c.indexOf("countries") != -1)&&(c.indexOf("start") != -1)&&(c.indexOf("dest") != -1)) { mapCountry = c.substring(c.indexOf("countries=")+10,c.indexOf("|",c.indexOf("countries=")+10)); startCountry = c.substring(c.indexOf("start=")+6,c.indexOf("|",c.indexOf("start=")+6)); destCountry = c.substring(c.indexOf("dest=")+5,c.indexOf("|",c.indexOf("dest=")+5)); autoCountry(document.forms["vmFrm1"].elements["strStartCityCountry"],startCountry); autoCountry(document.forms["vmFrm1"].elements["strDestCityCountry"],destCountry); autoCountry(document.forms["vmFrm"].elements["strCountry"],mapCountry); }}function autoCountry(element,value){ i = 0; while (i < element.options.length) { if (element.options[i].value == value) { element.selectedIndex = i; i = element.options.length;} i++; }}function initCountries(o,frm){ if (document.forms[frm].elements[o]) { o = document.forms[frm].elements[o]; o.options[0] = new Option('Albanie','1025337'); o.options[1] = new Option('Allemagne','240'); o.options[2] = new Option('Andorre','856'); o.options[3] = new Option('Autriche','106'); o.options[4] = new Option('Bélarus','1794'); o.options[5] = new Option('Belgique','311'); o.options[6] = new Option('Bosnie-Herzégovine','1025343'); o.options[7] = new Option('Bulgarie','1025340'); o.options[8] = new Option('Canada','1145795'); o.options[9] = new Option('Croatie','1752'); o.options[10] = new Option('Danemark','1473'); o.options[11] = new Option('Espagne','844'); o.options[12] = new Option('Estonie','1860861'); o.options[13] = new Option('Etats-Unis','1145799'); o.options[14] = new Option('Europe','EUR'); o.options[15] = new Option('Finlande','1792'); o.options[16] = new Option('France','1424'); o.options[16].selected = true; o.options[17] = new Option('Grèce','1945835'); o.options[18] = new Option('Hongrie','1741'); o.options[19] = new Option('Irlande','919'); o.options[20] = new Option('Italie','612'); o.options[21] = new Option('Lettonie','1851089'); o.options[22] = new Option('Liechtenstein','108'); o.options[23] = new Option('Lituanie','1851066'); o.options[24] = new Option('Luxembourg','247'); o.options[25] = new Option('Macédoine','1025334'); o.options[26] = new Option('Moldova, République de','1025352'); o.options[27] = new Option('Monaco','852'); o.options[28] = new Option('Norvège','1574'); o.options[29] = new Option('Pays-Bas','285'); o.options[30] = new Option('Pologne','1743'); o.options[31] = new Option('Portugal','669'); o.options[32] = new Option('Roumanie','1025349'); o.options[33] = new Option('Royaume-Uni','1138'); o.options[34] = new Option('Russie, Fédération de','1851058'); o.options[35] = new Option('Saint-Marin','318'); o.options[36] = new Option('Serbie-et-Montenegro','1025346'); o.options[37] = new Option('Slovaquie','1697'); o.options[38] = new Option('Slovénie','1746'); o.options[39] = new Option('Suède','1507'); o.options[40] = new Option('Suisse','185'); o.options[41] = new Option('Tchèque, République','1694'); o.options[42] = new Option('Turquie','2059154'); o.options[43] = new Option('Ukraine','1749'); o.options[44] = new Option('Vatican','2066810'); }}function statsLoader(){ }if (document.all) attachEvent("onload",statsLoader);else window.addEventListener("load",statsLoader,false);