_YMTC = ""; cook = document.cookie; if (cook.indexOf("yMTC=")!=-1) { _YMTC = "&" + cook.substring(cook.indexOf("yMTC="),cook.indexOf(";",cook.indexOf("yMTC="))); } if("undefined"==typeof JSEPath&&(JSEPath=""),JSEObject=function(){},JSEObject.prototype.cast=function(JSEtype){var result=new(eval(JSEtype)),item;for(item in this)result[item]=this[item];return result},JSEObject.prototype.extend=function(e){var t=null;if("function"!=typeof e&&(t=e),e.prototype&&(t=e.prototype),null!=t){var i;for(i in t)this[i]||(this[i]=t[i])}"function"==typeof e&&(1==arguments.length?e.call(this):e.apply(this,Array.prototype.slice.apply(arguments,[1])))},JSEObject.prototype.isolate=JSEObject.prototype.removeEventListeners=function(){if(this.JSEwireHub)for(var e in this.JSEwireHub)if("object"==typeof this.JSEwireHub[e]&&!JSEObject.prototype[e])for(;this.JSEwireHub[e].length>0;)try{this.unplugWire(this.JSEwireHub[e][0])}catch(t){}if(this.JSEExtRef){for(var i=0;i0){var tmp=JSE.nextApplications[0];JSE.nextApplications.splice(0,1),JSELaunch(tmp[0],tmp[1],tmp[2],tmp[3])}},loadNodeComponent:function(e){this.namespaces.push(e),this.appendNodeComponent(!1)},appendNodeComponent:function(isFromComponentLoad){if(!this.isLoadingModule||isFromComponentLoad){this.isLoadingModule=!0;try{if(eval("typeof("+this.namespaces[this.namespaceLoadIndex].name+") != 'undefined'")){var JSEClone=eval(this.namespaces[this.namespaceLoadIndex].name);this.JSEClone=JSEClone}}catch(e){}require(this.namespaces[this.namespaceLoadIndex].url),JSE.componentLoaded()}},loadComponent:function(e){this.namespaces.push(e),this.appendComponent(!1)},appendComponent:function(isFromComponentLoad){if(isFromComponentLoad)try{if("undefined"!=eval("typeof("+this.namespaces[this.namespaceLoadIndex].name+")")&&!eval(this.namespaces[this.namespaceLoadIndex].name+".JSE"))return JSE.namespaceLoadIndex++,void(JSE.namespaceLoadIndex1?new JSEWire(arguments[0],arguments[1],arguments[2]):null},alertMode:function(){JSE.unplugWire("onInitError",this._alert),JSE.plugWire("onInitError",this._alert)},_alert:function(e,t){alert(t.message)},setPaths:function(e){"undefined"==typeof JSE.Paths&&(JSE.Paths={});for(var t in e)JSE.Paths[t]=e[t]}},JSE.extend(JSE,JSEObject),JSENamespace=function(e,t){this.name=e;var n=this.name.replace(/\./g,"/");if(n+="/"+this.name.split(".")[this.name.split(".").length-1]+".js",this.transport="script","undefined"!=typeof JSE.Paths)for(var a=e.split(".");a.length>0;){var r=JSE.Paths[a.join(".")];if(r&&r.path){if("string"==typeof r.path)this.url=r.path+n,this.root=r.path;else if(1===r.path.length)this.url=r.path[0]+n,this.root=r.path[0];else{var o=0;for(i=0;i-1,navigator.isIE=navigator.isIE6=navigator.isIE7=navigator.isIE8=navigator.isIE9=!1;var msie=/MSIE/i.test(navigator.userAgent),versionIE=navigator.userAgent.match(/MSIE (\d+)./i);msie&&(navigator.isIE=navigator["isIE"+versionIE[1]]=!0),navigator.isJSECompatible=navigator.isIE||navigator.isMozilla||navigator.isOpera||navigator.isSafari3||navigator.isChrome}$isNotEmpty=function(e){return"undefined"==typeof e?!1:null==e?!1:"string"!=typeof e||""!=e.replace(/^\s+/,"").replace(/\s+$/,"")&&"null"!=e?!0:!1},$isEmpty=function(e){return!$isNotEmpty(e)},$isNotEmptyArray=function(e){return e instanceof Array&&e.length>0},$isDefined=function(e){return"undefined"!=typeof e&&null!=e},$isTrue=function(e){return"boolean"==typeof e&&e},$isFalse=function(e){return"boolean"==typeof e&&!e},$intVal=function(e){var t;return"boolean"==typeof e?t=e?1:0:"string"==typeof e?(t=1*e,t=parseInt(e,10),(isNaN(t)||!isFinite(t))&&(t=0)):t="number"==typeof e?e:0,t},$isArray=function(e){return e instanceof Array},$isDomElement=function(e){return e&&e.tagName&&e.nodeName&&e.ownerDocument&&e.removeAttribute},String.prototype.replaceAll=function(e,t){return this.split(e).join(t)},ToJSEObject=function(e){JSE.extend(e,JSEObject)},JSEImportTrad=function(e){JSEImport(e,ViaMichelin.Api.Constants.System.ApiTradPath)},JSEImportTrl=function(e){JSEImport(e,ViaMichelin.Api.Constants.System.ApiTrlPath)},JSEImportApi=function(e){JSEImport(e,ViaMichelin.Api.Constants.System.ApiJSEPath)}; JSEPackage("ViaMichelin.Api.Constants.Exception"),ViaMichelin.Api.Constants.Exception={BAD_REQUEST:1,ACCESS_DENIED:2,SERVICE_ACCESS_DENIED:3,INVALID_PARAMETER:4,ABNORMAL_SERVICE_TERMINATION:5,REQUIRED_PARAMETER:50,UNKNOWN_ERROR:51,INTERNAL_ERROR:52,NOT_FOUND:200,GEOLOCATION_NOT_SUPPORTED:250,GEOLOCATION_TIMEOUT:251,SERVICE_NOT_AVAILABLE:900,SERVICE_ERROR:901}; JSEPackage("ViaMichelin.Api.Constants.Export"),ViaMichelin.Api.Constants.Export={TYPE:{TOMTOM:"ov2",MIO:"csv",NAVMAN:"csv",VIAMICHELIN:"xvm",GARMIN:"gpx",NAVIGON:"csvNavigon"}}; JSEPackage("ViaMichelin.Api.Constants.Import"),ViaMichelin.Api.Constants.Import={TYPE:{GEOJSON:0,GEORSS:1,KML:2}}; JSEPackage("ViaMichelin.Api.Constants.Import.AdminArea"),ViaMichelin.Api.Constants.Import.AdminArea={DEFAULT:"DEFAULT"}; JSEPackage("ViaMichelin.Api.Constants.Map"),ViaMichelin.Api.Constants.Map={TYPE:{ROADMAP:"ROADMAP",SATELLITE:"SATELLITE",HYBRID:"HYBRID",EMPTY:"EMPTY",LIGHT:"LIGHT",VIAMICHELIN:"VIAMICHELIN"},STYLE:{SATELLITE:"satellite",HYBRID:"htbrid",VIAMICHELIN:"viamichelin",EMPTY:"empty",SMEG:"smeg"},NAVIGATION:{STATIC:"STATIC",DRAG:"DRAG",DRAGZOOM:"DRAGZOOM",CONTROL:{DEFAULT:"DEFAULT",MINI:"MINI"}},POI:{MODE:{MORE:"MORE",LESS:"LESS",ALL:"ALL"}},FROM_GEOLOCATION:"FROM GEOLOCATION",SKIN:{DEFAULT:"Default",NAVIGATOR1:"Navigator1",MOBILE1:"Mobile1",MOBILE2:"Mobile2",MOBILE3:"Mobile3",WEB:"Default",MOBILE:{SMALL:"Mobile1",MEDIUM:"Mobile2",LARGE:"Mobile3"}},DELAY_LOADING:"DELAY_LOADING"}; JSEPackage("ViaMichelin.Api.Constants.Poi"),ViaMichelin.Api.Constants.Poi={SERVICE_TYPE:{POI:"POI",FIND_POI:"FindPOI",FIND_POI_NEAR_ROUTE:"FindPOINearRoute",FIND_POI_BY_ROAD:"FindPOIByRoad",FIND_POI_BY_CRITERIA:"FindPOIByCriteria",FIND_INPUT_POI:"FindInputPOI",FIND_INPUT_POI_BY_ROAD:"FindInputPOIByRoad"},TEXT_MODE:{OR:0,AND:1},ORDER_DIR:{ASC:"asc",DESC:"desc"},DIRECTION:{TO:"to",FROM:"from"},THRESHOLD_ONMAP:50}; JSEPackage("ViaMichelin.Api.Constants.Itinerary"),ViaMichelin.Api.Constants.Itinerary={DIST_UNIT:{METERS:"m",MILES:"mi"},CURRENCY:{EUR:"EUR",CHF:"CHF",CZK:"CZK",DKK:"DKK",GBP:"GBP",HRK:"HRK",HUF:"HUF",NOK:"NOK",PLN:"PLN",SEK:"SEK",SIT:"SIT",SKK:"SKK",UAH:"UAH",USD:"USD"},DATA:{HEADER:"header",ROADSHEET:"roadsheet",GEOM:"geom",MAP:"map"},FUEL_TYPE:{PETROL:"TYPE PETROL",LPG:"TYPE LPG",DIESEL:"TYPE DIESEL"},ITINERARY_TYPE:{RECOMMENDED:0,QUICK:1,SHORT:2,DISCOVERY:3,ECONOMIC:4},LOCATION_TYPE:{COORDS:1,POI:2,LOCID:3},MAX_STEPS_NUMBER:8,STEP_TYPE:{STEP_KIND_STEP:"e",STEP_KIND_CROSS:"p"},TOLL_CAT:{CAR:"car",CARAVAN:"caravan",MOTO:"moto",PL2:"pl2",PL3:"pl3",PL4:"pl4",PL5:"pl5"},TRUCK_CATEGORY_TRANSPORT:{ALL:0,PUBLIC:4,COMMODITY:5,EXPLOSIVES:6,POLLUTANTS:7,DANGEROUS_GOODS:8},VEHICULE_TYPE:{CAR:0,TRUCK:1,ON_FOOT:2,CYCLE:3,MOTO:4}}; JSEPackage("ViaMichelin.Api.Constants.Weather"),ViaMichelin.Api.Constants.Weather={NO_DATA:-99,POSITION_MODE:{TRACKER:"MODE TRACKER",CENTER:"MODE CENTER"}}; /* Get the version. Include during deployement by CE */ _Version="/static/21.2.0"; JSEPath = "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/jse/"; ViaMichelin.Api.Constants.System = { Version : _Version, /* dump bean data */ ApiLang : "fra", ApiRestLang : "fra", ApiRestRoot : "https://secure-apir.viamichelin.com/apir/1/", ApiRestSslRoot : "https://secure-apir.viamichelin.com/apir/1/", ApiRestKey : "JSBS20130726093834574421587240", CustomerProductId : "168653", ApiFwkRecoa : "https://ccu.viamichelin.com/recoa/", ApiBookingRoot : "http://commons.pro.restaurant.michelin.com", ApiMCMRoot : "https://moncompte.michelin.fr/", /* Convert relative path to absolute */ ApiPath : "https://secure-apijs.viamichelin.com/apijsv2", ApiJSEPath : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/jse/", ApiImgPath : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/img/", ApiCssRoot : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/css/", ApiTplPath : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/lang/" + "fra" + "/Tpl/", ApiTrlPath : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/trl/", ApiTradPath : "https://secure-apijs.viamichelin.com/apijsv2" + _Version + "/lang/" + "fra" + "/Trad/", ApiDataPath : "https://secure-apijs.viamichelin.com/apijsv2" + "/data/" }; ViaMichelin.Api.Constants.System.Poi = { Hotel : ["166494"], Restaurant : ["166495"], Tourism : ["166496"] }; /* Convenient method to import trads. */ JSEImportTrad = function (str) { JSEImport(str, ViaMichelin.Api.Constants.System.ApiTradPath); }; JSEImportApi = function (str) { JSEImport(str, ViaMichelin.Api.Constants.System.ApiJSEPath); }; JSEImportTrl = function (str) { JSEImport(str, ViaMichelin.Api.Constants.System.ApiTrlPath); }; function VMLaunch(application, conf, callBackWires, rootURL){ // Vérification de l'application if($isDefined(callBackWires) && $isDefined(callBackWires["onInitError"]) && !( (application == "ViaMichelin.Api.Map") || (application == "ViaMichelin.Api.MMap") || (application == "ViaMichelin.Api.MMap.Module.ClusteredPois") || (application == "ViaMichelin.Api.Itinerary") || (application == "ViaMichelin.Api.Route") || (application == "ViaMichelin.Api.Poi") || (application == "ViaMichelin.Api.Geocoding") || (application == "ViaMichelin.Api.Export") || (application == "ViaMichelin.Api.Import") || (application == "ViaMichelin.Api.Import.AdminArea") || (application == "ViaMichelin.Api.Completion") || (application == "ViaMichelin.Api.Weather") )) { callBackWires["onInitError"].call(null, new Error("Wrong class name : '"+ application +"'")); } else { JSELaunch(application, conf, callBackWires, rootURL); } }