var _mappyInit = {server : "http://axe.mappy.com/1v2/PJPVI/", authenticationCookie : false, tileServers : [
            
                  "http://axe1.mappy.com/1v2/PJPVI/",
                  "http://axe2.mappy.com/1v2/PJPVI/",
                  "http://axe3.mappy.com/1v2/PJPVI/"
            ],staticPath : "http://axe.mappy.com/Sources/API/ajax/2.10/",accountName : "PJPVI",productName : "API Ajax Groupe PJ IA",viewModes : {"photo":{"slab-region":{"template" : {"size":"384","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"3","zoom-max":"12","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"}]}}}},"itimap":{"slab-region":{"template" : {"size":"128","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"0","zoom-max":"13","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"0","sx-max":"0","sy-max":"0"},{"zoom":"1","sx-max":"2","sy-max":"2"},{"zoom":"2","sx-max":"8","sy-max":"6"},{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"},{"zoom":"13","sx-max":"1594322","sy-max":"1225186"}]}}}},"map":{"slab-region":{"template" : {"size":"384","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"0","zoom-max":"12","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"0","sx-max":"0","sy-max":"0"},{"zoom":"1","sx-max":"2","sy-max":"2"},{"zoom":"2","sx-max":"8","sy-max":"6"},{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"}]}}}},"traffic_events":{"slab-region":{"template" : {"size":"384","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"3","zoom-max":"12","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"}]}}}},"hybrid":{"slab-region":{"template" : {"size":"384","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"3","zoom-max":"12","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"}]}}}},"traffic_road_conditions":{"slab-region":{"template" : {"size":"384","projection" : {"name":"earth_to_gall","proj-id":"54016","proj4-definition":" +proj=gall +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"},"grid" : {"zoom-ratio":"3","zoom-min":"3","zoom-max":"12","x-max":"1.000000","y-max":"0.768468","zoom":[{"zoom":"3","sx-max":"26","sy-max":"20"},{"zoom":"4","sx-max":"80","sy-max":"62"},{"zoom":"5","sx-max":"242","sy-max":"186"},{"zoom":"6","sx-max":"728","sy-max":"560"},{"zoom":"7","sx-max":"2186","sy-max":"1680"},{"zoom":"8","sx-max":"6560","sy-max":"5041"},{"zoom":"9","sx-max":"19682","sy-max":"15125"},{"zoom":"10","sx-max":"59048","sy-max":"45377"},{"zoom":"11","sx-max":"177146","sy-max":"136131"},{"zoom":"12","sx-max":"531440","sy-max":"408395"}]}}}}},auth : "ETyUYJiYnyirG bSlKaALZSngspuMdFQdILFYJSQxAyr27zpRV78DP/EcFRjoqceS2w4mbDGg1o=",visiocityCodeConversion : {"photo":{"xmlns:xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance","Town":[{"Code" : "03306000","Name" : "NICE","CountryCode" : "250","Order08" : "43688"},{"Code" : "03306029","Name" : "CANNES","CountryCode" : "250","Order08" : "06029"},{"Code" : "03333063","Name" : "BORDEAUX","CountryCode" : "250","Order08" : "33063"},{"Code" : "03335266","Name" : "RENNES","CountryCode" : "250","Order08" : "35238"},{"Code" : "03338185","Name" : "GRENOBLE","CountryCode" : "250","Order08" : "38185"},{"Code" : "03344000","Name" : "NANTES","CountryCode" : "250","Order08" : "44109"},{"Code" : "03344055","Name" : "LA BAULE","CountryCode" : "250","Order08" : "44055"},{"Code" : "03354395","Name" : "NANCY","CountryCode" : "250","Order08" : "54395"},{"Code" : "03359350","Name" : "LILLE","CountryCode" : "250","Order08" : "59350","Subtown":[{"Code" : "03359298","Name" : "HELLEMMES"},{"Code" : "03359355","Name" : "LOMME"}]},{"Code" : "03367482","Name" : "STRASBOURG","CountryCode" : "250","Order08" : "67482"},{"Code" : "03378646","Name" : "VERSAILLES","CountryCode" : "250","Order08" : "78646"},{"Code" : "03392040","Name" : "ISSY-LES-MOULINEAUX","CountryCode" : "250","Order08" : "92040"},{"Code" : "03392044","Name" : "LEVALLOIS-PERRET","CountryCode" : "250","Order08" : "92044"},{"Code" : "03392049","Name" : "MONTROUGE","CountryCode" : "250","Order08" : "92049"},{"Code" : "03392050","Name" : "NANTERRE","CountryCode" : "250","Order08" : "92050"},{"Code" : "03392051","Name" : "NEUILLY-SUR-SEINE","CountryCode" : "250","Order08" : "92051"},{"Code" : "03392063","Name" : "RUEIL-MALMAISON","CountryCode" : "250","Order08" : "92063"},{"Code" : "03392072","Name" : "SèVRES","CountryCode" : "250","Order08" : "92072"},{"Code" : "03408019","Name" : "BARCELONA","CountryCode" : "724","Order08" : "080193"},{"Code" : "03415078","Name" : "SANTIAGO","CountryCode" : "724","Order08" : "150780"},{"Code" : "03428079","Name" : "MADRID","CountryCode" : "724","Order08" : "280796"},{"Code" : "03441091","Name" : "SEVILLA","CountryCode" : "724","Order08" : "410917"},{"Code" : "03446250","Name" : "VALENCIA","CountryCode" : "724","Order08" : "462508"},{"Code" : "13000000","Name" : "MARSEILLE","CountryCode" : "250","Order08" : "13055"},{"Code" : "31000000","Name" : "TOULOUSE","CountryCode" : "250","Order08" : "31555"},{"Code" : "69000000","Name" : "LYON","CountryCode" : "250","Order08" : "69123"},{"Code" : "75199056","Name" : "PARIS","CountryCode" : "250","Order08" : "75056"},{"Code" : "92100000","Name" : "BOULOGNE-BILLANCOURT","CountryCode" : "250","Order08" : "92012"},{"Code" : "35299137","Name" : "LUXEMBOURG","CountryCode" : "442","Order08" : "10001","Subtown" : {"Code" : "35299138","Name" : "HOWALD"}},{"Code" : "03314000","Name" : "CAEN","CountryCode" : "250","Order08" : "14118"},{"Code" : "03439075","Name" : "SANTANDER","CountryCode" : "724","Order08" : "390759"},{"Code" : "03447186","Name" : "VALLADOLID","CountryCode" : "724","Order08" : "471868"},{"Code" : "03392004","Name" : "ASNIèRES-SUR-SEINE","CountryCode" : "250","Order08" : "92004"},{"Code" : "03334172","Name" : "MONTPELLIER","CountryCode" : "250","Order08" : "34172"},{"Code" : "03392026","Name" : "COURBEVOIE","CountryCode" : "250","Order08" : "92026"},{"Code" : "03394043","Name" : "KREMLIN-BICêTRE","CountryCode" : "250","Order08" : "94043"},{"Code" : "03393059","Name" : "PIERREFITTE-SUR-SEINE","CountryCode" : "250","Order08" : "93059"},{"Code" : "03450297","Name" : "ZARAGOZA","CountryCode" : "724","Order08" : "50297"},{"Code" : "03407040","Name" : "PALMA DE MALLORCA","CountryCode" : "724","Order08" : "070407"}]}}};(function(aB){
/*
 * jQuery JavaScript Library v1.4.2
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Sat Feb 13 22:33:48 2010 -0500
 */
(function(cF,bY){function cR(){if(!b7.isReady){try{bZ.documentElement.doScroll("left")}catch(ca){setTimeout(cR,1);return}b7.ready()}}function bW(cb,ca){ca.src?b7.ajax({url:ca.src,async:false,dataType:"script"}):b7.globalEval(ca.text||ca.textContent||ca.innerHTML||"");ca.parentNode&&ca.parentNode.removeChild(ca)}function ch(cb,ca,df,dc,dd,da){var db=cb.length;if(typeof ca==="object"){for(var de in ca){ch(cb,de,ca[de],dc,dd,df)}return cb}if(df!==bY){dc=!da&&dc&&b7.isFunction(df);for(de=0;de<db;de++){dd(cb[de],ca,dc?df.call(cb[de],de,dd(cb[de],ca)):df,da)}return cb}return db?dd(cb[0],ca):bY}function cw(){return(new Date).getTime()}function cg(){return false}function ce(){return true}function cB(cb,ca,da){da[0].type=cb;return b7.event.handle.apply(ca,da)}function b6(di){var dh,dg=[],de=[],df=arguments,dc,dd,cb,db,da,ca;dd=b7.data(this,"events");if(!(di.liveFired===this||!dd||!dd.live||di.button&&di.type==="click")){di.liveFired=this;var dj=dd.live.slice(0);for(db=0;db<dj.length;db++){dd=dj[db];dd.origType.replace(cq,"")===di.type?de.push(dd.selector):dj.splice(db--,1)}dc=b7(di.target).closest(de,di.currentTarget);da=0;for(ca=dc.length;da<ca;da++){for(db=0;db<dj.length;db++){dd=dj[db];if(dc[da].selector===dd.selector){cb=dc[da].elem;de=null;if(dd.preType==="mouseenter"||dd.preType==="mouseleave"){de=b7(di.relatedTarget).closest(dd.selector)[0]}if(!de||de!==cb){dg.push({elem:cb,handleObj:dd})}}}}da=0;for(ca=dg.length;da<ca;da++){dc=dg[da];di.currentTarget=dc.elem;di.data=dc.handleObj.data;di.handleObj=dc.handleObj;if(dc.handleObj.origHandler.apply(dc.elem,df)===false){dh=false;break}}return dh}}function bS(cb,ca){return"live."+(cb&&cb!=="*"?cb+".":"")+ca.replace(/\./g,"`").replace(/ /g,"&")}function bG(ca){return !ca||!ca.parentNode||ca.parentNode.nodeType===11}function c8(cb,ca){var da=0;ca.each(function(){if(this.nodeName===(cb[da]&&cb[da].nodeName)){var dd=b7.data(cb[da++]),de=b7.data(this,dd);if(dd=dd&&dd.events){delete de.handle;de.events={};for(var db in dd){for(var dc in dd[db]){b7.event.add(this,db,dd[db][dc],dd[db][dc].data)}}}}})}function cU(cb,ca,dd){var db,dc,da;ca=ca&&ca[0]?ca[0].ownerDocument||ca[0]:bZ;if(cb.length===1&&typeof cb[0]==="string"&&cb[0].length<512&&ca===bZ&&!cG.test(cb[0])&&(b7.support.checkClone||!cc.test(cb[0]))){dc=true;if(da=b7.fragments[cb[0]]){if(da!==1){db=da}}}if(!db){db=ca.createDocumentFragment();b7.clean(cb,ca,db,dd)}if(dc){b7.fragments[cb[0]]=da?db:1}return{fragment:db,cacheable:dc}}function ct(cb,ca){var da={};b7.each(bV.concat.apply([],bV.slice(0,ca)),function(){da[this]=cb});return da}function bJ(ca){return"scrollTo" in ca&&ca.document?ca:ca.nodeType===9?ca.defaultView||ca.parentWindow:false}var b7=function(cb,ca){return new b7.fn.init(cb,ca)},bK=cF.jQuery,by=cF.$,bZ=cF.document,ck,cY=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,cK=/^.[^:#\[\.,]*$/,cf=/\S/,bX=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,bL=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,co=navigator.userAgent,bx=false,cm=[],cs,cS=Object.prototype.toString,cM=Object.prototype.hasOwnProperty,cp=Array.prototype.push,cl=Array.prototype.slice,cX=Array.prototype.indexOf;b7.fn=b7.prototype={init:function(cb,ca){var db,da;if(!cb){return this}if(cb.nodeType){this.context=this[0]=cb;this.length=1;return this}if(cb==="body"&&!ca){this.context=bZ;this[0]=bZ.body;this.selector="body";this.length=1;return this}if(typeof cb==="string"){if((db=cY.exec(cb))&&(db[1]||!ca)){if(db[1]){da=ca?ca.ownerDocument||ca:bZ;if(cb=bL.exec(cb)){if(b7.isPlainObject(ca)){cb=[bZ.createElement(cb[1])];b7.fn.attr.call(cb,ca,true)}else{cb=[da.createElement(cb[1])]}}else{cb=cU([db[1]],[da]);cb=(cb.cacheable?cb.fragment.cloneNode(true):cb.fragment).childNodes}return b7.merge(this,cb)}else{if(ca=bZ.getElementById(db[2])){if(ca.id!==db[2]){return ck.find(cb)}this.length=1;this[0]=ca}this.context=bZ;this.selector=cb;return this}}else{if(!ca&&/^\w+$/.test(cb)){this.selector=cb;this.context=bZ;cb=bZ.getElementsByTagName(cb);return b7.merge(this,cb)}else{return !ca||ca.jquery?(ca||ck).find(cb):b7(ca).find(cb)}}}else{if(b7.isFunction(cb)){return ck.ready(cb)}}if(cb.selector!==bY){this.selector=cb.selector;this.context=cb.context}return b7.makeArray(cb,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return cl.call(this,0)},get:function(ca){return ca==null?this.toArray():ca<0?this.slice(ca)[0]:this[ca]},pushStack:function(cb,ca,db){var da=b7();b7.isArray(cb)?cp.apply(da,cb):b7.merge(da,cb);da.prevObject=this;da.context=this.context;if(ca==="find"){da.selector=this.selector+(this.selector?" ":"")+db}else{if(ca){da.selector=this.selector+"."+ca+"("+db+")"}}return da},each:function(cb,ca){return b7.each(this,cb,ca)},ready:function(ca){b7.bindReady();if(b7.isReady){ca.call(bZ,b7)}else{cm&&cm.push(ca)}return this},eq:function(ca){return ca===-1?this.slice(ca):this.slice(ca,+ca+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(cl.apply(this,arguments),"slice",cl.call(arguments).join(","))},map:function(ca){return this.pushStack(b7.map(this,function(cb,da){return ca.call(cb,da,cb)}))},end:function(){return this.prevObject||b7(null)},push:cp,sort:[].sort,splice:[].splice};b7.fn.init.prototype=b7.fn;b7.extend=b7.fn.extend=function(){var cb=arguments[0]||{},ca=1,df=arguments.length,dc=false,dd,da,db,de;if(typeof cb==="boolean"){dc=cb;cb=arguments[1]||{};ca=2}if(typeof cb!=="object"&&!b7.isFunction(cb)){cb={}}if(df===ca){cb=this;--ca}for(;ca<df;ca++){if((dd=arguments[ca])!=null){for(da in dd){db=cb[da];de=dd[da];if(cb!==de){if(dc&&de&&(b7.isPlainObject(de)||b7.isArray(de))){db=db&&(b7.isPlainObject(db)||b7.isArray(db))?db:b7.isArray(de)?[]:{};cb[da]=b7.extend(dc,db,de)}else{if(de!==bY){cb[da]=de}}}}}}return cb};b7.extend({noConflict:function(ca){cF.$=by;if(ca){cF.jQuery=bK}return b7},isReady:false,ready:function(){if(!b7.isReady){if(!bZ.body){return setTimeout(b7.ready,13)}b7.isReady=true;if(cm){for(var cb,ca=0;cb=cm[ca++];){cb.call(bZ,b7)}cm=null}b7.fn.triggerHandler&&b7(bZ).triggerHandler("ready")}},bindReady:function(){if(!bx){bx=true;if(bZ.readyState==="complete"){return b7.ready()}if(bZ.addEventListener){bZ.addEventListener("DOMContentLoaded",cs,false);cF.addEventListener("load",b7.ready,false)}else{if(bZ.attachEvent){bZ.attachEvent("onreadystatechange",cs);cF.attachEvent("onload",b7.ready);var cb=false;try{cb=cF.frameElement==null}catch(ca){}bZ.documentElement.doScroll&&cb&&cR()}}}},isFunction:function(ca){return cS.call(ca)==="[object Function]"},isArray:function(ca){return cS.call(ca)==="[object Array]"},isPlainObject:function(cb){if(!cb||cS.call(cb)!=="[object Object]"||cb.nodeType||cb.setInterval){return false}if(cb.constructor&&!cM.call(cb,"constructor")&&!cM.call(cb.constructor.prototype,"isPrototypeOf")){return false}var ca;for(ca in cb){}return ca===bY||cM.call(cb,ca)},isEmptyObject:function(cb){for(var ca in cb){return false}return true},error:function(ca){throw ca},parseJSON:function(ca){if(typeof ca!=="string"||!ca){return null}ca=b7.trim(ca);if(/^[\],:{}\s]*$/.test(ca.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return cF.JSON&&cF.JSON.parse?cF.JSON.parse(ca):(new Function("return "+ca))()}else{b7.error("Invalid JSON: "+ca)}},noop:function(){},globalEval:function(cb){if(cb&&cf.test(cb)){var ca=bZ.getElementsByTagName("head")[0]||bZ.documentElement,da=bZ.createElement("script");da.type="text/javascript";if(b7.support.scriptEval){da.appendChild(bZ.createTextNode(cb))}else{da.text=cb}ca.insertBefore(da,ca.firstChild);ca.removeChild(da)}},nodeName:function(cb,ca){return cb.nodeName&&cb.nodeName.toUpperCase()===ca.toUpperCase()},each:function(cb,ca,de){var dc,dd=0,da=cb.length,db=da===bY||b7.isFunction(cb);if(de){if(db){for(dc in cb){if(ca.apply(cb[dc],de)===false){break}}}else{for(;dd<da;){if(ca.apply(cb[dd++],de)===false){break}}}}else{if(db){for(dc in cb){if(ca.call(cb[dc],dc,cb[dc])===false){break}}}else{for(de=cb[0];dd<da&&ca.call(de,dd,de)!==false;de=cb[++dd]){}}}return cb},trim:function(ca){return(ca||"").replace(bX,"")},makeArray:function(cb,ca){ca=ca||[];if(cb!=null){cb.length==null||typeof cb==="string"||b7.isFunction(cb)||typeof cb!=="function"&&cb.setInterval?cp.call(ca,cb):b7.merge(ca,cb)}return ca},inArray:function(cb,ca){if(ca.indexOf){return ca.indexOf(cb)}for(var db=0,da=ca.length;db<da;db++){if(ca[db]===cb){return db}}return -1},merge:function(cb,ca){var dc=cb.length,da=0;if(typeof ca.length==="number"){for(var db=ca.length;da<db;da++){cb[dc++]=ca[da]}}else{for(;ca[da]!==bY;){cb[dc++]=ca[da++]}}cb.length=dc;return cb},grep:function(cb,ca,dd){for(var db=[],dc=0,da=cb.length;dc<da;dc++){!dd!==!ca(cb[dc],dc)&&db.push(cb[dc])}return db},map:function(cb,ca,de){for(var dc=[],dd,da=0,db=cb.length;da<db;da++){dd=ca(cb[da],da,de);if(dd!=null){dc[dc.length]=dd}}return dc.concat.apply([],dc)},guid:1,proxy:function(cb,ca,da){if(arguments.length===2){if(typeof ca==="string"){da=cb;cb=da[ca];ca=bY}else{if(ca&&!b7.isFunction(ca)){da=ca;ca=bY}}}if(!ca&&cb){ca=function(){return cb.apply(da||this,arguments)}}if(cb){ca.guid=cb.guid=cb.guid||ca.guid||b7.guid++}return ca},uaMatch:function(ca){ca=ca.toLowerCase();ca=/(webkit)[ \/]([\w.]+)/.exec(ca)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(ca)||/(msie) ([\w.]+)/.exec(ca)||!/compatible/.test(ca)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(ca)||[];return{browser:ca[1]||"",version:ca[2]||"0"}},browser:{}});co=b7.uaMatch(co);if(co.browser){b7.browser[co.browser]=true;b7.browser.version=co.version}if(b7.browser.webkit){b7.browser.safari=true}if(cX){b7.inArray=function(cb,ca){return cX.call(ca,cb)}}ck=b7(bZ);if(bZ.addEventListener){cs=function(){bZ.removeEventListener("DOMContentLoaded",cs,false);b7.ready()}}else{if(bZ.attachEvent){cs=function(){if(bZ.readyState==="complete"){bZ.detachEvent("onreadystatechange",cs);b7.ready()}}}}(function(){b7.support={};var dg=bZ.documentElement,df=bZ.createElement("script"),de=bZ.createElement("div"),dc="script"+cw();de.style.display="none";de.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var dd=de.getElementsByTagName("*"),da=de.getElementsByTagName("a")[0];if(!(!dd||!dd.length||!da)){b7.support={leadingWhitespace:de.firstChild.nodeType===3,tbody:!de.getElementsByTagName("tbody").length,htmlSerialize:!!de.getElementsByTagName("link").length,style:/red/.test(da.getAttribute("style")),hrefNormalized:da.getAttribute("href")==="/a",opacity:/^0.55$/.test(da.style.opacity),cssFloat:!!da.style.cssFloat,checkOn:de.getElementsByTagName("input")[0].value==="on",optSelected:bZ.createElement("select").appendChild(bZ.createElement("option")).selected,parentNode:de.removeChild(de.appendChild(bZ.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};df.type="text/javascript";try{df.appendChild(bZ.createTextNode("window."+dc+"=1;"))}catch(db){}dg.insertBefore(df,dg.firstChild);if(cF[dc]){b7.support.scriptEval=true;delete cF[dc]}try{delete df.test}catch(ca){b7.support.deleteExpando=false}dg.removeChild(df);if(de.attachEvent&&de.fireEvent){de.attachEvent("onclick",function cb(){b7.support.noCloneEvent=false;de.detachEvent("onclick",cb)});de.cloneNode(true).fireEvent("onclick")}de=bZ.createElement("div");de.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";dg=bZ.createDocumentFragment();dg.appendChild(de.firstChild);b7.support.checkClone=dg.cloneNode(true).cloneNode(true).lastChild.checked;b7(function(){var dh=bZ.createElement("div");dh.style.width=dh.style.paddingLeft="1px";bZ.body.appendChild(dh);b7.boxModel=b7.support.boxModel=dh.offsetWidth===2;bZ.body.removeChild(dh).style.display="none"});dg=function(dh){var dj=bZ.createElement("div");dh="on"+dh;var di=dh in dj;if(!di){dj.setAttribute(dh,"return;");di=typeof dj[dh]==="function"}return di};b7.support.submitBubbles=dg("submit");b7.support.changeBubbles=dg("change");dg=df=de=dd=da=null}})();b7.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var cy="jQuery"+cw(),bz=0,cJ={};b7.extend({cache:{},expando:cy,noData:{embed:true,object:true,applet:true},data:function(cb,ca,dc){if(!(cb.nodeName&&b7.noData[cb.nodeName.toLowerCase()])){cb=cb==cF?cJ:cb;var da=cb[cy],db=b7.cache;if(!da&&typeof ca==="string"&&dc===bY){return null}da||(da=++bz);if(typeof ca==="object"){cb[cy]=da;db[da]=b7.extend(true,{},ca)}else{if(!db[da]){cb[cy]=da;db[da]={}}}cb=db[da];if(dc!==bY){cb[ca]=dc}return typeof ca==="string"?cb[ca]:cb}},removeData:function(cb,ca){if(!(cb.nodeName&&b7.noData[cb.nodeName.toLowerCase()])){cb=cb==cF?cJ:cb;var dc=cb[cy],da=b7.cache,db=da[dc];if(ca){if(db){delete db[ca];b7.isEmptyObject(db)&&b7.removeData(cb)}}else{if(b7.support.deleteExpando){delete cb[b7.expando]}else{cb.removeAttribute&&cb.removeAttribute(b7.expando)}delete da[dc]}}}});b7.fn.extend({data:function(cb,ca){if(typeof cb==="undefined"&&this.length){return b7.data(this[0])}else{if(typeof cb==="object"){return this.each(function(){b7.data(this,cb)})}}var db=cb.split(".");db[1]=db[1]?"."+db[1]:"";if(ca===bY){var da=this.triggerHandler("getData"+db[1]+"!",[db[0]]);if(da===bY&&this.length){da=b7.data(this[0],cb)}return da===bY&&db[1]?this.data(db[0]):da}else{return this.trigger("setData"+db[1]+"!",[db[0],ca]).each(function(){b7.data(this,cb,ca)})}},removeData:function(ca){return this.each(function(){b7.removeData(this,ca)})}});b7.extend({queue:function(cb,ca,db){if(cb){ca=(ca||"fx")+"queue";var da=b7.data(cb,ca);if(!db){return da||[]}if(!da||b7.isArray(db)){da=b7.data(cb,ca,b7.makeArray(db))}else{da.push(db)}return da}},dequeue:function(cb,ca){ca=ca||"fx";var db=b7.queue(cb,ca),da=db.shift();if(da==="inprogress"){da=db.shift()}if(da){ca==="fx"&&db.unshift("inprogress");da.call(cb,function(){b7.dequeue(cb,ca)})}}});b7.fn.extend({queue:function(cb,ca){if(typeof cb!=="string"){ca=cb;cb="fx"}if(ca===bY){return b7.queue(this[0],cb)}return this.each(function(){var da=b7.queue(this,cb,ca);cb==="fx"&&da[0]!=="inprogress"&&b7.dequeue(this,cb)})},dequeue:function(ca){return this.each(function(){b7.dequeue(this,ca)})},delay:function(cb,ca){cb=b7.fx?b7.fx.speeds[cb]||cb:cb;ca=ca||"fx";return this.queue(ca,function(){var da=this;setTimeout(function(){b7.dequeue(da,ca)},cb)})},clearQueue:function(ca){return this.queue(ca||"fx",[])}});var c3=/[\n\t]/g,b1=/\s+/,cZ=/\r/g,cD=/href|src|style/,cL=/(button|input)/i,cn=/(button|input|object|select|textarea)/i,b0=/^(a|area)$/i,cP=/radio|checkbox/;b7.fn.extend({attr:function(cb,ca){return ch(this,cb,ca,true,b7.attr)},removeAttr:function(ca){return this.each(function(){b7.attr(this,ca,"");this.nodeType===1&&this.removeAttribute(ca)})},addClass:function(dg){if(b7.isFunction(dg)){return this.each(function(di){var dh=b7(this);dh.addClass(dg.call(this,di,dh.attr("class")))})}if(dg&&typeof dg==="string"){for(var df=(dg||"").split(b1),de=0,dc=this.length;de<dc;de++){var dd=this[de];if(dd.nodeType===1){if(dd.className){for(var da=" "+dd.className+" ",db=dd.className,ca=0,cb=df.length;ca<cb;ca++){if(da.indexOf(" "+df[ca]+" ")<0){db+=" "+df[ca]}}dd.className=b7.trim(db)}else{dd.className=dg}}}}return this},removeClass:function(cb){if(b7.isFunction(cb)){return this.each(function(dg){var dh=b7(this);dh.removeClass(cb.call(this,dg,dh.attr("class")))})}if(cb&&typeof cb==="string"||cb===bY){for(var ca=(cb||"").split(b1),df=0,dc=this.length;df<dc;df++){var dd=this[df];if(dd.nodeType===1&&dd.className){if(cb){for(var da=(" "+dd.className+" ").replace(c3," "),db=0,de=ca.length;db<de;db++){da=da.replace(" "+ca[db]+" "," ")}dd.className=b7.trim(da)}else{dd.className=""}}}}return this},toggleClass:function(cb,ca){var db=typeof cb,da=typeof ca==="boolean";if(b7.isFunction(cb)){return this.each(function(dd){var dc=b7(this);dc.toggleClass(cb.call(this,dd,dc.attr("class"),ca),ca)})}return this.each(function(){if(db==="string"){for(var df,dd=0,de=b7(this),dg=ca,dc=cb.split(b1);df=dc[dd++];){dg=da?dg:!de.hasClass(df);de[dg?"addClass":"removeClass"](df)}}else{if(db==="undefined"||db==="boolean"){this.className&&b7.data(this,"__className__",this.className);this.className=this.className||cb===false?"":b7.data(this,"__className__")||""}}})},hasClass:function(cb){cb=" "+cb+" ";for(var ca=0,da=this.length;ca<da;ca++){if((" "+this[ca].className+" ").replace(c3," ").indexOf(cb)>-1){return true}}return false},val:function(cb){if(cb===bY){var ca=this[0];if(ca){if(b7.nodeName(ca,"option")){return(ca.attributes.value||{}).specified?ca.value:ca.text}if(b7.nodeName(ca,"select")){var df=ca.selectedIndex,dc=[],dd=ca.options;ca=ca.type==="select-one";if(df<0){return null}var da=ca?df:0;for(df=ca?df+1:dd.length;da<df;da++){var db=dd[da];if(db.selected){cb=b7(db).val();if(ca){return cb}dc.push(cb)}}return dc}if(cP.test(ca.type)&&!b7.support.checkOn){return ca.getAttribute("value")===null?"on":ca.value}return(ca.value||"").replace(cZ,"")}return bY}var de=b7.isFunction(cb);return this.each(function(dg){var dj=b7(this),di=cb;if(this.nodeType===1){if(de){di=cb.call(this,dg,dj.val())}if(typeof di==="number"){di+=""}if(b7.isArray(di)&&cP.test(this.type)){this.checked=b7.inArray(dj.val(),di)>=0}else{if(b7.nodeName(this,"select")){var dh=b7.makeArray(di);b7("option",this).each(function(){this.selected=b7.inArray(b7(this).val(),dh)>=0});if(!dh.length){this.selectedIndex=-1}}else{this.value=di}}}})}});b7.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(cb,ca,dd,db){if(!cb||cb.nodeType===3||cb.nodeType===8){return bY}if(db&&ca in b7.attrFn){return b7(cb)[ca](dd)}db=cb.nodeType!==1||!b7.isXMLDoc(cb);var dc=dd!==bY;ca=db&&b7.props[ca]||ca;if(cb.nodeType===1){var da=cD.test(ca);if(ca in cb&&db&&!da){if(dc){ca==="type"&&cL.test(cb.nodeName)&&cb.parentNode&&b7.error("type property can't be changed");cb[ca]=dd}if(b7.nodeName(cb,"form")&&cb.getAttributeNode(ca)){return cb.getAttributeNode(ca).nodeValue}if(ca==="tabIndex"){return(ca=cb.getAttributeNode("tabIndex"))&&ca.specified?ca.value:cn.test(cb.nodeName)||b0.test(cb.nodeName)&&cb.href?0:bY}return cb[ca]}if(!b7.support.style&&db&&ca==="style"){if(dc){cb.style.cssText=""+dd}return cb.style.cssText}dc&&cb.setAttribute(ca,""+dd);cb=!b7.support.hrefNormalized&&db&&da?cb.getAttribute(ca,2):cb.getAttribute(ca);return cb===null?bY:cb}return b7.style(cb,ca,dd)}});var cq=/\.(.*)$/,bM=function(ca){return ca.replace(/[^\w\s\.\|`]/g,function(cb){return"\\"+cb})};b7.event={add:function(dj,di,dg,de){if(!(dj.nodeType===3||dj.nodeType===8)){if(dj.setInterval&&dj!==cF&&!dj.frameElement){dj=cF}var df,dc;if(dg.handler){df=dg;dg=df.handler}if(!dg.guid){dg.guid=b7.guid++}if(dc=b7.data(dj)){var dd=dc.events=dc.events||{},cb=dc.handle;if(!cb){dc.handle=cb=function(){return typeof b7!=="undefined"&&!b7.event.triggered?b7.event.handle.apply(cb.elem,arguments):bY}}cb.elem=dj;di=di.split(" ");for(var db,da=0,ca;db=di[da++];){dc=df?b7.extend({},df):{handler:dg,data:de};if(db.indexOf(".")>-1){ca=db.split(".");db=ca.shift();dc.namespace=ca.slice(0).sort().join(".")}else{ca=[];dc.namespace=""}dc.type=db;dc.guid=dg.guid;var dk=dd[db],dh=b7.event.special[db]||{};if(!dk){dk=dd[db]=[];if(!dh.setup||dh.setup.call(dj,de,ca,cb)===false){if(dj.addEventListener){dj.addEventListener(db,cb,false)}else{dj.attachEvent&&dj.attachEvent("on"+db,cb)}}}if(dh.add){dh.add.call(dj,dc);if(!dc.handler.guid){dc.handler.guid=dg.guid}}dk.push(dc);b7.event.global[db]=true}dj=null}}},global:{},remove:function(dl,dk,di,dg){if(!(dl.nodeType===3||dl.nodeType===8)){var dh,de=0,df,db,dd,dc,ca,dm,dj=b7.data(dl),cb=dj&&dj.events;if(dj&&cb){if(dk&&dk.type){di=dk.handler;dk=dk.type}if(!dk||typeof dk==="string"&&dk.charAt(0)==="."){dk=dk||"";for(dh in cb){b7.event.remove(dl,dh+dk)}}else{for(dk=dk.split(" ");dh=dk[de++];){dc=dh;df=dh.indexOf(".")<0;db=[];if(!df){db=dh.split(".");dh=db.shift();dd=new RegExp("(^|\\.)"+b7.map(db.slice(0).sort(),bM).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(ca=cb[dh]){if(di){dc=b7.event.special[dh]||{};for(da=dg||0;da<ca.length;da++){dm=ca[da];if(di.guid===dm.guid){if(df||dd.test(dm.namespace)){dg==null&&ca.splice(da--,1);dc.remove&&dc.remove.call(dl,dm)}if(dg!=null){break}}}if(ca.length===0||dg!=null&&ca.length===1){if(!dc.teardown||dc.teardown.call(dl,db)===false){cx(dl,dh,dj.handle)}delete cb[dh]}}else{for(var da=0;da<ca.length;da++){dm=ca[da];if(df||dd.test(dm.namespace)){b7.event.remove(dl,dc,dm.handler,da);ca.splice(da--,1)}}}}}if(b7.isEmptyObject(cb)){if(dk=dj.handle){dk.elem=null}delete dj.events;delete dj.handle;b7.isEmptyObject(dj)&&b7.removeData(dl)}}}}},trigger:function(dh,dg,df,dd){var de=dh.type||dh;if(!dd){dh=typeof dh==="object"?dh[cy]?dh:b7.extend(b7.Event(de),dh):b7.Event(de);if(de.indexOf("!")>=0){dh.type=de=de.slice(0,-1);dh.exclusive=true}if(!df){dh.stopPropagation();b7.event.global[de]&&b7.each(b7.cache,function(){this.events&&this.events[de]&&b7.event.trigger(dh,dg,this.handle.elem)})}if(!df||df.nodeType===3||df.nodeType===8){return bY}dh.result=bY;dh.target=df;dg=b7.makeArray(dg);dg.unshift(dh)}dh.currentTarget=df;(dd=b7.data(df,"handle"))&&dd.apply(df,dg);dd=df.parentNode||df.ownerDocument;try{if(!(df&&df.nodeName&&b7.noData[df.nodeName.toLowerCase()])){if(df["on"+de]&&df["on"+de].apply(df,dg)===false){dh.result=false}}}catch(db){}if(!dh.isPropagationStopped()&&dd){b7.event.trigger(dh,dg,dd,true)}else{if(!dh.isDefaultPrevented()){dd=dh.target;var dc,ca=b7.nodeName(dd,"a")&&de==="click",da=b7.event.special[de]||{};if((!da._default||da._default.call(df,dh)===false)&&!ca&&!(dd&&dd.nodeName&&b7.noData[dd.nodeName.toLowerCase()])){try{if(dd[de]){if(dc=dd["on"+de]){dd["on"+de]=null}b7.event.triggered=true;dd[de]()}}catch(cb){}if(dc){dd["on"+de]=dc}b7.event.triggered=false}}}},handle:function(cb){var ca,de,dc,dd;cb=arguments[0]=b7.event.fix(cb||cF.event);cb.currentTarget=this;ca=cb.type.indexOf(".")<0&&!cb.exclusive;if(!ca){de=cb.type.split(".");cb.type=de.shift();dc=new RegExp("(^|\\.)"+de.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}dd=b7.data(this,"events");de=dd[cb.type];if(dd&&de){de=de.slice(0);dd=0;for(var da=de.length;dd<da;dd++){var db=de[dd];if(ca||dc.test(db.namespace)){cb.handler=db.handler;cb.data=db.data;cb.handleObj=db;db=db.handler.apply(this,arguments);if(db!==bY){cb.result=db;if(db===false){cb.preventDefault();cb.stopPropagation()}}if(cb.isImmediatePropagationStopped()){break}}}}return cb.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(cb){if(cb[cy]){return cb}var ca=cb;cb=b7.Event(ca);for(var db=this.props.length,da;db;){da=this.props[--db];cb[da]=ca[da]}if(!cb.target){cb.target=cb.srcElement||bZ}if(cb.target.nodeType===3){cb.target=cb.target.parentNode}if(!cb.relatedTarget&&cb.fromElement){cb.relatedTarget=cb.fromElement===cb.target?cb.toElement:cb.fromElement}if(cb.pageX==null&&cb.clientX!=null){ca=bZ.documentElement;db=bZ.body;cb.pageX=cb.clientX+(ca&&ca.scrollLeft||db&&db.scrollLeft||0)-(ca&&ca.clientLeft||db&&db.clientLeft||0);cb.pageY=cb.clientY+(ca&&ca.scrollTop||db&&db.scrollTop||0)-(ca&&ca.clientTop||db&&db.clientTop||0)}if(!cb.which&&(cb.charCode||cb.charCode===0?cb.charCode:cb.keyCode)){cb.which=cb.charCode||cb.keyCode}if(!cb.metaKey&&cb.ctrlKey){cb.metaKey=cb.ctrlKey}if(!cb.which&&cb.button!==bY){cb.which=cb.button&1?1:cb.button&2?3:cb.button&4?2:0}return cb},guid:100000000,proxy:b7.proxy,special:{ready:{setup:b7.bindReady,teardown:b7.noop},live:{add:function(ca){b7.event.add(this,ca.origType,b7.extend({},ca,{handler:b6}))},remove:function(cb){var ca=true,da=cb.origType.replace(cq,"");b7.each(b7.data(this,"events").live||[],function(){if(da===this.origType.replace(cq,"")){return ca=false}});ca&&b7.event.remove(this,cb.origType,b6)}},beforeunload:{setup:function(cb,ca,da){if(this.setInterval){this.onbeforeunload=da}return false},teardown:function(cb,ca){if(this.onbeforeunload===ca){this.onbeforeunload=null}}}}};var cx=bZ.removeEventListener?function(cb,ca,da){cb.removeEventListener(ca,da,false)}:function(cb,ca,da){cb.detachEvent("on"+ca,da)};b7.Event=function(ca){if(!this.preventDefault){return new b7.Event(ca)}if(ca&&ca.type){this.originalEvent=ca;this.type=ca.type}else{this.type=ca}this.timeStamp=cw();this[cy]=true};b7.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ce;var ca=this.originalEvent;if(ca){ca.preventDefault&&ca.preventDefault();ca.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=ce;var ca=this.originalEvent;if(ca){ca.stopPropagation&&ca.stopPropagation();ca.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ce;this.stopPropagation()},isDefaultPrevented:cg,isPropagationStopped:cg,isImmediatePropagationStopped:cg};var b4=function(cb){var ca=cb.relatedTarget;try{for(;ca&&ca!==this;){ca=ca.parentNode}if(ca!==this){cb.type=cb.data;b7.event.handle.apply(this,arguments)}}catch(da){}},bQ=function(ca){ca.type=ca.data;b7.event.handle.apply(this,arguments)};b7.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(cb,ca){b7.event.special[cb]={setup:function(da){b7.event.add(this,ca,da&&da.selector?bQ:b4,cb)},teardown:function(da){b7.event.remove(this,ca,da&&da.selector?bQ:b4)}}});if(!b7.support.submitBubbles){b7.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!=="form"){b7.event.add(this,"click.specialSubmit",function(cb){var ca=cb.target,da=ca.type;if((da==="submit"||da==="image")&&b7(ca).closest("form").length){return cB("submit",this,arguments)}});b7.event.add(this,"keypress.specialSubmit",function(cb){var ca=cb.target,da=ca.type;if((da==="text"||da==="password")&&b7(ca).closest("form").length&&cb.keyCode===13){return cB("submit",this,arguments)}})}else{return false}},teardown:function(){b7.event.remove(this,".specialSubmit")}}}if(!b7.support.changeBubbles){var bN=/textarea|input|select/i,bB,bE=function(cb){var ca=cb.type,da=cb.value;if(ca==="radio"||ca==="checkbox"){da=cb.checked}else{if(ca==="select-multiple"){da=cb.selectedIndex>-1?b7.map(cb.options,function(db){return db.selected}).join("-"):""}else{if(cb.nodeName.toLowerCase()==="select"){da=cb.selectedIndex}}}return da},c2=function(cb,ca){var dc=cb.target,da,db;if(!(!bN.test(dc.nodeName)||dc.readOnly)){da=b7.data(dc,"_change_data");db=bE(dc);if(cb.type!=="focusout"||dc.type!=="radio"){b7.data(dc,"_change_data",db)}if(!(da===bY||db===da)){if(da!=null||db){cb.type="change";return b7.event.trigger(cb,ca,dc)}}}};b7.event.special.change={filters:{focusout:c2,click:function(cb){var ca=cb.target,da=ca.type;if(da==="radio"||da==="checkbox"||ca.nodeName.toLowerCase()==="select"){return c2.call(this,cb)}},keydown:function(cb){var ca=cb.target,da=ca.type;if(cb.keyCode===13&&ca.nodeName.toLowerCase()!=="textarea"||cb.keyCode===32&&(da==="checkbox"||da==="radio")||da==="select-multiple"){return c2.call(this,cb)}},beforeactivate:function(ca){ca=ca.target;b7.data(ca,"_change_data",bE(ca))}},setup:function(){if(this.type==="file"){return false}for(var ca in bB){b7.event.add(this,ca+".specialChange",bB[ca])}return bN.test(this.nodeName)},teardown:function(){b7.event.remove(this,".specialChange");return bN.test(this.nodeName)}};bB=b7.event.special.change.filters}bZ.addEventListener&&b7.each({focus:"focusin",blur:"focusout"},function(cb,ca){function da(db){db=b7.event.fix(db);db.type=ca;return b7.event.handle.call(this,db)}b7.event.special[ca]={setup:function(){this.addEventListener(cb,da,true)},teardown:function(){this.removeEventListener(cb,da,true)}}});b7.each(["bind","one"],function(cb,ca){b7.fn[ca]=function(df,dc,dd){if(typeof df==="object"){for(var da in df){this[ca](da,dc,df[da],dd)}return this}if(b7.isFunction(dc)){dd=dc;dc=bY}var db=ca==="one"?b7.proxy(dd,function(dg){b7(this).unbind(dg,db);return dd.apply(this,arguments)}):dd;if(df==="unload"&&ca!=="one"){this.one(df,dc,dd)}else{da=0;for(var de=this.length;da<de;da++){b7.event.add(this[da],df,db,dc)}}return this}});b7.fn.extend({unbind:function(cb,ca){if(typeof cb==="object"&&!cb.preventDefault){for(var db in cb){this.unbind(db,cb[db])}}else{db=0;for(var da=this.length;db<da;db++){b7.event.remove(this[db],cb,ca)}}return this},delegate:function(cb,ca,db,da){return this.live(ca,db,da,cb)},undelegate:function(cb,ca,da){return arguments.length===0?this.unbind("live"):this.die(ca,null,da,cb)},trigger:function(cb,ca){return this.each(function(){b7.event.trigger(cb,ca,this)})},triggerHandler:function(cb,ca){if(this[0]){cb=b7.Event(cb);cb.preventDefault();cb.stopPropagation();b7.event.trigger(cb,ca,this[0]);return cb.result}},toggle:function(cb){for(var ca=arguments,da=1;da<ca.length;){b7.proxy(cb,ca[da++])}return this.click(b7.proxy(cb,function(db){var dc=(b7.data(this,"lastToggle"+cb.guid)||0)%da;b7.data(this,"lastToggle"+cb.guid,dc+1);db.preventDefault();return ca[dc].apply(this,arguments)||false}))},hover:function(cb,ca){return this.mouseenter(cb).mouseleave(ca||cb)}});var c6={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};b7.each(["live","die"],function(cb,ca){b7.fn[ca]=function(di,dg,dh,de){var df,db=0,dd,dc,da=de||this.selector,dj=de?this:b7(this.context);if(b7.isFunction(dg)){dh=dg;dg=bY}for(di=(di||"").split(" ");(df=di[db++])!=null;){de=cq.exec(df);dd="";if(de){dd=de[0];df=df.replace(cq,"")}if(df==="hover"){di.push("mouseenter"+dd,"mouseleave"+dd)}else{dc=df;if(df==="focus"||df==="blur"){di.push(c6[df]+dd);df+=dd}else{df=(c6[df]||df)+dd}ca==="live"?dj.each(function(){b7.event.add(this,bS(df,da),{data:dg,selector:da,handler:dh,origType:df,origHandler:dh,preType:dc})}):dj.unbind(bS(df,da),dh)}}return this}});b7.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(cb,ca){b7.fn[ca]=function(da){return da?this.bind(ca,da):this.trigger(ca)};if(b7.attrFn){b7.attrFn[ca]=true}});cF.attachEvent&&!cF.addEventListener&&cF.attachEvent("onunload",function(){for(var cb in b7.cache){if(b7.cache[cb].handle){try{b7.event.remove(b7.cache[cb].handle.elem)}catch(ca){}}}});(function(){function dp(du){for(var dt="",ds,dr=0;du[dr];dr++){ds=du[dr];if(ds.nodeType===3||ds.nodeType===4){dt+=ds.nodeValue}else{if(ds.nodeType!==8){dt+=dp(ds.childNodes)}}}return dt}function dn(dw,dv,du,dt,dr,ds){dr=0;for(var dy=dt.length;dr<dy;dr++){var dz=dt[dr];if(dz){dz=dz[dw];for(var dx=false;dz;){if(dz.sizcache===du){dx=dt[dz.sizset];break}if(dz.nodeType===1&&!ds){dz.sizcache=du;dz.sizset=dr}if(dz.nodeName.toLowerCase()===dv){dx=dz;break}dz=dz[dw]}dt[dr]=dx}}}function dm(dw,dv,du,dt,dr,ds){dr=0;for(var dy=dt.length;dr<dy;dr++){var dz=dt[dr];if(dz){dz=dz[dw];for(var dx=false;dz;){if(dz.sizcache===du){dx=dt[dz.sizset];break}if(dz.nodeType===1){if(!ds){dz.sizcache=du;dz.sizset=dr}if(typeof dv!=="string"){if(dz===dv){dx=true;break}}else{if(dh.filter(dv,[dz]).length>0){dx=dz;break}}}dz=dz[dw]}dt[dr]=dx}}}var dk=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,dl=0,di=Object.prototype.toString,dj=false,df=true;[0,0].sort(function(){df=false;return 0});var dh=function(dy,dx,dv,du){dv=dv||[];var ds=dx=dx||bZ;if(dx.nodeType!==1&&dx.nodeType!==9){return[]}if(!dy||typeof dy!=="string"){return dv}for(var dt=[],dD,dE,dA,dw,dC=true,dz=cb(dx),dB=dy;(dk.exec(""),dD=dk.exec(dB))!==null;){dB=dD[3];dt.push(dD[1]);if(dD[2]){dw=dD[3];break}}if(dt.length>1&&dd.exec(dy)){if(dt.length===2&&dg.relative[dt[0]]){dE=dq(dt[0]+dt[1],dx)}else{for(dE=dg.relative[dt[0]]?[dx]:dh(dt.shift(),dx);dt.length;){dy=dt.shift();if(dg.relative[dy]){dy+=dt.shift()}dE=dq(dy,dE)}}}else{if(!du&&dt.length>1&&dx.nodeType===9&&!dz&&dg.match.ID.test(dt[0])&&!dg.match.ID.test(dt[dt.length-1])){dD=dh.find(dt.shift(),dx,dz);dx=dD.expr?dh.filter(dD.expr,dD.set)[0]:dD.set[0]}if(dx){dD=du?{expr:dt.pop(),set:ca(du)}:dh.find(dt.pop(),dt.length===1&&(dt[0]==="~"||dt[0]==="+")&&dx.parentNode?dx.parentNode:dx,dz);dE=dD.expr?dh.filter(dD.expr,dD.set):dD.set;if(dt.length>0){dA=ca(dE)}else{dC=false}for(;dt.length;){var dr=dt.pop();dD=dr;if(dg.relative[dr]){dD=dt.pop()}else{dr=""}if(dD==null){dD=dx}dg.relative[dr](dA,dD,dz)}}else{dA=[]}}dA||(dA=dE);dA||dh.error(dr||dy);if(di.call(dA)==="[object Array]"){if(dC){if(dx&&dx.nodeType===1){for(dy=0;dA[dy]!=null;dy++){if(dA[dy]&&(dA[dy]===true||dA[dy].nodeType===1&&db(dx,dA[dy]))){dv.push(dE[dy])}}}else{for(dy=0;dA[dy]!=null;dy++){dA[dy]&&dA[dy].nodeType===1&&dv.push(dE[dy])}}}else{dv.push.apply(dv,dA)}}else{ca(dA,dv)}if(dw){dh(dw,ds,dv,du);dh.uniqueSort(dv)}return dv};dh.uniqueSort=function(ds){if(de){dj=df;ds.sort(de);if(dj){for(var dr=1;dr<ds.length;dr++){ds[dr]===ds[dr-1]&&ds.splice(dr--,1)}}}return ds};dh.matches=function(ds,dr){return dh(ds,null,null,dr)};dh.find=function(dw,dv,du){var dt,dr;if(!dw){return[]}for(var ds=0,dy=dg.order.length;ds<dy;ds++){var dz=dg.order[ds];if(dr=dg.leftMatch[dz].exec(dw)){var dx=dr[1];dr.splice(1,1);if(dx.substr(dx.length-1)!=="\\"){dr[1]=(dr[1]||"").replace(/\\/g,"");dt=dg.find[dz](dr,dv,du);if(dt!=null){dw=dw.replace(dg.match[dz],"");break}}}}dt||(dt=dv.getElementsByTagName("*"));return{set:dt,expr:dw}};dh.filter=function(dz,dy,dw,du){for(var ds=dz,dt=[],dF=dy,dG,dC,dx=dy&&dy[0]&&cb(dy[0]);dz&&dy.length;){for(var dE in dg.filter){if((dG=dg.leftMatch[dE].exec(dz))!=null&&dG[2]){var dA=dg.filter[dE],dD,dr;dr=dG[1];dC=false;dG.splice(1,1);if(dr.substr(dr.length-1)!=="\\"){if(dF===dt){dt=[]}if(dg.preFilter[dE]){if(dG=dg.preFilter[dE](dG,dF,dw,dt,du,dx)){if(dG===true){continue}}else{dC=dD=true}}if(dG){for(var dv=0;(dr=dF[dv])!=null;dv++){if(dr){dD=dA(dr,dG,dv,dF);var dB=du^!!dD;if(dw&&dD!=null){if(dB){dC=true}else{dF[dv]=false}}else{if(dB){dt.push(dr);dC=true}}}}}if(dD!==bY){dw||(dF=dt);dz=dz.replace(dg.match[dE],"");if(!dC){return[]}break}}}}if(dz===ds){if(dC==null){dh.error(dz)}else{break}}ds=dz}return dF};dh.error=function(dr){throw"Syntax error, unrecognized expression: "+dr};var dg=dh.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(dr){return dr.getAttribute("href")}},relative:{"+":function(du,dt){var ds=typeof dt==="string",dr=ds&&!/\W/.test(dt);ds=ds&&!dr;if(dr){dt=dt.toLowerCase()}dr=0;for(var dv=du.length,dw;dr<dv;dr++){if(dw=du[dr]){for(;(dw=dw.previousSibling)&&dw.nodeType!==1;){}du[dr]=ds||dw&&dw.nodeName.toLowerCase()===dt?dw||false:dw===dt}}ds&&dh.filter(dt,du,true)},">":function(du,dt){var ds=typeof dt==="string";if(ds&&!/\W/.test(dt)){dt=dt.toLowerCase();for(var dr=0,dv=du.length;dr<dv;dr++){var dw=du[dr];if(dw){ds=dw.parentNode;du[dr]=ds.nodeName.toLowerCase()===dt?ds:false}}}else{dr=0;for(dv=du.length;dr<dv;dr++){if(dw=du[dr]){du[dr]=ds?dw.parentNode:dw.parentNode===dt}}ds&&dh.filter(dt,du,true)}},"":function(du,dt,ds){var dr=dl++,dv=dm;if(typeof dt==="string"&&!/\W/.test(dt)){var dw=dt=dt.toLowerCase();dv=dn}dv("parentNode",dt,dr,du,dw,ds)},"~":function(du,dt,ds){var dr=dl++,dv=dm;if(typeof dt==="string"&&!/\W/.test(dt)){var dw=dt=dt.toLowerCase();dv=dn}dv("previousSibling",dt,dr,du,dw,ds)}},find:{ID:function(dt,ds,dr){if(typeof ds.getElementById!=="undefined"&&!dr){return(dt=ds.getElementById(dt[1]))?[dt]:[]}},NAME:function(du,dt){if(typeof dt.getElementsByName!=="undefined"){var ds=[];dt=dt.getElementsByName(du[1]);for(var dr=0,dv=dt.length;dr<dv;dr++){dt[dr].getAttribute("name")===du[1]&&ds.push(dt[dr])}return ds.length===0?null:ds}},TAG:function(ds,dr){return dr.getElementsByTagName(ds[1])}},preFilter:{CLASS:function(dv,du,ds,dr,dw,dx){dv=" "+dv[1].replace(/\\/g,"")+" ";if(dx){return dv}dx=0;for(var dt;(dt=du[dx])!=null;dx++){if(dt){if(dw^(dt.className&&(" "+dt.className+" ").replace(/[\t\n]/g," ").indexOf(dv)>=0)){ds||dr.push(dt)}else{if(ds){du[dx]=false}}}}return false},ID:function(dr){return dr[1].replace(/\\/g,"")},TAG:function(dr){return dr[1].toLowerCase()},CHILD:function(ds){if(ds[1]==="nth"){var dr=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(ds[2]==="even"&&"2n"||ds[2]==="odd"&&"2n+1"||!/\D/.test(ds[2])&&"0n+"+ds[2]||ds[2]);ds[2]=dr[1]+(dr[2]||1)-0;ds[3]=dr[3]-0}ds[0]=dl++;return ds},ATTR:function(du,dt,ds,dr,dv,dw){dt=du[1].replace(/\\/g,"");if(!dw&&dg.attrMap[dt]){du[1]=dg.attrMap[dt]}if(du[2]==="~="){du[4]=" "+du[4]+" "}return du},PSEUDO:function(du,dt,ds,dr,dv){if(du[1]==="not"){if((dk.exec(du[3])||"").length>1||/^\w/.test(du[3])){du[3]=dh(du[3],null,null,dt)}else{du=dh.filter(du[3],dt,ds,true^dv);ds||dr.push.apply(dr,du);return false}}else{if(dg.match.POS.test(du[0])||dg.match.CHILD.test(du[0])){return true}}return du},POS:function(dr){dr.unshift(true);return dr}},filters:{enabled:function(dr){return dr.disabled===false&&dr.type!=="hidden"},disabled:function(dr){return dr.disabled===true},checked:function(dr){return dr.checked===true},selected:function(dr){return dr.selected===true},parent:function(dr){return !!dr.firstChild},empty:function(dr){return !dr.firstChild},has:function(dt,ds,dr){return !!dh(dr[3],dt).length},header:function(dr){return/h\d/i.test(dr.nodeName)},text:function(dr){return"text"===dr.type},radio:function(dr){return"radio"===dr.type},checkbox:function(dr){return"checkbox"===dr.type},file:function(dr){return"file"===dr.type},password:function(dr){return"password"===dr.type},submit:function(dr){return"submit"===dr.type},image:function(dr){return"image"===dr.type},reset:function(dr){return"reset"===dr.type},button:function(dr){return"button"===dr.type||dr.nodeName.toLowerCase()==="button"},input:function(dr){return/input|select|textarea|button/i.test(dr.nodeName)}},setFilters:{first:function(ds,dr){return dr===0},last:function(du,dt,ds,dr){return dt===dr.length-1},even:function(ds,dr){return dr%2===0},odd:function(ds,dr){return dr%2===1},lt:function(dt,ds,dr){return ds<dr[3]-0},gt:function(dt,ds,dr){return ds>dr[3]-0},nth:function(dt,ds,dr){return dr[3]-0===ds},eq:function(dt,ds,dr){return dr[3]-0===ds}},filter:{PSEUDO:function(du,dt,ds,dr){var dv=dt[1],dw=dg.filters[dv];if(dw){return dw(du,ds,dt,dr)}else{if(dv==="contains"){return(du.textContent||du.innerText||dp([du])||"").indexOf(dt[3])>=0}else{if(dv==="not"){dt=dt[3];ds=0;for(dr=dt.length;ds<dr;ds++){if(dt[ds]===du){return false}}return true}else{dh.error("Syntax error, unrecognized expression: "+dv)}}}},CHILD:function(dv,du){var ds=du[1],dr=dv;switch(ds){case"only":case"first":for(;dr=dr.previousSibling;){if(dr.nodeType===1){return false}}if(ds==="first"){return true}dr=dv;case"last":for(;dr=dr.nextSibling;){if(dr.nodeType===1){return false}}return true;case"nth":ds=du[2];var dw=du[3];if(ds===1&&dw===0){return true}du=du[0];var dx=dv.parentNode;if(dx&&(dx.sizcache!==du||!dv.nodeIndex)){var dt=0;for(dr=dx.firstChild;dr;dr=dr.nextSibling){if(dr.nodeType===1){dr.nodeIndex=++dt}}dx.sizcache=du}dv=dv.nodeIndex-dw;return ds===0?dv===0:dv%ds===0&&dv/ds>=0}},ID:function(ds,dr){return ds.nodeType===1&&ds.getAttribute("id")===dr},TAG:function(ds,dr){return dr==="*"&&ds.nodeType===1||ds.nodeName.toLowerCase()===dr},CLASS:function(ds,dr){return(" "+(ds.className||ds.getAttribute("class"))+" ").indexOf(dr)>-1},ATTR:function(du,dt){var ds=dt[1];du=dg.attrHandle[ds]?dg.attrHandle[ds](du):du[ds]!=null?du[ds]:du.getAttribute(ds);ds=du+"";var dr=dt[2];dt=dt[4];return du==null?dr==="!=":dr==="="?ds===dt:dr==="*="?ds.indexOf(dt)>=0:dr==="~="?(" "+ds+" ").indexOf(dt)>=0:!dt?ds&&du!==false:dr==="!="?ds!==dt:dr==="^="?ds.indexOf(dt)===0:dr==="$="?ds.substr(ds.length-dt.length)===dt:dr==="|="?ds===dt||ds.substr(0,dt.length+1)===dt+"-":false},POS:function(du,dt,ds,dr){var dv=dg.setFilters[dt[2]];if(dv){return dv(du,ds,dt,dr)}}}},dd=dg.match.POS;for(var da in dg.match){dg.match[da]=new RegExp(dg.match[da].source+/(?![^\[]*\])(?![^\(]*\))/.source);dg.leftMatch[da]=new RegExp(/(^(?:.|\r|\n)*?)/.source+dg.match[da].source.replace(/\\(\d+)/g,function(ds,dr){return"\\"+(dr-0+1)}))}var ca=function(ds,dr){ds=Array.prototype.slice.call(ds,0);if(dr){dr.push.apply(dr,ds);return dr}return ds};try{Array.prototype.slice.call(bZ.documentElement.childNodes,0)}catch(dc){ca=function(du,dt){dt=dt||[];if(di.call(du)==="[object Array]"){Array.prototype.push.apply(dt,du)}else{if(typeof du.length==="number"){for(var ds=0,dr=du.length;ds<dr;ds++){dt.push(du[ds])}}else{for(ds=0;du[ds];ds++){dt.push(du[ds])}}}return dt}}var de;if(bZ.documentElement.compareDocumentPosition){de=function(ds,dr){if(!ds.compareDocumentPosition||!dr.compareDocumentPosition){if(ds==dr){dj=true}return ds.compareDocumentPosition?-1:1}ds=ds.compareDocumentPosition(dr)&4?-1:ds===dr?0:1;if(ds===0){dj=true}return ds}}else{if("sourceIndex" in bZ.documentElement){de=function(ds,dr){if(!ds.sourceIndex||!dr.sourceIndex){if(ds==dr){dj=true}return ds.sourceIndex?-1:1}ds=ds.sourceIndex-dr.sourceIndex;if(ds===0){dj=true}return ds}}else{if(bZ.createRange){de=function(du,dt){if(!du.ownerDocument||!dt.ownerDocument){if(du==dt){dj=true}return du.ownerDocument?-1:1}var ds=du.ownerDocument.createRange(),dr=dt.ownerDocument.createRange();ds.setStart(du,0);ds.setEnd(du,0);dr.setStart(dt,0);dr.setEnd(dt,0);du=ds.compareBoundaryPoints(Range.START_TO_END,dr);if(du===0){dj=true}return du}}}}(function(){var dt=bZ.createElement("div"),ds="script"+(new Date).getTime();dt.innerHTML="<a name='"+ds+"'/>";var dr=bZ.documentElement;dr.insertBefore(dt,dr.firstChild);if(bZ.getElementById(ds)){dg.find.ID=function(du,dv,dw){if(typeof dv.getElementById!=="undefined"&&!dw){return(dv=dv.getElementById(du[1]))?dv.id===du[1]||typeof dv.getAttributeNode!=="undefined"&&dv.getAttributeNode("id").nodeValue===du[1]?[dv]:bY:[]}};dg.filter.ID=function(du,dv){var dw=typeof du.getAttributeNode!=="undefined"&&du.getAttributeNode("id");return du.nodeType===1&&dw&&dw.nodeValue===dv}}dr.removeChild(dt);dr=dt=null})();(function(){var dr=bZ.createElement("div");dr.appendChild(bZ.createComment(""));if(dr.getElementsByTagName("*").length>0){dg.find.TAG=function(du,dt){dt=dt.getElementsByTagName(du[1]);if(du[1]==="*"){du=[];for(var ds=0;dt[ds];ds++){dt[ds].nodeType===1&&du.push(dt[ds])}dt=du}return dt}}dr.innerHTML="<a href='#'></a>";if(dr.firstChild&&typeof dr.firstChild.getAttribute!=="undefined"&&dr.firstChild.getAttribute("href")!=="#"){dg.attrHandle.href=function(ds){return ds.getAttribute("href",2)}}dr=null})();bZ.querySelectorAll&&function(){var dt=dh,ds=bZ.createElement("div");ds.innerHTML="<p class='TEST'></p>";if(!(ds.querySelectorAll&&ds.querySelectorAll(".TEST").length===0)){dh=function(du,dx,dy,dv){dx=dx||bZ;if(!dv&&dx.nodeType===9&&!cb(dx)){try{return ca(dx.querySelectorAll(du),dy)}catch(dw){}}return dt(du,dx,dy,dv)};for(var dr in dt){dh[dr]=dt[dr]}ds=null}}();(function(){var dr=bZ.createElement("div");dr.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!dr.getElementsByClassName||dr.getElementsByClassName("e").length===0)){dr.lastChild.className="e";if(dr.getElementsByClassName("e").length!==1){dg.order.splice(1,0,"CLASS");dg.find.CLASS=function(du,dt,ds){if(typeof dt.getElementsByClassName!=="undefined"&&!ds){return dt.getElementsByClassName(du[1])}};dr=null}}})();var db=bZ.compareDocumentPosition?function(ds,dr){return !!(ds.compareDocumentPosition(dr)&16)}:function(ds,dr){return ds!==dr&&(ds.contains?ds.contains(dr):true)},cb=function(dr){return(dr=(dr?dr.ownerDocument||dr:0).documentElement)?dr.nodeName!=="HTML":false},dq=function(du,dt){var ds=[],dr="",dv;for(dt=dt.nodeType?[dt]:dt;dv=dg.match.PSEUDO.exec(du);){dr+=dv[0];du=du.replace(dg.match.PSEUDO,"")}du=dg.relative[du]?du+"*":du;dv=0;for(var dw=dt.length;dv<dw;dv++){dh(du,dt[dv],ds)}return dh.filter(dr,ds)};b7.find=dh;b7.expr=dh.selectors;b7.expr[":"]=b7.expr.filters;b7.unique=dh.uniqueSort;b7.text=dp;b7.isXMLDoc=cb;b7.contains=db})();var bA=/Until$/,c0=/^(?:parents|prevUntil|prevAll)/,cN=/,/;cl=Array.prototype.slice;var cC=function(cb,ca,db){if(b7.isFunction(ca)){return b7.grep(cb,function(dd,dc){return !!ca.call(dd,dc,dd)===db})}else{if(ca.nodeType){return b7.grep(cb,function(dc){return dc===ca===db})}else{if(typeof ca==="string"){var da=b7.grep(cb,function(dc){return dc.nodeType===1});if(cK.test(ca)){return b7.filter(ca,da,!db)}else{ca=b7.filter(ca,da)}}}}return b7.grep(cb,function(dc){return b7.inArray(dc,ca)>=0===db})};b7.fn.extend({find:function(cb){for(var ca=this.pushStack("","find",cb),de=0,dc=0,dd=this.length;dc<dd;dc++){de=ca.length;b7.find(cb,this[dc],ca);if(dc>0){for(var da=de;da<ca.length;da++){for(var db=0;db<de;db++){if(ca[db]===ca[da]){ca.splice(da--,1);break}}}}}return ca},has:function(cb){var ca=b7(cb);return this.filter(function(){for(var db=0,da=ca.length;db<da;db++){if(b7.contains(this,ca[db])){return true}}})},not:function(ca){return this.pushStack(cC(this,ca,false),"not",ca)},filter:function(ca){return this.pushStack(cC(this,ca,true),"filter",ca)},is:function(ca){return !!ca&&b7.filter(ca,this).length>0},closest:function(dg,df){if(b7.isArray(dg)){var de=[],dc=this[0],dd,da={},db;if(dc&&dg.length){dd=0;for(var ca=dg.length;dd<ca;dd++){db=dg[dd];da[db]||(da[db]=b7.expr.match.POS.test(db)?b7(db,df||this.context):db)}for(;dc&&dc.ownerDocument&&dc!==df;){for(db in da){dd=da[db];if(dd.jquery?dd.index(dc)>-1:b7(dc).is(dd)){de.push({selector:db,elem:dc});delete da[db]}}dc=dc.parentNode}}return de}var cb=b7.expr.match.POS.test(dg)?b7(dg,df||this.context):null;return this.map(function(di,dh){for(;dh&&dh.ownerDocument&&dh!==df;){if(cb?cb.index(dh)>-1:b7(dh).is(dg)){return dh}dh=dh.parentNode}return null})},index:function(ca){if(!ca||typeof ca==="string"){return b7.inArray(this[0],ca?b7(ca):this.parent().children())}return b7.inArray(ca.jquery?ca[0]:ca,this)},add:function(cb,ca){cb=typeof cb==="string"?b7(cb,ca||this.context):b7.makeArray(cb);ca=b7.merge(this.get(),cb);return this.pushStack(bG(cb[0])||bG(ca[0])?ca:b7.unique(ca))},andSelf:function(){return this.add(this.prevObject)}});b7.each({parent:function(ca){return(ca=ca.parentNode)&&ca.nodeType!==11?ca:null},parents:function(ca){return b7.dir(ca,"parentNode")},parentsUntil:function(cb,ca,da){return b7.dir(cb,"parentNode",da)},next:function(ca){return b7.nth(ca,2,"nextSibling")},prev:function(ca){return b7.nth(ca,2,"previousSibling")},nextAll:function(ca){return b7.dir(ca,"nextSibling")},prevAll:function(ca){return b7.dir(ca,"previousSibling")},nextUntil:function(cb,ca,da){return b7.dir(cb,"nextSibling",da)},prevUntil:function(cb,ca,da){return b7.dir(cb,"previousSibling",da)},siblings:function(ca){return b7.sibling(ca.parentNode.firstChild,ca)},children:function(ca){return b7.sibling(ca.firstChild)},contents:function(ca){return b7.nodeName(ca,"iframe")?ca.contentDocument||ca.contentWindow.document:b7.makeArray(ca.childNodes)}},function(cb,ca){b7.fn[cb]=function(dc,da){var db=b7.map(this,ca,dc);bA.test(cb)||(da=dc);if(da&&typeof da==="string"){db=b7.filter(da,db)}db=this.length>1?b7.unique(db):db;if((this.length>1||cN.test(da))&&c0.test(cb)){db=db.reverse()}return this.pushStack(db,cb,cl.call(arguments).join(","))}});b7.extend({filter:function(cb,ca,da){if(da){cb=":not("+cb+")"}return b7.find.matches(cb,ca)},dir:function(cb,ca,db){var da=[];for(cb=cb[ca];cb&&cb.nodeType!==9&&(db===bY||cb.nodeType!==1||!b7(cb).is(db));){cb.nodeType===1&&da.push(cb);cb=cb[ca]}return da},nth:function(cb,ca,db){ca=ca||1;for(var da=0;cb;cb=cb[db]){if(cb.nodeType===1&&++da===ca){break}}return cb},sibling:function(cb,ca){for(var da=[];cb;cb=cb.nextSibling){cb.nodeType===1&&cb!==ca&&da.push(cb)}return da}});var b8=/ jQuery\d+="(?:\d+|null)"/g,cj=/^\s+/,bT=/(<([\w:]+)[^>]*?)\/>/g,cu=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,bH=/<([\w:]+)/,b2=/<tbody/i,bO=/<|&#?\w+;/,cG=/<script|<object|<embed|<option|<style/i,cc=/checked\s*(?:[^=]|=\s*.checked.)/i,c9=function(cb,ca,da){return cu.test(da)?cb:ca+"></"+da+">"},cA={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};cA.optgroup=cA.option;cA.tbody=cA.tfoot=cA.colgroup=cA.caption=cA.thead;cA.th=cA.td;if(!b7.support.htmlSerialize){cA._default=[1,"div<div>","</div>"]}b7.fn.extend({text:function(ca){if(b7.isFunction(ca)){return this.each(function(cb){var da=b7(this);da.text(ca.call(this,cb,da.text()))})}if(typeof ca!=="object"&&ca!==bY){return this.empty().append((this[0]&&this[0].ownerDocument||bZ).createTextNode(ca))}return b7.text(this)},wrapAll:function(cb){if(b7.isFunction(cb)){return this.each(function(da){b7(this).wrapAll(cb.call(this,da))})}if(this[0]){var ca=b7(cb,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&ca.insertBefore(this[0]);ca.map(function(){for(var da=this;da.firstChild&&da.firstChild.nodeType===1;){da=da.firstChild}return da}).append(this)}return this},wrapInner:function(ca){if(b7.isFunction(ca)){return this.each(function(cb){b7(this).wrapInner(ca.call(this,cb))})}return this.each(function(){var cb=b7(this),da=cb.contents();da.length?da.wrapAll(ca):cb.append(ca)})},wrap:function(ca){return this.each(function(){b7(this).wrapAll(ca)})},unwrap:function(){return this.parent().each(function(){b7.nodeName(this,"body")||b7(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(ca){this.nodeType===1&&this.appendChild(ca)})},prepend:function(){return this.domManip(arguments,true,function(ca){this.nodeType===1&&this.insertBefore(ca,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(cb){this.parentNode.insertBefore(cb,this)})}else{if(arguments.length){var ca=b7(arguments[0]);ca.push.apply(ca,this.toArray());return this.pushStack(ca,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(cb){this.parentNode.insertBefore(cb,this.nextSibling)})}else{if(arguments.length){var ca=this.pushStack(this,"after",arguments);ca.push.apply(ca,b7(arguments[0]).toArray());return ca}}},remove:function(cb,ca){for(var db=0,da;(da=this[db])!=null;db++){if(!cb||b7.filter(cb,[da]).length){if(!ca&&da.nodeType===1){b7.cleanData(da.getElementsByTagName("*"));b7.cleanData([da])}da.parentNode&&da.parentNode.removeChild(da)}}return this},empty:function(){for(var cb=0,ca;(ca=this[cb])!=null;cb++){for(ca.nodeType===1&&b7.cleanData(ca.getElementsByTagName("*"));ca.firstChild;){ca.removeChild(ca.firstChild)}}return this},clone:function(cb){var ca=this.map(function(){if(!b7.support.noCloneEvent&&!b7.isXMLDoc(this)){var db=this.outerHTML,da=this.ownerDocument;if(!db){db=da.createElement("div");db.appendChild(this.cloneNode(true));db=db.innerHTML}return b7.clean([db.replace(b8,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(cj,"")],da)[0]}else{return this.cloneNode(true)}});if(cb===true){c8(this,ca);c8(this.find("*"),ca.find("*"))}return ca},html:function(cb){if(cb===bY){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(b8,""):null}else{if(typeof cb==="string"&&!cG.test(cb)&&(b7.support.leadingWhitespace||!cj.test(cb))&&!cA[(bH.exec(cb)||["",""])[1].toLowerCase()]){cb=cb.replace(bT,c9);try{for(var ca=0,db=this.length;ca<db;ca++){if(this[ca].nodeType===1){b7.cleanData(this[ca].getElementsByTagName("*"));this[ca].innerHTML=cb}}}catch(da){this.empty().append(cb)}}else{b7.isFunction(cb)?this.each(function(de){var dc=b7(this),dd=dc.html();dc.empty().append(function(){return cb.call(this,de,dd)})}):this.empty().append(cb)}}return this},replaceWith:function(ca){if(this[0]&&this[0].parentNode){if(b7.isFunction(ca)){return this.each(function(cb){var db=b7(this),da=db.html();db.replaceWith(ca.call(this,cb,da))})}if(typeof ca!=="string"){ca=b7(ca).detach()}return this.each(function(){var cb=this.nextSibling,da=this.parentNode;b7(this).remove();cb?b7(cb).before(ca):b7(da).append(ca)})}else{return this.pushStack(b7(b7.isFunction(ca)?ca():ca),"replaceWith",ca)}},detach:function(ca){return this.remove(ca,true)},domManip:function(di,dh,dg){function de(dj){return b7.nodeName(dj,"table")?dj.getElementsByTagName("tbody")[0]||dj.appendChild(dj.ownerDocument.createElement("tbody")):dj}var df,dc,dd=di[0],cb=[],db;if(!b7.support.checkClone&&arguments.length===3&&typeof dd==="string"&&cc.test(dd)){return this.each(function(){b7(this).domManip(di,dh,dg,true)})}if(b7.isFunction(dd)){return this.each(function(dj){var dk=b7(this);di[0]=dd.call(this,dj,dh?dk.html():bY);dk.domManip(di,dh,dg)})}if(this[0]){df=dd&&dd.parentNode;df=b7.support.parentNode&&df&&df.nodeType===11&&df.childNodes.length===this.length?{fragment:df}:cU(di,this,cb);db=df.fragment;if(dc=db.childNodes.length===1?(db=db.firstChild):db.firstChild){dh=dh&&b7.nodeName(dc,"tr");for(var da=0,ca=this.length;da<ca;da++){dg.call(dh?de(this[da],dc):this[da],da>0||df.cacheable||this.length>1?db.cloneNode(true):db)}}cb.length&&b7.each(cb,bW)}return this}});b7.fragments={};b7.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(cb,ca){b7.fn[cb]=function(de){var dc=[];de=b7(de);var dd=this.length===1&&this[0].parentNode;if(dd&&dd.nodeType===11&&dd.childNodes.length===1&&de.length===1){de[ca](this[0]);return this}else{dd=0;for(var da=de.length;dd<da;dd++){var db=(dd>0?this.clone(true):this).get();b7.fn[ca].apply(b7(de[dd]),db);dc=dc.concat(db)}return this.pushStack(dc,cb,de.selector)}}});b7.extend({clean:function(di,dh,dg,de){dh=dh||bZ;if(typeof dh.createElement==="undefined"){dh=dh.ownerDocument||dh[0]&&dh[0].ownerDocument||bZ}for(var df=[],dc=0,dd;(dd=di[dc])!=null;dc++){if(typeof dd==="number"){dd+=""}if(dd){if(typeof dd==="string"&&!bO.test(dd)){dd=dh.createTextNode(dd)}else{if(typeof dd==="string"){dd=dd.replace(bT,c9);var cb=(bH.exec(dd)||["",""])[1].toLowerCase(),db=cA[cb]||cA._default,da=db[0],ca=dh.createElement("div");for(ca.innerHTML=db[1]+dd+db[2];da--;){ca=ca.lastChild}if(!b7.support.tbody){da=b2.test(dd);cb=cb==="table"&&!da?ca.firstChild&&ca.firstChild.childNodes:db[1]==="<table>"&&!da?ca.childNodes:[];for(db=cb.length-1;db>=0;--db){b7.nodeName(cb[db],"tbody")&&!cb[db].childNodes.length&&cb[db].parentNode.removeChild(cb[db])}}!b7.support.leadingWhitespace&&cj.test(dd)&&ca.insertBefore(dh.createTextNode(cj.exec(dd)[0]),ca.firstChild);dd=ca.childNodes}}if(dd.nodeType){df.push(dd)}else{df=b7.merge(df,dd)}}}if(dg){for(dc=0;df[dc];dc++){if(de&&b7.nodeName(df[dc],"script")&&(!df[dc].type||df[dc].type.toLowerCase()==="text/javascript")){de.push(df[dc].parentNode?df[dc].parentNode.removeChild(df[dc]):df[dc])}else{df[dc].nodeType===1&&df.splice.apply(df,[dc+1,0].concat(b7.makeArray(df[dc].getElementsByTagName("script"))));dg.appendChild(df[dc])}}}return df},cleanData:function(dg){for(var df,de,dc=b7.cache,dd=b7.event.special,da=b7.support.deleteExpando,db=0,ca;(ca=dg[db])!=null;db++){if(de=ca[b7.expando]){df=dc[de];if(df.events){for(var cb in df.events){dd[cb]?b7.event.remove(ca,cb):cx(ca,cb,df.handle)}}if(da){delete ca[b7.expando]}else{ca.removeAttribute&&ca.removeAttribute(b7.expando)}delete dc[de]}}}});var bC=/z-?index|font-?weight|opacity|zoom|line-?height/i,cV=/alpha\([^)]*\)/,cH=/opacity=([^)]*)/,cv=/float/i,b3=/-([a-z])/ig,c4=/([A-Z])/g,cQ=/^-?\d+(?:px)?$/i,cz=/^-?\d/,b5={position:"absolute",visibility:"hidden",display:"block"},bR=["Left","Right"],bF=["Top","Bottom"],c7=bZ.defaultView&&bZ.defaultView.getComputedStyle,cd=b7.support.cssFloat?"cssFloat":"styleFloat",bP=function(cb,ca){return ca.toUpperCase()};b7.fn.css=function(cb,ca){return ch(this,cb,ca,true,function(dc,da,db){if(db===bY){return b7.curCSS(dc,da)}if(typeof db==="number"&&!bC.test(da)){db+="px"}b7.style(dc,da,db)})};b7.extend({style:function(cb,ca,dc){if(!cb||cb.nodeType===3||cb.nodeType===8){return bY}if((ca==="width"||ca==="height")&&parseFloat(dc)<0){dc=bY}var da=cb.style||cb,db=dc!==bY;if(!b7.support.opacity&&ca==="opacity"){if(db){da.zoom=1;ca=parseInt(dc,10)+""==="NaN"?"":"alpha(opacity="+dc*100+")";cb=da.filter||b7.curCSS(cb,"filter")||"";da.filter=cV.test(cb)?cb.replace(cV,ca):ca}return da.filter&&da.filter.indexOf("opacity=")>=0?parseFloat(cH.exec(da.filter)[1])/100+"":""}if(cv.test(ca)){ca=cd}ca=ca.replace(b3,bP);if(db){da[ca]=dc}return da[ca]},css:function(cb,ca,de,dc){if(ca==="width"||ca==="height"){var dd,da=ca==="width"?bR:bF;function db(){dd=ca==="width"?cb.offsetWidth:cb.offsetHeight;dc!=="border"&&b7.each(da,function(){dc||(dd-=parseFloat(b7.curCSS(cb,"padding"+this,true))||0);if(dc==="margin"){dd+=parseFloat(b7.curCSS(cb,"margin"+this,true))||0}else{dd-=parseFloat(b7.curCSS(cb,"border"+this+"Width",true))||0}})}cb.offsetWidth!==0?db():b7.swap(cb,b5,db);return Math.max(0,Math.round(dd))}return b7.curCSS(cb,ca,de)},curCSS:function(cb,ca,dd){var db,dc=cb.style;if(!b7.support.opacity&&ca==="opacity"&&cb.currentStyle){db=cH.test(cb.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return db===""?"1":db}if(cv.test(ca)){ca=cd}if(!dd&&dc&&dc[ca]){db=dc[ca]}else{if(c7){if(cv.test(ca)){ca="float"}ca=ca.replace(c4,"-$1").toLowerCase();dc=cb.ownerDocument.defaultView;if(!dc){return null}if(cb=dc.getComputedStyle(cb,null)){db=cb.getPropertyValue(ca)}if(ca==="opacity"&&db===""){db="1"}}else{if(cb.currentStyle){dd=ca.replace(b3,bP);db=cb.currentStyle[ca]||cb.currentStyle[dd];if(!cQ.test(db)&&cz.test(db)){ca=dc.left;var da=cb.runtimeStyle.left;cb.runtimeStyle.left=cb.currentStyle.left;dc.left=dd==="fontSize"?"1em":db||0;db=dc.pixelLeft+"px";dc.left=ca;cb.runtimeStyle.left=da}}}}return db},swap:function(cb,ca,dc){var da={};for(var db in ca){da[db]=cb.style[db];cb.style[db]=ca[db]}dc.call(cb);for(db in ca){cb.style[db]=da[db]}}});if(b7.expr&&b7.expr.filters){b7.expr.filters.hidden=function(cb){var ca=cb.offsetWidth,db=cb.offsetHeight,da=cb.nodeName.toLowerCase()==="tr";return ca===0&&db===0&&!da?true:ca>0&&db>0&&!da?false:b7.curCSS(cb,"display")==="none"};b7.expr.filters.visible=function(ca){return !b7.expr.filters.hidden(ca)}}var cT=cw(),cE=/<script(.|\s)*?\/script>/gi,b9=/select|textarea/i,bU=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,cr=/=\?(&|$)/,bD=/\?/,bI=/(\?|&)_=.*?(&|$)/,bw=/^(\w+:)?\/\/([^\/?#]+)/,cW=/%20/g,cI=b7.fn.load;b7.fn.extend({load:function(cb,ca,dd){if(typeof cb!=="string"){return cI.call(this,cb)}else{if(!this.length){return this}}var db=cb.indexOf(" ");if(db>=0){var dc=cb.slice(db,cb.length);cb=cb.slice(0,db)}db="GET";if(ca){if(b7.isFunction(ca)){dd=ca;ca=null}else{if(typeof ca==="object"){ca=b7.param(ca,b7.ajaxSettings.traditional);db="POST"}}}var da=this;b7.ajax({url:cb,type:db,dataType:"html",data:ca,complete:function(de,df){if(df==="success"||df==="notmodified"){da.html(dc?b7("<div />").append(de.responseText.replace(cE,"")).find(dc):de.responseText)}dd&&da.each(dd,[de.responseText,df,de])}});return this},serialize:function(){return b7.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b7.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||b9.test(this.nodeName)||bU.test(this.type))}).map(function(cb,ca){cb=b7(this).val();return cb==null?null:b7.isArray(cb)?b7.map(cb,function(da){return{name:ca.name,value:da}}):{name:ca.name,value:cb}}).get()}});b7.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(cb,ca){b7.fn[ca]=function(da){return this.bind(ca,da)}});b7.extend({get:function(cb,ca,db,da){if(b7.isFunction(ca)){da=da||db;db=ca;ca=null}return b7.ajax({type:"GET",url:cb,data:ca,success:db,dataType:da})},getScript:function(cb,ca){return b7.get(cb,null,ca,"script")},getJSON:function(cb,ca,da){return b7.get(cb,ca,da,"json")},post:function(cb,ca,db,da){if(b7.isFunction(ca)){da=da||db;db=ca;ca={}}return b7.ajax({type:"POST",url:cb,data:ca,success:db,dataType:da})},ajaxSetup:function(ca){b7.extend(b7.ajaxSettings,ca)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:cF.XMLHttpRequest&&(cF.location.protocol!=="file:"||!cF.ActiveXObject)?function(){return new cF.XMLHttpRequest}:function(){try{return new cF.ActiveXObject("Microsoft.XMLHTTP")}catch(ca){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(dt){function ds(){dq.success&&dq.success.call(dj,df,dl,cb);dq.global&&dp("ajaxSuccess",[cb,dq])}function dr(){dq.complete&&dq.complete.call(dj,cb,dl);dq.global&&dp("ajaxComplete",[cb,dq]);dq.global&&!--b7.active&&b7.event.trigger("ajaxStop")}function dp(dv,dw){(dq.context?b7(dq.context):b7.event).trigger(dv,dw)}var dq=b7.extend(true,{},b7.ajaxSettings,dt),dk,dl,df,dj=dt&&dt.context||dq,dg=dq.type.toUpperCase();if(dq.data&&dq.processData&&typeof dq.data!=="string"){dq.data=b7.param(dq.data,dq.traditional)}if(dq.dataType==="jsonp"){if(dg==="GET"){cr.test(dq.url)||(dq.url+=(bD.test(dq.url)?"&":"?")+(dq.jsonp||"callback")+"=?")}else{if(!dq.data||!cr.test(dq.data)){dq.data=(dq.data?dq.data+"&":"")+(dq.jsonp||"callback")+"=?"}}dq.dataType="json"}if(dq.dataType==="json"&&(dq.data&&cr.test(dq.data)||cr.test(dq.url))){dk=dq.jsonpCallback||"jsonp"+cT++;if(dq.data){dq.data=(dq.data+"").replace(cr,"="+dk+"$1")}dq.url=dq.url.replace(cr,"="+dk+"$1");dq.dataType="script";cF[dk]=cF[dk]||function(dv){df=dv;ds();dr();cF[dk]=bY;try{delete cF[dk]}catch(dw){}ca&&ca.removeChild(dc)}}if(dq.dataType==="script"&&dq.cache===null){dq.cache=false}if(dq.cache===false&&dg==="GET"){var dd=cw(),da=dq.url.replace(bI,"$1_="+dd+"$2");dq.url=da+(da===dq.url?(bD.test(dq.url)?"&":"?")+"_="+dd:"")}if(dq.data&&dg==="GET"){dq.url+=(bD.test(dq.url)?"&":"?")+dq.data}dq.global&&!b7.active++&&b7.event.trigger("ajaxStart");dd=(dd=bw.exec(dq.url))&&(dd[1]&&dd[1]!==location.protocol||dd[2]!==location.host);if(dq.dataType==="script"&&dg==="GET"&&dd){var ca=bZ.getElementsByTagName("head")[0]||bZ.documentElement,dc=bZ.createElement("script");dc.src=dq.url;if(dq.scriptCharset){dc.charset=dq.scriptCharset}if(!dk){var de=false;dc.onload=dc.onreadystatechange=function(){if(!de&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){de=true;ds();dr();dc.onload=dc.onreadystatechange=null;ca&&dc.parentNode&&ca.removeChild(dc)}}}ca.insertBefore(dc,ca.firstChild);return bY}var db=false,cb=dq.xhr();if(cb){dq.username?cb.open(dg,dq.url,dq.async,dq.username,dq.password):cb.open(dg,dq.url,dq.async);try{if(dq.data||dt&&dt.contentType){cb.setRequestHeader("Content-Type",dq.contentType)}if(dq.ifModified){b7.lastModified[dq.url]&&cb.setRequestHeader("If-Modified-Since",b7.lastModified[dq.url]);b7.etag[dq.url]&&cb.setRequestHeader("If-None-Match",b7.etag[dq.url])}dd||cb.setRequestHeader("X-Requested-With","XMLHttpRequest");cb.setRequestHeader("Accept",dq.dataType&&dq.accepts[dq.dataType]?dq.accepts[dq.dataType]+", */*":dq.accepts._default)}catch(du){}if(dq.beforeSend&&dq.beforeSend.call(dj,cb,dq)===false){dq.global&&!--b7.active&&b7.event.trigger("ajaxStop");cb.abort();return false}dq.global&&dp("ajaxSend",[cb,dq]);var dn=cb.onreadystatechange=function(dw){if(!cb||cb.readyState===0||dw==="abort"){db||dr();db=true;if(cb){cb.onreadystatechange=b7.noop}}else{if(!db&&cb&&(cb.readyState===4||dw==="timeout")){db=true;cb.onreadystatechange=b7.noop;dl=dw==="timeout"?"timeout":!b7.httpSuccess(cb)?"error":dq.ifModified&&b7.httpNotModified(cb,dq.url)?"notmodified":"success";var dx;if(dl==="success"){try{df=b7.httpData(cb,dq.dataType,dq)}catch(dv){dl="parsererror";dx=dv}}if(dl==="success"||dl==="notmodified"){dk||ds()}else{b7.handleError(dq,cb,dl,dx)}dr();dw==="timeout"&&cb.abort();if(dq.async){cb=null}}}};try{var dm=cb.abort;cb.abort=function(){cb&&dm.call(cb);dn("abort")}}catch(di){}dq.async&&dq.timeout>0&&setTimeout(function(){cb&&!db&&dn("timeout")},dq.timeout);try{cb.send(dg==="POST"||dg==="PUT"||dg==="DELETE"?dq.data:null)}catch(dh){b7.handleError(dq,cb,null,dh);dr()}dq.async||dn();return cb}},handleError:function(cb,ca,db,da){if(cb.error){cb.error.call(cb.context||cb,ca,db,da)}if(cb.global){(cb.context?b7(cb.context):b7.event).trigger("ajaxError",[ca,cb,da])}},active:0,httpSuccess:function(cb){try{return !cb.status&&location.protocol==="file:"||cb.status>=200&&cb.status<300||cb.status===304||cb.status===1223||cb.status===0}catch(ca){}return false},httpNotModified:function(cb,ca){var db=cb.getResponseHeader("Last-Modified"),da=cb.getResponseHeader("Etag");if(db){b7.lastModified[ca]=db}if(da){b7.etag[ca]=da}return cb.status===304||cb.status===0},httpData:function(cb,ca,dc){var da=cb.getResponseHeader("content-type")||"",db=ca==="xml"||!ca&&da.indexOf("xml")>=0;cb=db?cb.responseXML:cb.responseText;db&&cb.documentElement.nodeName==="parsererror"&&b7.error("parsererror");if(dc&&dc.dataFilter){cb=dc.dataFilter(cb,ca)}if(typeof cb==="string"){if(ca==="json"||!ca&&da.indexOf("json")>=0){cb=b7.parseJSON(cb)}else{if(ca==="script"||!ca&&da.indexOf("javascript")>=0){b7.globalEval(cb)}}}return cb},param:function(cb,ca){function dd(de,df){if(b7.isArray(df)){b7.each(df,function(dg,dh){ca||/\[\]$/.test(de)?db(de,dh):dd(de+"["+(typeof dh==="object"||b7.isArray(dh)?dg:"")+"]",dh)})}else{!ca&&df!=null&&typeof df==="object"?b7.each(df,function(dg,dh){dd(de+"["+dg+"]",dh)}):db(de,df)}}function db(de,df){df=b7.isFunction(df)?df():df;dc[dc.length]=encodeURIComponent(de)+"="+encodeURIComponent(df)}var dc=[];if(ca===bY){ca=b7.ajaxSettings.traditional}if(b7.isArray(cb)||cb.jquery){b7.each(cb,function(){db(this.name,this.value)})}else{for(var da in cb){dd(da,cb[da])}}return dc.join("&").replace(cW,"+")}});var c5={},c1=/toggle|show|hide/,cO=/^([+-]=)?([\d+-.]+)(.*)$/,ci,bV=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];b7.fn.extend({show:function(cb,ca){if(cb||cb===0){return this.animate(ct("show",3),cb,ca)}else{cb=0;for(ca=this.length;cb<ca;cb++){var dc=b7.data(this[cb],"olddisplay");this[cb].style.display=dc||"";if(b7.css(this[cb],"display")==="none"){dc=this[cb].nodeName;var da;if(c5[dc]){da=c5[dc]}else{var db=b7("<"+dc+" />").appendTo("body");da=db.css("display");if(da==="none"){da="block"}db.remove();c5[dc]=da}b7.data(this[cb],"olddisplay",da)}}cb=0;for(ca=this.length;cb<ca;cb++){this[cb].style.display=b7.data(this[cb],"olddisplay")||""}return this}},hide:function(cb,ca){if(cb||cb===0){return this.animate(ct("hide",3),cb,ca)}else{cb=0;for(ca=this.length;cb<ca;cb++){var da=b7.data(this[cb],"olddisplay");!da&&da!=="none"&&b7.data(this[cb],"olddisplay",b7.css(this[cb],"display"))}cb=0;for(ca=this.length;cb<ca;cb++){this[cb].style.display="none"}return this}},_toggle:b7.fn.toggle,toggle:function(cb,ca){var da=typeof cb==="boolean";if(b7.isFunction(cb)&&b7.isFunction(ca)){this._toggle.apply(this,arguments)}else{cb==null||da?this.each(function(){var db=da?cb:b7(this).is(":hidden");b7(this)[db?"show":"hide"]()}):this.animate(ct("toggle",3),cb,ca)}return this},fadeTo:function(cb,ca,da){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:ca},cb,da)},animate:function(cb,ca,dc,da){var db=b7.speed(ca,dc,da);if(b7.isEmptyObject(cb)){return this.each(db.complete)}return this[db.queue===false?"each":"queue"](function(){var de=b7.extend({},db),df,dg=this.nodeType===1&&b7(this).is(":hidden"),dd=this;for(df in cb){var dh=df.replace(b3,bP);if(df!==dh){cb[dh]=cb[df];delete cb[df];df=dh}if(cb[df]==="hide"&&dg||cb[df]==="show"&&!dg){return de.complete.call(this)}if((df==="height"||df==="width")&&this.style){de.display=b7.css(this,"display");de.overflow=this.style.overflow}if(b7.isArray(cb[df])){(de.specialEasing=de.specialEasing||{})[df]=cb[df][1];cb[df]=cb[df][0]}}if(de.overflow!=null){this.style.overflow="hidden"}de.curAnim=b7.extend({},cb);b7.each(cb,function(dj,di){var dm=new b7.fx(dd,de,dj);if(c1.test(di)){dm[di==="toggle"?dg?"show":"hide":di](cb)}else{var dl=cO.exec(di),dn=dm.cur(true)||0;if(dl){di=parseFloat(dl[2]);var dk=dl[3]||"px";if(dk!=="px"){dd.style[dj]=(di||1)+dk;dn=(di||1)/dm.cur(true)*dn;dd.style[dj]=dn+dk}if(dl[1]){di=(dl[1]==="-="?-1:1)*di+dn}dm.custom(dn,di,dk)}else{dm.custom(dn,di,"")}}});return true})},stop:function(cb,ca){var da=b7.timers;cb&&this.queue([]);this.each(function(){for(var db=da.length-1;db>=0;db--){if(da[db].elem===this){ca&&da[db](true);da.splice(db,1)}}});ca||this.dequeue();return this}});b7.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(cb,ca){b7.fn[cb]=function(db,da){return this.animate(ca,db,da)}});b7.extend({speed:function(cb,ca,db){var da=cb&&typeof cb==="object"?cb:{complete:db||!db&&ca||b7.isFunction(cb)&&cb,duration:cb,easing:db&&ca||ca&&!b7.isFunction(ca)&&ca};da.duration=b7.fx.off?0:typeof da.duration==="number"?da.duration:b7.fx.speeds[da.duration]||b7.fx.speeds._default;da.old=da.complete;da.complete=function(){da.queue!==false&&b7(this).dequeue();b7.isFunction(da.old)&&da.old.call(this)};return da},easing:{linear:function(cb,ca,db,da){return db+da*cb},swing:function(cb,ca,db,da){return(-Math.cos(cb*Math.PI)/2+0.5)*da+db}},timers:[],fx:function(cb,ca,da){this.options=ca;this.elem=cb;this.prop=da;if(!ca.orig){ca.orig={}}}});b7.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(b7.fx.step[this.prop]||b7.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(ca){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}return(ca=parseFloat(b7.css(this.elem,this.prop,ca)))&&ca>-10000?ca:parseFloat(b7.curCSS(this.elem,this.prop))||0},custom:function(cb,ca,dc){function da(dd){return db.step(dd)}this.startTime=cw();this.start=cb;this.end=ca;this.unit=dc||this.unit||"px";this.now=this.start;this.pos=this.state=0;var db=this;da.elem=this.elem;if(da()&&b7.timers.push(da)&&!ci){ci=setInterval(b7.fx.tick,13)}},show:function(){this.options.orig[this.prop]=b7.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());b7(this.elem).show()},hide:function(){this.options.orig[this.prop]=b7.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(cb){var ca=cw(),dc=true;if(cb||ca>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var da in this.options.curAnim){if(this.options.curAnim[da]!==true){dc=false}}if(dc){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;cb=b7.data(this.elem,"olddisplay");this.elem.style.display=cb?cb:this.options.display;if(b7.css(this.elem,"display")==="none"){this.elem.style.display="block"}}this.options.hide&&b7(this.elem).hide();if(this.options.hide||this.options.show){for(var db in this.options.curAnim){b7.style(this.elem,db,this.options.orig[db])}}this.options.complete.call(this.elem)}return false}else{db=ca-this.startTime;this.state=db/this.options.duration;cb=this.options.easing||(b7.easing.swing?"swing":"linear");this.pos=b7.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||cb](this.state,db,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};b7.extend(b7.fx,{tick:function(){for(var cb=b7.timers,ca=0;ca<cb.length;ca++){cb[ca]()||cb.splice(ca--,1)}cb.length||b7.fx.stop()},stop:function(){clearInterval(ci);ci=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(ca){b7.style(ca.elem,"opacity",ca.now)},_default:function(ca){if(ca.elem.style&&ca.elem.style[ca.prop]!=null){ca.elem.style[ca.prop]=(ca.prop==="width"||ca.prop==="height"?Math.max(0,ca.now):ca.now)+ca.unit}else{ca.elem[ca.prop]=ca.now}}}});if(b7.expr&&b7.expr.filters){b7.expr.filters.animated=function(ca){return b7.grep(b7.timers,function(cb){return ca===cb.elem}).length}}b7.fn.offset="getBoundingClientRect" in bZ.documentElement?function(cb){var ca=this[0];if(cb){return this.each(function(dc){b7.offset.setOffset(this,cb,dc)})}if(!ca||!ca.ownerDocument){return null}if(ca===ca.ownerDocument.body){return b7.offset.bodyOffset(ca)}var db=ca.getBoundingClientRect(),da=ca.ownerDocument;ca=da.body;da=da.documentElement;return{top:db.top+(self.pageYOffset||b7.support.boxModel&&da.scrollTop||ca.scrollTop)-(da.clientTop||ca.clientTop||0),left:db.left+(self.pageXOffset||b7.support.boxModel&&da.scrollLeft||ca.scrollLeft)-(da.clientLeft||ca.clientLeft||0)}}:function(dh){var dg=this[0];if(dh){return this.each(function(di){b7.offset.setOffset(this,dh,di)})}if(!dg||!dg.ownerDocument){return null}if(dg===dg.ownerDocument.body){return b7.offset.bodyOffset(dg)}b7.offset.initialize();var df=dg.offsetParent,dd=dg,de=dg.ownerDocument,db,dc=de.documentElement,ca=de.body;dd=(de=de.defaultView)?de.getComputedStyle(dg,null):dg.currentStyle;for(var da=dg.offsetTop,cb=dg.offsetLeft;(dg=dg.parentNode)&&dg!==ca&&dg!==dc;){if(b7.offset.supportsFixedPosition&&dd.position==="fixed"){break}db=de?de.getComputedStyle(dg,null):dg.currentStyle;da-=dg.scrollTop;cb-=dg.scrollLeft;if(dg===df){da+=dg.offsetTop;cb+=dg.offsetLeft;if(b7.offset.doesNotAddBorder&&!(b7.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(dg.nodeName))){da+=parseFloat(db.borderTopWidth)||0;cb+=parseFloat(db.borderLeftWidth)||0}dd=df;df=dg.offsetParent}if(b7.offset.subtractsBorderForOverflowNotVisible&&db.overflow!=="visible"){da+=parseFloat(db.borderTopWidth)||0;cb+=parseFloat(db.borderLeftWidth)||0}dd=db}if(dd.position==="relative"||dd.position==="static"){da+=ca.offsetTop;cb+=ca.offsetLeft}if(b7.offset.supportsFixedPosition&&dd.position==="fixed"){da+=Math.max(dc.scrollTop,ca.scrollTop);cb+=Math.max(dc.scrollLeft,ca.scrollLeft)}return{top:da,left:cb}};b7.offset={initialize:function(){var cb=bZ.body,ca=bZ.createElement("div"),dd,db,dc,da=parseFloat(b7.curCSS(cb,"marginTop",true))||0;b7.extend(ca.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});ca.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";cb.insertBefore(ca,cb.firstChild);dd=ca.firstChild;db=dd.firstChild;dc=dd.nextSibling.firstChild.firstChild;this.doesNotAddBorder=db.offsetTop!==5;this.doesAddBorderForTableAndCells=dc.offsetTop===5;db.style.position="fixed";db.style.top="20px";this.supportsFixedPosition=db.offsetTop===20||db.offsetTop===15;db.style.position=db.style.top="";dd.style.overflow="hidden";dd.style.position="relative";this.subtractsBorderForOverflowNotVisible=db.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=cb.offsetTop!==da;cb.removeChild(ca);b7.offset.initialize=b7.noop},bodyOffset:function(cb){var ca=cb.offsetTop,da=cb.offsetLeft;b7.offset.initialize();if(b7.offset.doesNotIncludeMarginInBodyOffset){ca+=parseFloat(b7.curCSS(cb,"marginTop",true))||0;da+=parseFloat(b7.curCSS(cb,"marginLeft",true))||0}return{top:ca,left:da}},setOffset:function(cb,ca,de){if(/static/.test(b7.curCSS(cb,"position"))){cb.style.position="relative"}var dc=b7(cb),dd=dc.offset(),da=parseInt(b7.curCSS(cb,"top",true),10)||0,db=parseInt(b7.curCSS(cb,"left",true),10)||0;if(b7.isFunction(ca)){ca=ca.call(cb,de,dd)}de={top:ca.top-dd.top+da,left:ca.left-dd.left+db};"using" in ca?ca.using.call(cb,de):dc.css(de)}};b7.fn.extend({position:function(){if(!this[0]){return null}var cb=this[0],ca=this.offsetParent(),db=this.offset(),da=/^body|html$/i.test(ca[0].nodeName)?{top:0,left:0}:ca.offset();db.top-=parseFloat(b7.curCSS(cb,"marginTop",true))||0;db.left-=parseFloat(b7.curCSS(cb,"marginLeft",true))||0;da.top+=parseFloat(b7.curCSS(ca[0],"borderTopWidth",true))||0;da.left+=parseFloat(b7.curCSS(ca[0],"borderLeftWidth",true))||0;return{top:db.top-da.top,left:db.left-da.left}},offsetParent:function(){return this.map(function(){for(var ca=this.offsetParent||bZ.body;ca&&!/^body|html$/i.test(ca.nodeName)&&b7.css(ca,"position")==="static";){ca=ca.offsetParent}return ca})}});b7.each(["Left","Top"],function(cb,ca){var da="scroll"+ca;b7.fn[da]=function(dc){var dd=this[0],db;if(!dd){return null}if(dc!==bY){return this.each(function(){if(db=bJ(this)){db.scrollTo(!cb?dc:b7(db).scrollLeft(),cb?dc:b7(db).scrollTop())}else{this[da]=dc}})}else{return(db=bJ(dd))?"pageXOffset" in db?db[cb?"pageYOffset":"pageXOffset"]:b7.support.boxModel&&db.document.documentElement[da]||db.document.body[da]:dd[da]}}});b7.each(["Height","Width"],function(cb,ca){var da=ca.toLowerCase();b7.fn["inner"+ca]=function(){return this[0]?b7.css(this[0],da,false,"padding"):null};b7.fn["outer"+ca]=function(db){return this[0]?b7.css(this[0],da,false,db?"margin":"border"):null};b7.fn[da]=function(db){var dc=this[0];if(!dc){return db==null?null:this}if(b7.isFunction(db)){return this.each(function(dd){var de=b7(this);de[da](db.call(this,dd,de[da]()))})}return"scrollTo" in dc&&dc.document?dc.document.compatMode==="CSS1Compat"&&dc.document.documentElement["client"+ca]||dc.document.body["client"+ca]:dc.nodeType===9?Math.max(dc.documentElement["client"+ca],dc.body["scroll"+ca],dc.documentElement["scroll"+ca],dc.body["offset"+ca],dc.documentElement["offset"+ca]):db===bY?b7.css(dc,da):this.css(da,typeof db==="string"?db:db+"px")}});cF.jQuery=cF.$=b7})(window);(function(bw){bw.event.special.mousewheel={setup:function(){var bx=bw.event.special.mousewheel.handler;if(bw.browser.mozilla){bw(this).bind("mousemove.mousewheel",function(by){bw.data(this,"mwcursorposdata",{pageX:by.pageX,pageY:by.pageY,clientX:by.clientX,clientY:by.clientY})})}if(this.addEventListener){this.addEventListener((bw.browser.mozilla?"DOMMouseScroll":"mousewheel"),bx,false)}else{this.onmousewheel=bx}},teardown:function(){var bx=bw.event.special.mousewheel.handler;bw(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((bw.browser.mozilla?"DOMMouseScroll":"mousewheel"),bx,false)}else{this.onmousewheel=function(){}}bw.removeData(this,"mwcursorposdata")},handler:function(bz){var bx=Array.prototype.slice.call(arguments,1);bz=bw.event.fix(bz||window.event);bw.extend(bz,bw.data(this,"mwcursorposdata")||{});var bA=0,by=true;if(bz.wheelDelta){bA=bz.wheelDelta/120}if(bz.detail){bA=-bz.detail/3}bz.data=bz.data||{};bz.type="mousewheel";bx.unshift(bA);bx.unshift(bz);return bw.event.handle.apply(this,bx)}};bw.fn.extend({mousewheel:function(bx){return bx?this.bind("mousewheel",bx):this.trigger("mousewheel")},unmousewheel:function(bx){return this.unbind("mousewheel",bx)}})})(jQuery);aB=aB||{};var aE=aB.auth;var G=aB.staticPath;var D=aB.server;var aQ=aB.tileServers;var bt=aB.viewModes;var Q=false;aB.visiocityCodeConversion=aB.visiocityCodeConversion||{};aB.visiocityCodeConversion.photo=aB.visiocityCodeConversion.photo||{};aB.visiocityCodeConversion.photo.Town=aB.visiocityCodeConversion.photo.Town||[];var E=aB.visiocityCodeConversion.photo.Town;var aZ={route:"route/get.aspx?",rmm:"route/rmm/get.aspx?",poi:"poi/get.aspx?",descr:"slab/descr.aspx?",slab:"slab/get.aspx?",trace:"slab/trace.aspx?",loc:"loc/get.aspx?",photoInfos:"pho/get_object.aspx?",photo:"pho/get_photo.aspx?"};var l=jQuery.noConflict(true);l("head").append('<link rel="stylesheet" type="text/css" href="'+G+'css/api-pack.css"></link>');var aN=window.Mappy||{};aN.api={geo:{},geolocation:{},map:{layer:{},shape:{kml:{}},tools:{}},poi:{},route:{},types:{},ui:{},utils:{},visiocity:{}};window.Mappy=aN;var c=navigator.userAgent.toLowerCase();var bn=/iphone/.test(c)||/android/.test(c)||/ipad/.test(c)||/dolfin/.test(c);var ao=/iphone/.test(c)||/android/.test(c)||/ipad/.test(c)||/dolfin/.test(c);var a5=/iphone/.test(c)||/ipad/.test(c)||/dolfin/.test(c);var bi=l.browser.msie&&l.browser.version<7;function aR(bw,bA){bw=bw||{};if(bA){for(var bz in bA){var by=bA[bz];if(by!==undefined){bw[bz]=by}}var bx=typeof window.Event==="function"&&bA instanceof window.Event;if(!bx&&bA.hasOwnProperty&&bA.hasOwnProperty("toString")){bw.toString=bA.toString}}return bw}var N=aN.api.utils.Class=function(){var bz=function(){this.initialize.apply(this,arguments)};var by={};var bB,bx;for(var bA=0,bw=arguments.length;bA<bw;bA+=1){if(typeof arguments[bA]==="function"){if(bA===0&&bw>1){bx=arguments[bA].prototype.initialize;arguments[bA].prototype.initialize=function(){};by=new arguments[bA];arguments[bA].prototype.initialize=bx}bB=arguments[bA].prototype}else{bB=arguments[bA]}aR(by,bB)}bz.prototype=by;return bz};function aq(bw){return(typeof bw!=="undefined"&&bw!==null)}function a3(bw){return(typeof bw==="undefined"||bw===null)}function a1(bx,bw){return function(){bx.apply(bw,arguments)}}function a8(bx,bw){return setTimeout(a1(bx,bw),13)}function e(bz,bx){var by=[];for(var bw in bz){if(bz.hasOwnProperty(bw)){if(typeof bz[bw]==="number"||typeof bz[bw]==="string"){by.push(bx+"."+bw+"="+bz[bw])}else{by.push(e(bz[bw],bx+"."+bw))}}}return by.join("&")}var al=aN.api.utils.xml2json=function(by){var bz="",bw={},bA=true,bx;if(aq(by.attributes)&&by.attributes.length>0){bw["@attributes"]={};for(bx=0;bx<by.attributes.length;bx+=1){bw["@attributes"][by.attributes[bx].nodeName]=by.attributes[bx].value}}if(aq(by.childNodes)){for(bx=0;bx<by.childNodes.length;bx+=1){if(aq(by.childNodes[bx].data)){bz+=by.childNodes[bx].data}else{if(aq(bw[by.childNodes[bx].nodeName])){bA=false;if(typeof bw[by.childNodes[bx].nodeName]==="string"){bw[by.childNodes[bx].nodeName]=[bw[by.childNodes[bx].nodeName]]}else{bw[by.childNodes[bx].nodeName]=l.makeArray(bw[by.childNodes[bx].nodeName])}bw[by.childNodes[bx].nodeName].push(al(by.childNodes[bx]))}else{bA=false;bw[by.childNodes[bx].nodeName]=al(by.childNodes[bx])}}}if(bA){if(aq(bw["@attributes"])&&bz===""){return bw}return bz}else{return bw}}};function o(bw,bx){return bw.replace(/{([^{}]*)}/g,function(bz,by){var bA=bx[by];return typeof bA==="string"||typeof bA==="number"?bA:bz})}function aI(bw){for(var bx in bw){if(bw.hasOwnProperty(bx)){return false}}return true}var bs=Math.floor;var bf=N({initialize:function(bx,by,bw){this.name=bx;this.handler=by;this.priorityLevel=bw||0;this._stopPropatation=false},stopPropagation:function(){this._stopPropatation=true},propagationStopped:function(){if(this._stopPropatation===true){this._stopPropatation=false;return true}else{return false}}});var ba=N({EVENTS:null,hasListeners:false,initialize:function(){this._listeners={};for(var bw=0;bw<this.EVENTS.length;bw+=1){this._listeners[this.EVENTS[bw]]=[]}},addListener:function(by,bz,bw){if(l.isArray(this._listeners[by])){var bx=new bf(by,bz,bw);this._listeners[by].push(bx);this._arraySort(this._listeners[by]);this.hasListeners=true;return bx}else{return false}},removeListener:function(bw){var bz=this._listeners;var bx=l.inArray(bw,bz[bw.name]);if(bx!==-1){delete bz[bw.name][bx]}for(var by in bz){if(bz.hasOwnProperty(by)&&bz[by].length>0){this.hasListeners=true;return}}this.hasListeners=false},trigger:function(by){var bA=this._listeners[by];if(l.isArray(bA)){var bx=l.makeArray(arguments).slice(1);for(var bz=0,bw=bA.length;bz<bw;bz+=1){if(typeof bA[bz]!=="undefined"){bA[bz].handler.apply(bA[bz],bx);if(aq(bA[bz])&&bA[bz].propagationStopped()===true){break}}}this._listeners[by]=this._arrayFilter(bA)}},_arrayFilter:function(by){var bw=[];for(var bx=0;bx<by.length;bx+=1){if(typeof by[bx]!=="undefined"){bw.push(by[bx])}}return bw},_arraySort:function(bw){bw.sort(function(by,bx){if(typeof by!=="undefined"&&typeof bx!=="undefined"){return bx.priorityLevel-by.priorityLevel}return 0})}});var aT=N(ba,{EVENTS:["empty"],size:0,_param:null,initialize:function(){ba.prototype.initialize.apply(this)},setParam:function(bw){this._param=bw},addTask:function(){this.size+=1},removeTask:function(){this.size-=1;if(this.size<=0){this.size=0;this.trigger("empty",this._param);this._param=null}}});aN.api.types.Point=function(bw,bx){bw-=0;bx-=0;this.x=bw;this.y=bx};var am=aN.api.types.Point;am.prototype={isNull:function(){return(this.x===0&&this.y===0)},hypot:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},dist:function(by){var bx=this.x-by.x;var bw=this.y-by.y;return Math.sqrt(bx*bx+bw*bw)},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y)},clone:function(){return new am(this.x,this.y)}};var aO=aN.api.types.Size=N({initialize:function(bx,bw){bx-=0;bw-=0;this.width=bx;this.height=bw},getCenter:function(){return new am(Math.floor(this.width/2),Math.floor(this.height/2))},hypot:function(){return Math.sqrt(this.width*this.width+this.height*this.height)},isNull:function(){return(this.width===0||this.height===0)},clone:function(){return new aO(this.width,this.height)}});var H=aN.api.types.Bounds=N({minX:null,minY:null,maxX:null,maxY:null,initialize:function(bw,bz,by,bx){this.minX=bw;this.minY=bz;this.maxX=by;this.maxY=bx},addPoint:function(bw){if(bw.x<this.minX){this.minX=bw.x}if(bw.x>this.maxX){this.maxX=bw.x}if(bw.y<this.minY){this.minY=bw.y}if(bw.y>this.maxY){this.maxY=bw.y}},getSize:function(){return new aO(this.maxX-this.minX,this.maxY-this.minY)},inside:function(bw){return(bw.x>=this.minX&&bw.x<this.maxX&&bw.y>=this.minY&&bw.y<this.maxY)},intersect:function(bx){var bw=Math.max(this.minX,bx.minX);var bA=Math.max(this.minY,bx.minY);var bz=Math.min(this.maxX,bx.maxX);var by=Math.min(this.maxY,bx.maxY);if(bz-bw<0||by-bA<0){return null}else{return new H(bw,bA,bz,by)}}});function aV(bD,bA){bA=bA||{};if(a3(bD)){return}if(a3(bA.handle)){bA.handle=bD}var bz;var bC,bx,by,bw;var bB=false;if(bn===false){bA.handle.click(function(bE){if(bB){bE.stopImmediatePropagation();bB=false}});bw=function(bE){l(document).unbind("mousemove",by);l(document).unbind("mouseup",bw);if(!bz){bD.css("cursor","url("+G+"img/cursor/openhand.cur), default");if(typeof bA.stop==="function"){bA.stop(bE)}}};by=function(bF){if(bz){if(typeof bA.start==="function"){bA.start(bz)}var bE=bD.position();bC={left:bE.left-bz.clientX,top:bE.top-bz.clientY};bD.css("cursor","url("+G+"img/cursor/closedhand.cur), move");bz=null;bB=true}bD.css({top:bC.top+bF.clientY,left:bC.left+bF.clientX});if(typeof bA.drag==="function"){bA.drag(bF)}return false};bD.hackModifyInit=function(bE,bF){bC.left-=bE;bC.top-=bF};bx=function(bE){bz=bE;l(document).mousemove(by);l(document).mouseup(bw);return false};bD.css("position","absolute");bD.css("cursor","url("+G+"img/cursor/openhand.cur), default");bA.handle.mousedown(bx);bD.disableDraggable=function(){bD.css("cursor","");bA.handle.unbind("mousedown",bx)};bD.enableDraggable=function(){bD.css("cursor","url("+G+"img/cursor/openhand.cur), default");bA.handle.mousedown(bx)}}else{bA.handle.click(function(bE){if(!bz){bE.stopImmediatePropagation()}});bw=function(bE){document.removeEventListener("touchmove",by);document.removeEventListener("touchend",bw);if(!bz){if(typeof bA.stop==="function"){bE=bE.touches[0];bA.stop(bE)}}};by=function(bF){if(bF.touches.length===1){bF=bF.touches[0];if(bz){if(typeof bA.start==="function"){bA.start(bz)}var bE=bD.position();bC={left:bE.left-bz.clientX,top:bE.top-bz.clientY};bz=null}bD.css({top:bC.top+bF.clientY,left:bC.left+bF.clientX});if(typeof bA.drag==="function"){bA.drag(bF)}return false}else{bF=bF.touches[0];bw(bF)}};bx=function(bE){if(bE.touches.length===1){bE.preventDefault();bE=bE.touches[0];bz=bE;document.addEventListener("touchmove",by);document.addEventListener("touchend",bw);return false}};bD.css("position","absolute");bA.handle[0].addEventListener("touchstart",bx);bD.disableDraggable=function(){bA.handle[0].removeEventListener("touchstart",bx)};bD.enableDraggable=function(){bA.handle[0].addEventListener("touchstart",bx)}}}function X(by,bz,bA,bx){var bw=new Image();l(bw).load(function(){bz.src=by;l(bw).unbind();return bA(bz)});if(aq(bx)){l(bw).error(bx)}bw.src=by}function aG(bz,by){var bw=l(bz).clone();bw.css({visibility:"hidden",position:"absolute",left:0,top:0});l(document.body).append(bw);var bx=(by)?new aO(bw.outerWidth(true),bw.outerHeight(true)):new aO(bw.width(),bw.height());bw.remove();return bx}function aK(bw){bw.preventDefault()}var a4=aN.api.ui.getHtmlTownSign=function(bw){return'<div class="town-sign"><span>'+bw+"</span></div>"};function bq(bz){var by="";bz=bz-0;var bA=Math.floor(bz/(24*3600));bz%=24*3600;var bw=Math.floor(bz/3600);bz%=3600;var bx=Math.floor(bz/60);bz%=60;if(bA===1){by+="1 jour "}else{if(bA>1){by+=bA+" jours "}}by+=bw+"h"+(bx<10?"0":"")+bx;return by}var M=aN.api.ui.Icon=N({cssClass:null,image:null,size:null,iconAnchor:null,popUpAnchor:null,label:null,initialize:function(bw){this.cssClass=bw.cssClass;this.image=bw.image;this.size=bw.size;this.iconAnchor=bw.iconAnchor;this.popUpAnchor=bw.popUpAnchor;this.label=bw.label;if(a3(this.size)){this._setSize()}if(a3(this.iconAnchor)){this.iconAnchor=this.size.getCenter()}if(a3(this.popUpAnchor)){this.popUpAnchor=new am(this.iconAnchor.x,0)}},_setSize:function(){var bw;if(aq(this.cssClass)){bw=aG('<div class="'+this.cssClass+'"></div>')}if(a3(bw)||(bw.isNull()&&aq(this.image))){bw=aG('<img src="'+this.image+'"></img>')}this.size=bw},create:function(){var bw=l("<div></div>");if(aq(this.cssClass)){bw.addClass(this.cssClass)}bw.html(this.label);if(aq(this.image)){bw.append('<img style="position:absolute;left:0;top:0;z-index:-1;" src="'+this.image+'"></img>')}return bw}});aN.api.ui.Icon.DEFAULT={cssClass:"default-icon",image:G+"img/poi/POI_defaut.png",size:new aO(21,31),iconAnchor:new am(10,31),popUpAnchor:new am(10,0)};var y=aN.api.ui.Slider=N({initialize:function(bx){bx=bx||{};if(a3(bx.container)){return}var bw=l(bx.container);var bB=l('<div class="slider"></div>');bw.append(bB);var bA=bx.stop;this.min=bx.min;this.max=bx.max;this.steps=this.max-this.min;this.size=bw.height();this.domEventHandlers=[];var by=l('<a class="slider-handler" href="#"/>');this._handler=by;var bz=this;by.click(function(bC){bC.preventDefault()});by.mousedown(function(bE){var bD=bE.pageY;var bC=by.position().top+by.height();var bF=l(document);bz._mousemoveHandler=function(bH){var bG=bz._stepCalc(bC+bH.pageY-bD);bz._setStep(bG);bH.preventDefault()};bz._mouseupHandler=function(){bF.unbind("mousemove",bz._mousemoveHandler);bF.unbind("mouseup",bz._mouseupHandler);if(l.isFunction(bA)){bA(bz._currentStep+bz.min)}};bF.mousemove(bz._mousemoveHandler);bF.mouseup(bz._mouseupHandler);bE.preventDefault();bE.stopPropagation()});bB.append(by);this._mousedownHandler=function(bD){var bE=bw.offset();var bC=bz._stepCalc(bD.pageY-bE.top);bz._setStep(bC);if(l.isFunction(bA)){bA(bz._currentStep+bz.min)}};bw.mousedown(this._mousedownHandler);this.div=bB;this.container=bw},_stepCalc:function(bw){var bx=Math.round((this.size-bw)*this.steps/this.size);if(bx<0){bx=0}if(bx>this.steps){bx=this.steps}return bx},_setStep:function(bw){this._handler.css({bottom:((bw*100)/this.steps)+"%"});this._currentStep=bw},setValue:function(bw){bw=Math.round(bw);if(bw<this.min){bw=this.min}if(bw>this.max){bw=this.max}this._setStep(bw-this.min)},destroy:function(){var bw=l(document);if(l.isFunction(this._mousemoveHandler)){bw.unbind("mousemove",this._mousemoveHandler)}if(l.isFunction(this._mouseupHandler)){bw.unbind("mouseup",this._mouseupHandler)}this.container.unbind("mousedown",this._mousedownHandler);this.div.remove()}});var aw=aN.api.ui.ToolTip=N({div:null,isAdded:false,TEMPLATE:'<div class="default-tooltip" style="position:absolute;z-index:1000;"></div>',initialize:function(bw,bx){this.container=bw;this.html=bx},add:function(bA){var by=this.container;this.remove();div=l(this.TEMPLATE);div.html(this.html);by.append(div);this.div=div;var bx=div.outerWidth(true);var bz=div.outerHeight(true);var by=this.container;function bw(bB){var bF=by.offset();var bE={left:bB.pageX-bF.left,top:bB.pageY-bF.top+20};var bD=by.width();var bC=by.height();if(bE.left+bx>bD){bE.left=bD-bx}if(bE.top+bz>bC){bE.top-=50}div.css(bE)}l(document).mousemove(bw);bw(bA);this._mouseMoveHandler=bw;this.isAdded=true},remove:function(){if(this.isAdded){l(document).unbind("mousemove",this._mouseMoveHandler);this.div.remove();delete this.div;this.isAdded=false}}});aN.api.geo.Coordinates=function(bw,by,bx){bw=bw-0;by=by-0;if(bw>180){this.x=180}else{if(bw<-180){this.x=-180}else{this.x=bw}}if(by>90){this.y=90}else{if(by<-90){this.y=-90}else{this.y=by}}this.x=bw-0;this.y=by-0;bb.forward(this)};var P=aN.api.geo.Coordinates;P.prototype={clone:function(){var bw=new P(this.x,this.y);bw._x=this._x;bw._y=this._y;return bw},getDistance:function(by){var bx=6378137,bB=6356752.314;var bw=(by.x-this.x)*Math.PI/180;var bA=(by.y-this.y)*Math.PI/180;var bC=(this.y+by.y)/2*Math.PI/180;var bz=Math.tan(bC);bz=bz*bz;return{dx:Math.abs(bx*bx*bw/Math.sqrt(bx*bx+bB*bB*bz)),dy:Math.abs(bA*bx)}},toString:function(){return this.x+","+this.y}};P.fromNormalized=function(bw,bx){return bb.inverse(bw,bx)};var bb={_YF:1.7071067811865475,_XF:0.7071067811865476,_RYF:0.585786437626905,_RXF:1.4142135623730951,a:6378137,D2R:0.017453292519943295,R2D:57.29577951308232,initialize:function(){var bx=new P(-180,-90,false);var bw=new P(180,90,false);this.forwardGall(bx);this.forwardGall(bw);this.mMaxSize=bw._x-bx._x;this.mSourceAeraProOrigineX=bx._x;this.mSourceAeraProOrigineY=bx._y;this.mMaxHeightPct=(bw._y-bx._y)/this.mMaxSize},forwardGall:function(bw){bw._x=this.a*this._XF*bw.x*this.D2R;bw._y=this.a*this._YF*Math.tan(0.5*bw.y*this.D2R)},normalize:function(bw){bw._x=(bw._x-this.mSourceAeraProOrigineX)/this.mMaxSize;bw._y=(bw._y-this.mSourceAeraProOrigineY)/this.mMaxSize},inverseGall:function(bw,bz){var bx=this.R2D*this._RXF*bw/this.a;var by=this.R2D*2*Math.atan(bz/this.a*this._RYF);return new P(bx,by)},forward:function(bw){this.forwardGall(bw);this.normalize(bw)},inverse:function(bw,bx){if(bw<0){bw=0}else{if(bw>1){bw=1}}if(bx<0){bx=0}else{if(bx>this.mMaxHeightPct){bx=this.mMaxHeightPct}}bw*=this.mMaxSize;bx*=this.mMaxSize;bw+=this.mSourceAeraProOrigineX;bx+=this.mSourceAeraProOrigineY;return this.inverseGall(bw,bx)}};bb.initialize();var aA=aN.api.geo.GeoBounds=N({ne:null,sw:null,center:null,initialize:function(bx,bw){this.ne=(bx)?bx.clone():new P(-180,-90);this.sw=(bw)?bw.clone():new P(180,90)},refreshCenter:function(){var bw=this.sw._x+(this.ne._x-this.sw._x)/2;var bx=this.sw._y+(this.ne._y-this.sw._y)/2;this.center=P.fromNormalized(bw,bx)},contains:function(bw){return bw._x>=this.sw._x&&bw._x<=this.ne._x&&bw._y>=this.sw._y&&bw._y<=this.ne._y},intersect:function(by){var bx=Math.max(this.sw._x,by.sw._x);var bC=Math.max(this.sw._y,by.sw._y);var bB=Math.min(this.ne._x,by.ne._x);var bz=Math.min(this.ne._y,by.ne._y);if(bB-bx<0||bz-bC<0){return null}else{var bA=P.fromNormalized(bB,bz);var bw=P.fromNormalized(bx,bC);return new aA(bA,bw)}},extend:function(by){var bx=this.ne;var bw=this.sw;if(by._x<bw._x){bw._x=by._x;bw.x=by.x}if(by._x>bx._x){bx._x=by._x;bx.x=by.x}if(by._y<bw._y){bw._y=by._y;bw.y=by.y}if(by._y>bx._y){bx._y=by._y;bx.y=by.y}},getDeltaX:function(){return this.ne._x-this.sw._x},getDeltaY:function(){return this.ne._y-this.sw._y},toString:function(){return this.ne.toString()+" / "+this.sw.toString()}});function ad(by,bz,bx){var bw=by.encode();bw=D+bw;bw+="&auth="+aE;bw=encodeURI(bw);l.ajax({dataType:"jsonp",jsonp:"callback",url:bw,scriptCharset:"utf-8",success:bz,error:bx})}var g=N({initialize:function(){},encode:function(){}});var f=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var bw=aZ.loc;bw+=e(this._options,"opt");return bw},isReady:function(){return true},configure:function(bw){this._options=bw}});var d=N(g,{_callTraffic:false,initialize:function(bw){g.prototype.initialize.call(this);this._callTraffic=(aq(bw)&&bw==true)?true:false},encode:function(){var bw=aZ.descr+"opt.format=json&descr-mode=region,interact,copyright";bw+="&viewmode="+this._viewMode;if(this._callTraffic){bw+="&templ=MappyTraEvt_EarthGall_384"}bw+="&sxys="+this._tilesList;bw+="&zoom="+this._zoom;return bw},configure:function(bw,by,bx){this._tilesList=bw;this._zoom=by;this._viewMode=bx}});var an=N(f,{initialize:function(){f.prototype.initialize.call(this)},encode:function(){var bw=f.prototype.encode.apply(this);if(aq(this._addr._countryName)){bw+="&countryName="+this._addr._countryName}if(aq(this._addr._townName)){bw+="&townName="+this._addr._townName}if(aq(this._addr._number)){bw+="&opt.number="+this._addr._number}if(aq(this._addr._wayName)){bw+="&opt.wayName="+this._addr._wayName}if(aq(this._addr._countryCode)){bw+="&countryCode="+this._addr._countryCode}if(aq(this._addr._townOfficialCode)){bw+="&townOfficialCode="+this._addr._townOfficialCode}if(aq(this._addr._postalCode)){bw+="&postalCode="+this._addr._postalCode}if(aq(this._addr._countryIsoCode)){bw+="&countryIsoCode="+this._addr._countryIsoCode}if(aq(this._addr._subcountryName)){bw+="&opt.subcountryName="+this._addr._subcountryName}if(aq(this._addr._subcountryOfficialCode)){bw+="&opt.subcountryOfficialCode="+this._addr._subcountryOfficialCode}return bw},configure:function(bx,bw){f.prototype.configure.call(this,bw);this._addr=bx},isReady:function(){return(aq(this._addr._countryName)||aq(this._addr._countryCode))}});var r=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var bw=aZ.photoInfos+"opt.format=json&opt.interactive=0&opt.xyOutputProjections=4326";if(this._searchType==="ad"){bw+="&countryCode="+this._countryCode;bw+="&townCode="+this._townCode;bw+="&opt.number="+this._number;bw+="&wayName="+this._wayName}else{if(this._searchType==="id"){bw+="&objectId="+this._id;bw+=(this._view)?"&opt.view="+this._view:""}else{if(this._searchType==="xy"){bw+="&x="+this._coordinates.x;bw+="&y="+this._coordinates.y;bw+="&xyInputProjection=4326"}}}bw+="&opt.objectType="+this._objectType;if(this._objectType==="f"){bw+="&opt.frontagesListLevel=3"}else{if(this._objectType==="s"){bw+="&opt.intersectionsList=1"}}bw+="&opt.searchType="+this._searchType;return bw},configure:function(bw){if(bw.townCode&&bw.countryCode&&bw.number&&bw.wayName){this._townCode=bw.townCode;this._countryCode=bw.countryCode;this._number=bw.number;this._wayName=bw.wayName;this._searchType="ad"}if(bw.id){this._id=bw.id;this._searchType="id";this._view=bw.view}if(bw.coordinates){this._coordinates=bw.coordinates;this._searchType="xy"}this._objectType=bw.objectType}});var bg=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var by=[];by.push(aZ.poi);by.push("opt.format=json");if(l.isArray(this._id)){var bB="opt.json.poi=[";var bx=[];for(var bA=0;bA<this._id.length;bA+=1){var bw=[];if(typeof this._id[bA]==="object"){for(var bz in this._id[bA]){bw.push('"'+bz+'":"'+this._id[bA][bz]+'"')}bx.push("{"+bw.join(",")+"}")}}bB+=bx.join(",")+"]";by.push(bB)}else{by.push("id="+this._id)}if(aq(this._coords)===true){by.push("x="+this._coords.x);by.push("y="+this._coords.y)}else{if(aq(this._keyPolyline)===true){by.push("keyPolyline="+this._keyPolyline)}else{if(aq(this._uniquePoi)===true){by.push("poiId="+this._uniquePoi.poiId);by.push("provider="+this._uniquePoi.provider)}}}if(aq(this._options)===true){by.push(e(this._options,"opt"))}return by.join("&")},configure:function(by,bx,bw){this._id=by;if(bx.x&&bx.y){this._coords=bx}else{if(bx.postKey){this._keyPolyline=bx.postKey}else{if(bx.poiId&&bx.provider){this._uniquePoi=bx}}}this._options=bw}});var bk=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var bx=aZ.rmm+"opt.format=json&opt.trace=1";var bw=this._addressList.length;bx+="&start.rid="+this._addressList[0].rid;if(aq(this._addressList[0].pct)){bx+="&start.ridpct="+this._addressList[0].pct}if(this._addressList.length>2){bx+="&via.rids="+this._addressList[1].rid;for(i=2;i<this._addressList.length-1;i+=1){bx+=","+this._addressList[i].rid}bx+="&via.ridspct="+((aq(this._addressList[1].pct))?this._addressList[1].pct:"50");for(i=2;i<this._addressList.length-1;i+=1){bx+=","+((aq(this._addressList[i].pct))?this._addressList[i].pct:"50")}}bx+="&end.rid="+this._addressList[bw-1].rid;if(aq(this._addressList[bw-1].pct)){bx+="&end.ridpct="+this._addressList[bw-1].pct}bx+="&date="+this._options.date;bx+="&time="+this._options.time;bx+="&sens="+this._options.sens;bx+="&opt.vehicle="+this._options.veh;bx+="&criteria="+this._options.criteria;return bx},configure:function(bx,bw){this._addressList=bx;this._options=bw||{}}});var K=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var by;var bx=aZ.route+"opt.format=json&opt.trace=1";var bz=this._addressList;bx+="&opt.json.route=[";var bw=[];for(var by=0;by<bz.length;by+=1){if(aq(bz[by].rid)){bw.push('{"rid":"'+bz[by].rid+","+((aq(bz[by].pct))?bz[by].pct:"50")+'"}')}else{bw.push('{"xy":"'+bz[by].x+","+bz[by].y+'"}')}}bx+=bw.join(",")+"]";if(aq(this._options)){bx+="&"+e(this._options,"opt")}return bx},configure:function(bx,bw){this._addressList=bx;this._options=bw||{}}});var aL=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var by;var bx=aZ.route+"opt.format=json&opt.onlyroute=1";var bz=this._addressList;bx+="&opt.json.route=[";var bw=[];for(var by=0;by<bz.length;by+=1){if(aq(bz[by].rid)){bw.push('{"rid":"'+bz[by].rid+","+((aq(bz[by].pct))?bz[by].pct:"50")+'"}')}else{bw.push('{"xy":"'+bz[by].x+","+bz[by].y+'"}')}}bx+=bw.join(",")+"]";if(aq(this._options)){bx+="&"+e(this._options,"opt")}return bx},configure:function(bx,bw){this._addressList=bx;this._options=bw||{}}});var A=N(g,{initialize:function(){g.prototype.initialize.call(this)},encode:function(){var bx;var bw=aZ.rmm+"opt.format=json&opt.onlyroute=1";if(this._addressList[0].rid){bw+="&start.rid="+this._addressList[0].rid;if(aq(this._addressList[0].pct)){bw+="&start.ridpct="+this._addressList[0].pct}}else{bw+="&start.x="+this._addressList[0].x;bw+="&start.y="+this._addressList[0].y}if(this._addressList[1].rid){bw+="&end.rid="+this._addressList[1].rid;if(aq(this._addressList[1].pct)){bw+="&end.ridpct="+this._addressList[1].pct}}else{bw+="&end.x="+this._addressList[1].x;bw+="&end.y="+this._addressList[1].y}bw+="&date="+this._options.date;bw+="&time="+this._options.time;bw+="&sens="+this._options.sens;bw+="&criteria="+this._options.criteria;return bw},configure:function(bx,bw){this._addressList=bx;this._options=bw||{}}});var at=N(f,{initialize:function(){f.prototype.initialize.call(this)},encode:function(){var bw=f.prototype.encode.apply(this);bw+="&fullAddress="+encodeURIComponent(this._addr);return bw},configure:function(bx,bw){f.prototype.configure.call(this,bw);this._addr=bx},isReady:function(){return(typeof this._addr==="string")}});var V=N(f,{initialize:function(){f.prototype.initialize.call(this)},encode:function(){var bw=f.prototype.encode.apply(this);bw+="&x="+this._coords.x;bw+="&y="+this._coords.y;return bw},configure:function(bx,bw){f.prototype.configure.call(this,bw);this._coords=bx},isReady:function(){return(this._coords instanceof P)}});var bp=N({initialize:function(){}});var aY=aN.api.geolocation.AddressLocation=N(bp,{initialize:function(bx,bz,by,bw){bp.prototype.initialize.call(this);this._countryName=bx;this._townName=bz;this._wayName=by;this._number=bw},setCountryName:function(bw){delete this._countryCode;delete this._countryIsoCode;this._countryName=bw},setTownName:function(bw){delete this._townOfficialCode;this._townName=bw},setWayName:function(bw){this._wayName=bw},setNumber:function(bw){this._number=bw},setCountryCode:function(bw){delete this._countryName;delete this._countryIsoCode;this._countryCode=bw},setTownOfficialCode:function(bw){delete this._townName;this._townOfficialCode=bw},setPostalCode:function(bw){this._postalCode=bw},setCountryIsoCode:function(bw){delete this._countryName;delete this._countryCode;this._countryIsoCode=bw},setSubcountryName:function(bw){delete this._subcountryOfficialCode;this._subcountryName=bw},setSubcountryOfficialCode:function(bw){delete this._subcountryName;this._subcountryOfficialCode=bw}});var bj=3,b=4,F=7,q=10,w=11;var bc=N(bp,{Placemark:null,initialize:function(bx,bD){bp.prototype.initialize.call(this);var bw;switch(bx.ExtendedData["mappy:LocalGeocodeLevel"]["mappy:code"]){case"1":this._bestZoom=bj;break;case"2":this._bestZoom=b;break;case"3":this._bestZoom=F;break;case"4":this._bestZoom=q;break;case"5":this._bestZoom=w;break;default:this._bestZoom=0}if(bD!==true){var by,bB;try{if(bx.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber){by={};bB=l.makeArray(bx.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber);for(bw=0;bw<bB.length;bw+=1){by[bB[bw].Type]=bB[bw].value}bx.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber=by}}catch(bC){}try{if(bx.AddressDetails.Country.AdministrativeArea.Locality.DependentLocality.Thoroughfare.ThoroughfareNumber){by={};bB=l.makeArray(bx.AddressDetails.Country.AdministrativeArea.Locality.DependentLocality.Thoroughfare.ThoroughfareNumber);for(bw=0;bw<bB.length;bw+=1){by[bB[bw].Type]=bB[bw].value}bx.AddressDetails.Country.AdministrativeArea.Locality.DependentLocality.Thoroughfare.ThoroughfareNumber=by}}catch(bA){}if(bx.Point){var bz=bx.Point.coordinates.split(",");bx.Point.coordinates=[];for(bw=0;bw<bz.length;bw+=1){bx.Point.coordinates.push(bz[bw])}}}this.Placemark=bx},clone:function(){var bw=l.extend(true,{},this.Placemark);return new bc(bw,true)},getBestZoom:function(){return this._bestZoom},getRidInfo:function(){return{rid:this.Placemark.ExtendedData["mappy:road_element_id"],pct:this.Placemark.ExtendedData["mappy:road_element_percentage"]}}});var ah=aN.api.geolocation.Geocoder=N({_options:{format:"json",namedPlaceSearch:1,interactive:1,language:"FR",xmlOutput:"3v0"},initialize:function(){},geocode:function(bw,bz,bx){if(bw instanceof bc){bz([bw])}else{var by;if(typeof bw==="string"){by=new at()}else{if(bw instanceof P){by=new V()}else{if(bw instanceof aY){by=new an()}else{if(l.isFunction(bx)){bx(new Error("Bad parameter."))}return}}}by.configure(bw,this._options);if(by.isReady()){ad(by,function(bD){var bC=[];try{var bA=l.makeArray(bD.kml.Document.Placemark);for(var bB=0;bB<bA.length;bB+=1){bC.push(new bc(bA[bB]))}}catch(bE){if(l.isFunction(bx)){bx(bE)}return}bz(bC)},bx)}else{if(l.isFunction(bx)){bx(new Error("Not enough information."))}}}},setNamedPlaceSearch:function(bw){this._options.namedPlaceSearch=bw},setInteractive:function(bw){this._options.interactive=bw},setMaxRadius:function(bw){this._options.maxRadius=bw},setLanguage:function(bw){this._options.language=bw},setFavoriteCountry:function(bw){this._options.favoriteCountry=bw},setFavoriteCity:function(bw){this._options.favoriteCity=bw}});var aH=N({initialize:function(bz,bw,by){this.key=by;this._points=[];this.id=bz.id;var bA;for(var bx=0;bx<bz.region.p.length;bx+=1){bA=new P(bz.region.p[bx].x,bz.region.p[bx].y);this._points.push(bw.converter.toGeolayerPixels(bA))}this._toolTip=new aw(bw.view.div,bz.label)},isOver:function(bw,bC){var bz=this._points.length;var by,bx=bz-1;var bB=false;var bA=this._points;for(by=0;by<bz;by+=1){if(bA[by].y<bC&&bA[bx].y>=bC||bA[bx].y<bC&&bA[by].y>=bC){if(bA[by].x+(bC-bA[by].y)/(bA[bx].y-bA[by].y)*(bA[bx].x-bA[by].x)<bw){bB=!bB}}bx=by}return bB},openToolTip:function(bw){if(this._toolTip.isAdded===false){this._toolTip.add(bw)}},closeToolTip:function(){this._toolTip.remove()},destroy:function(){this._toolTip.remove()}});var bv=N({initialize:function(bz,by,bx,bw){this.sx=bz;this.sy=by;this.zoom=bx;this.viewMode=bw;this.key=this.getKey(bz,by,bx,bw.name)},create:function(by,bG){var bz=this.viewMode;var bD=bz.slabSize;var bF=this.sx*bD-by;var bE=bG-(this.sy+1)*bD;var bA=document.createElement("img");bA.style.position="absolute";bA.style.left=bF+"px";bA.style.top=bE+"px";bA.style.width=bD+"px";bA.style.height=bD+"px";bA.galleryImg="no";bA.style.MozUserSelect="none";bA.style.KhtmlUserSelect="none";bA.unselectable="on";bA.onselectstart=function(){return false};bA.src=G+"img/map/transparent.png";bA.ondragstart=function(){return false};bA.onmousedown=function(){return false};var bH=bz.getSx(this);var bx=(bH*this.sy)%aQ.length;var bw=aQ[bx]+aZ.slab+"viewmode="+bz.name+"&sx="+bH+"&sy="+this.sy+"&zoom="+this.zoom+"&auth="+aE;var bC=this;var bB;if(Q){bB=function(bI){X(bw+"&retry=1",bA,function(){bC.loaded=true})}}X(bw,bA,function(){bC.loaded=true},bB);this.div=bA;this.left=by;this.top=bG},clone:function(){var bw=new bv(this.sx,this.sy,this.zoom,this.viewMode);if(aq(this.div)){bw.div=this.div.cloneNode(false);bw.left=this.left;bw.top=this.top}return bw},append:function(bw){bw.append(this.div)},zoomAt:function(bz){var bC=this.viewMode.slabSize;var bB=this.left;var bA=this.top;var by=this.sx*bC-bB;var bx=bA-(this.sy+1)*bC;var bw=this.div;bw.style.left=(by*bz)+"px";bw.style.top=(bx*bz)+"px";bw.style.width=(bC*bz)+"px";bw.style.height=(bC*bz)+"px"},remove:function(){this.div.src=G+"img/map/transparent.png";this.div.parentNode.removeChild(this.div)},stopDownload:function(){if(!this.loaded){this.remove()}},getKey:function(bz,by,bx,bw){return bz+","+by+","+bx+","+bw}});var Y=aN.api.map.ViewMode=N({slabSize:null,minZoomLevel:null,maxZoomLevel:null,initialize:function(bw,bx){this.slabSize=parseInt(bt[bw]["slab-region"].template.size,10);this.maxZoomLevel=12;switch(bw){case"hybrid":case"photo":this.minZoomLevel=3;break;default:this.minZoomLevel=0}if(bw==="iti"||bw==="itimap"){bw+="&postkey="+bx}this.name=bw},zoomable:function(bw){if(bw>this.maxZoomLevel){return this.maxZoomLevel}else{if(bw<this.minZoomLevel){return this.minZoomLevel}}return -1},getSx:function(bx){var bw=Y.tileMaxIds[bx.zoom];var by;if(aq(bw)){by=bx.sx%(bw[0]+1);if(by<0){by+=(bw[0]+1)}}return by},checkSx:function(bx){var bw=Y.tileMaxIds[bx.zoom];if(aq(bw)){return(bx.sx>=0&&bx.sx<=bw[0])}else{return false}},checkSy:function(bx){var bw=Y.tileMaxIds[bx.zoom];if(aq(bw)){return(bx.sy>=0&&bx.sy<=bw[1])}else{return false}}});Y.slabSize=384;Y.mMaxZoomLevel=12;Y.tileMaxIds=[[0,0],[2,2],[8,6],[26,20],[80,62],[242,186],[728,560],[2186,1680],[6560,5041],[19682,15125],[59048,45377],[177146,136131],[531440,408395],[1594322,1225186]];var az=N({_tools:null,initialize:function(bw){this._map=bw;this._tools=[]},addTool:function(bw){if(bw instanceof af){if(aq(this._map.miniMap)){this._map.miniMap.removed()}this._map.miniMap=bw;bw.added(this._map);this._refreshPositions()}else{this._tools.push(bw);bw.added(this._map);bw.refreshPosition()}},removeTool:function(bx){if(a3(bx)){return}if(bx instanceof af){this._map.miniMap=null}bx.removed();var bw=l.inArray(bx,this._tools);if(bw!==-1){this._tools.splice(bw,1)}this._refreshPositions()},_refreshPositions:function(){for(var bw=0;bw<this._tools.length;bw+=1){this._tools[bw].refreshPosition()}}});var aj=aN.api.map.Marker=N(ba,{EVENTS:["click","dblclick","mouseover","mouseout","dragstart","dragstop","drag","popupopened","popupclosed"],div:null,coordinates:null,location:null,icon:null,isOnMap:false,isHidden:false,isPopUpOpened:false,isInCluster:false,dragging:false,isOver:false,_tailStyle:null,_toolTip:null,initialize:function(by,bw,bx){ba.prototype.initialize.apply(this);this.coordinates=by;this._icon=bw||new M(aN.api.ui.Icon.DEFAULT);this._popUpOptions=bx||new aS({mappyDecoration:true});this._toolTipListeners=[]},setIcon:function(bw){this._icon=bw;if(this.isOnMap){this._createIcon(this.div.parent());this.setMarkerPosition()}},getIcon:function(){return this._icon},setPopUpOptions:function(bw){this._popUpOptions=bw},getPopUpOptions:function(){return this._popUpOptions},_createIcon:function(bw){if(aq(this.div)){this.div.remove()}this.div=this._icon.create();this.div.css("position","absolute");var bx=this;this.div.click(function(by){bx.trigger("click",by)});this.div.dblclick(function(by){bx.trigger("dblclick",by)});this.div.mouseenter(function(by){if(!bx.isOver){bx.isOver=true;bx.trigger("mouseover",by)}});this.div.mouseleave(function(by){bx.isOver=false;bx.trigger("mouseout",by)});bw.append(this.div)},_createToolTip:function(){if(aq(this.toolTip)){this.removeToolTip();var bw=new aw(this._controller.view.div,this.toolTip);this._toolTipListeners.push(this.addListener("mouseover",function(bx){bw.add(bx)}));this._toolTipListeners.push(this.addListener("mouseout",function(){bw.remove()}));this._toolTipInst=bw}},geocode:function(bz,bw){var by=new aN.api.geolocation.Geocoder();var bx=this;by.geocode(this.coordinates,function(bA){if(bA.length>0){var bB=bA[0].Placemark.Point.coordinates;bx.location=bA[0];bx.coordinates=new aN.api.geo.Coordinates(bB[0],bB[1]);bx.setPosition()}if(typeof bz==="function"){bz(bA)}},bw)},added:function(bx,bw){this._controller=bw;this._createIcon(bx);if(bw.map.isReady){this.setPosition()}this.isOnMap=true;this._createToolTip();if(this.isHidden){this.hide()}},removed:function(){if(this.isOnMap){this.isOnMap=false;this.removeToolTip();this.closePopUp();this.div.remove()}},setPosition:function(){this.pos=this._controller.converter.toGeolayerPixels(this.coordinates);this.setMarkerPosition()},setMarkerPosition:function(){this.div.css({left:this.pos.x-this._icon.iconAnchor.x,top:this.pos.y-this._icon.iconAnchor.y,"z-index":this.pos.y+10000});if(aq(this._popUp)){this._popUp.setPopUpPosition(this.pos)}},openPopUp:function(bx,bw){if(aq(this._popUp)){this._controller.popuplayer.removePopUp(this._popUp)}if(!aq(this.pos)){this.setPosition()}this._popUp=new T(bx,this);this._controller.popuplayer.addPopUp(this._popUp);this._popUp.setPopUpPosition(this.pos);this.isPopUpOpened=true;this.trigger("popupopened");if(bw!==false){return this._popUp.slideTo(this.pos)}else{return false}},closePopUp:function(){if(aq(this._popUp)){this._controller.popuplayer.removePopUp(this._popUp);this.isPopUpOpened=false;this.trigger("popupclosed")}},addToolTip:function(bw){this.toolTip=bw;if(this.isOnMap){this._createToolTip()}},removeToolTip:function(){if(aq(this._toolTipInst)){this._toolTipInst.remove()}for(var bw=0;bw<this._toolTipListeners.length;bw+=1){this.removeListener(this._toolTipListeners[bw])}this._toolTipListeners=[]},addDraggable:function(){var bx=this;var bw=false,bz,by;function by(){var bD=0;var bB=0;var bH=bx._controller.view.position();var bE=bx._controller.model.getSize();var bC=bx.div.position();var bA=bx._icon.iconAnchor;var bG=bC.left+bA.x+bH.left;if(bG<20){bD=5}else{if(bG>bE.width-20){bD=-5}}var bF=bC.top+bA.y+bH.top;if(bF<20){bB=5}else{if(bF>bE.height-20){bB=-5}}if(bD||bB){bw=true;bH.left+=bD;bH.top+=bB;bx._controller.view.setPosition(bH.left,bH.top);bC.left-=bD;bC.top-=bB;bx.div.hackModifyInit(bD,bB);bx.div.css(bC);bx._controller.refreshTiles()}}this.div.unbind("click");aV(this.div,{start:function(bA){bz=setInterval(by,10);bx.dragging=true;bx.trigger("dragstart",bA)},stop:function(bD){window.clearInterval(bz);bx.dragging=false;var bB=bx.div.position();var bC=bB.left+bx._icon.iconAnchor.x;var bA=bB.top+bx._icon.iconAnchor.y;bx.coordinates=bx._controller.converter.fromGeolayerPixels(bC,bA);if(bw){bx._controller.newStaticPosition()}bx.trigger("dragstop",bD)},drag:function(bD){var bB=bx.div.position();var bC=bB.left+bx._icon.iconAnchor.x;var bA=bB.top+bx._icon.iconAnchor.y;bx.coordinates=bx._controller.converter.fromGeolayerPixels(bC,bA);bx.setPosition();bx.trigger("drag",bD)}});this.div.click(function(bA){bx.trigger("click",bA)})},hide:function(){this.isHidden=true;if(aq(this.div)){this.div.hide();this.closePopUp()}},show:function(){this.isHidden=false;if(aq(this.div)){this.div.show()}},setTailStyle:function(bw){this._tailStyle=bw},destroyTail:function(){if(aq(this.tail)){this.tail.clean()}},drawTail:function(){this.destroyTail();if(aq(this.center)){if(this.center.x!==this.pos.x||this.center.y!==this.pos.y){this.center.round();this.pos.round();if(!this.tail){this.tail=ai(this.div.parent(),10,"line");var bx=this._tailStyle||new R({lineWidth:1,strokeStyle:"FF000000"});this.tail.setStyle(bx)}var bw=new H(this.center.x,this.center.y,this.center.x,this.center.y);bw.addPoint(this.pos);this.tail.setBoundingBox(bw);this.center.px=this.center.x;this.center.py=this.center.y;this.pos.px=this.pos.x;this.pos.py=this.pos.y;this.tail.line([this.center,this.pos])}delete this.center}}});var a6=N(aj,{markers:null,bounds:null,initialize:function(bx,bw){aj.prototype.initialize.call(this,null,bw);this.markers=[];this.bounds=bx},added:function(bw,by){this.getIcon().label="x"+this.markers.length;for(var bx=0;bx<this.markers.length;bx+=1){this.markers[bx].isInCluster=true}aj.prototype.added.call(this,bw,by)},setPosition:function(){var bw,by=[];for(bw=0;bw<this.markers.length;bw+=1){by.push(this.markers[bw].coordinates)}var bx=new P(0,0);bx._x=0;bx._y=0;for(bw=0;bw<by.length;bw+=1){bx._x+=by[bw]._x;bx._y+=by[bw]._y}bx._x/=by.length;bx._y/=by.length;this.coordinates=P.fromNormalized(bx._x,bx._y);aj.prototype.setPosition.apply(this)},contains:function(bw){return this.bounds.inside(bw.pos)},removed:function(){for(var bw=0;bw<this.markers.length;bw+=1){this.markers[bw].show();this.markers[bw].isInCluster=false}aj.prototype.removed.call(this)}});function k(bC,bH,by,bx,bE){var bA=100,bz=bE||5;var bI=[];var bD,bB;function bw(bN){var bM=0,bL=0,bK=[false,false];do{do{bI.push(new a6(new H(bN.minX+bM*bA,bN.minY+bL*bA,bN.minX+(bM+1)*bA,bN.minY+(bL+1)*bA),bH));if(bN.minX+(bM+1)*bA<=bN.maxX){bM+=1}else{bK[0]=true}}while(bK[0]===false);bK[0]=false;if(bN.minY+(bL+1)*bA<=bN.maxY){bL+=1;bM=0}else{bK[1]=true}}while(bK[1]===false)}if(bC.length>0){var bF=bx.getSize();var bG=bx.div.offset();var bJ=new H(-bG.left,-bG.top,bF.width-bG.left,bF.height-bG.top);bw(bJ);for(bD=0;bD<bC.length;bD+=1){for(bB=0;bB<bI.length;bB+=1){if(bI[bB].contains(bC[bD])){bI[bB].markers.push(bC[bD]);break}}}for(bD=bI.length-1;bD>=0;bD-=1){if(bI[bD].markers.length<bz){bI.splice(bD,1)}else{for(bB=0;bB<bI[bD].markers.length;bB+=1){bI[bD].markers[bB].hide()}bI[bD].added(by,bx.controller)}}}return bI}function a0(bK){var bz=[[0,-1],[-1,0],[1,0],[0,1],[0,0]],bI=0.95,bH=0.6,bJ=0.1,bO=0.000001,bF={Canvas:100,PictoCenterDist:3,PictoPictoOverlap:3,PictoPictoRepulsion:0.5,PictoCenterOverlap:2,LineLineOverlap:10,CenterProximity:2},bP=20,by=12,bw=1;var bD=30;var bC=bK.length;var bQ;function bx(bS){for(var bR=0;bR<bC;bR+=1){if(bS!==bR&&bK[bS].center.dist(bK[bR].center)<(bK[bS].radius+bK[bR].radius)){return true}}return false}function bM(bR){bR.r=bR.center.dist(bR.picto)}function bN(bT,bS,b3,b2){var bZ=bT.x,bY=bT.y,bV=bS.x,bU=bS.y,b1=b3.x,b0=b3.y,bX=b2.x,bW=b2.y;var bR=((bY-b0)*(bX-b1)-(bZ-b1)*(bW-b0))/((bV-bZ)*(bW-b0)-(bU-bY)*(bX-b1));var b4=((bY-b0)*(bV-bZ)-(bZ-b1)*(bU-bY))/((bV-bZ)*(bW-b0)-(bU-bY)*(bX-b1));return{test:!(bR<0||bR>1||b4<0||b4>1),r:bR,s:b4}}function bG(bR,bZ,bX){var bU=bX.x-bZ.x,bS=bX.y-bZ.y;var bV=bR.x-bZ.x,bT=bR.y-bZ.y;if((Math.abs(bU)+Math.abs(bS))<2*bO||(bV*bU+bT*bS)<0){return Math.sqrt(bV*bV+bT*bT)}var bY=bR.x-bX.x,bW=bR.y-bX.y;if((bY*bU+bW*bS)>0){return Math.sqrt(bY*bY+bW*bW)}return Math.abs(bV*bS-bT*bU)/Math.sqrt(bU*bU+bS*bS)}function bL(bZ,bX){var bR=0,b1;b1=(bK[bX].r-bP)/by;b1*=b1*bZ.PictoCenterDist;bR+=b1;var bV,bY,bS,b0;for(var bU=0;bU<bC;bU+=1){if(bU!==bX){bY=bK[bX].picto.dist(bK[bU].picto);if(bY<2*bP){b1=(1-bY/(2*bP));b1*=b1*bZ.PictoPictoRepulsion;bR+=b1}if(bY<(bK[bX].radius+bK[bU].radius)){b1=(1-bY/(bK[bX].radius+bK[bU].radius));b1*=b1*bZ.PictoPictoOverlap;bR+=b1}bV=1.2*bK[bX].radius;bS=bK[bX].picto.dist(bK[bU].center);if(bS<bV){b1=(1-bS/bV);b1*=b1*bZ.PictoCenterOverlap;bR+=b1}if(bw>0){var bW=true;if(bK[bX].center.dist(bK[bU].center)>bw){var bT=bN(bK[bX].center,bK[bX].picto,bK[bU].center,bK[bU].picto);if(bT.test){b1=1+((1-bT.r)*bK[bX].r)/(bK[bX].radius+bw);bR+=bZ.LineLineOverlap*b1}else{bW=false}}else{bW=false}if(bW===false){b0=bG(bK[bX].picto,bK[bU].center,bK[bU].picto);bV=1.5*bK[bX].radius+bw;if(b0<bV){b1=(1-b0/bV);b1*=b1*bZ.LineLineOverlap;bR+=b1}}}else{}if(bS<bK[bX].r){b1=(1-bS/bK[bX].r);b1*=b1*bZ.CenterProximity/bC;bR+=b1}}}return bR}function bB(){var bW=0,bU;var b1=50;var b3=bD*0.1;var b2=bF;var bZ=0;for(bU=0;bU<bC;bU+=1){if(bK[bU].d>bO){var b0=bK[bU].picto.clone();var bR=0,bT=bz.length-1;var bX=Number.MAX_VALUE;for(var bV=0;bV<bz.length;bV+=1){bK[bU].picto.x=b0.x+bK[bU].d*bz[bV][0];bK[bU].picto.y=b0.y+bK[bU].d*bz[bV][1];bM(bK[bU]);var bS=bL(b2,bU);if(bS<bX){bR=bV;bX=bS}}if(bR!==bT){bK[bU].picto.x=b0.x+bK[bU].d*bz[bR][0];bK[bU].picto.y=b0.y+bK[bU].d*bz[bR][1];bM(bK[bU]);bK[bU].d*=bI;bZ+=bK[bU].d}else{bK[bU].d*=bH}}else{}}bZ/=bC;if(bZ>b3&&++bW!==b1){bQ=a8(bB,this)}else{for(bW=0;bW<bC;bW+=1){var bY=bK[bW].getIcon();bK[bW].pos.x=bK[bW].picto.x-bY.size.width*0.5+bY.iconAnchor.x;bK[bW].pos.y=bK[bW].picto.y-bY.size.height*0.5+bY.iconAnchor.y;bK[bW].setMarkerPosition();bK[bW].drawTail()}}}function bA(){var bR;clearTimeout(bQ);for(bR=0;bR<bC;bR+=1){var bS=bK[bR].getIcon();bK[bR].radius=0.5*bS.size.hypot();bK[bR].center=bK[bR].pos.clone();bK[bR].picto=new am(bK[bR].pos.x-bS.iconAnchor.x+bS.size.width*0.5,bK[bR].pos.y-bS.iconAnchor.y+bS.size.height*0.5);bM(bK[bR]);bK[bR].d=bD}for(bR=0;bR<bC;bR+=1){if(bx(bR)===false){bK[bR].d=0}}bQ=a8(bB,this)}function bE(){var bY;var bW=0,bU;var b1=50;var b3=bD*0.1;var b2=bF;var bZ;for(bW=0;bW<bC;bW+=1){bZ=bK[bW].getIcon();bK[bW].radius=0.5*bZ.size.hypot();bK[bW].center=bK[bW].pos.clone();bK[bW].picto=new am(bK[bW].pos.x-bZ.iconAnchor.x+bZ.size.width*0.5,bK[bW].pos.y-bZ.iconAnchor.y+bZ.size.height*0.5);bM(bK[bW]);bK[bW].d=bD}for(bW=0;bW<bC;bW+=1){if(bx(bW)===false){bK[bW].d=0}}do{bY=0;for(bU=0;bU<bC;bU+=1){if(bK[bU].d>bO){var b0=bK[bU].picto.clone();var bR=0,bT=bz.length-1;var bX=Number.MAX_VALUE;for(var bV=0;bV<bz.length;bV+=1){bK[bU].picto.x=b0.x+bK[bU].d*bz[bV][0];bK[bU].picto.y=b0.y+bK[bU].d*bz[bV][1];bM(bK[bU]);var bS=bL(b2,bU);if(bS<bX){bR=bV;bX=bS}}if(bR!==bT){bK[bU].picto.x=b0.x+bK[bU].d*bz[bR][0];bK[bU].picto.y=b0.y+bK[bU].d*bz[bR][1];bM(bK[bU]);bK[bU].d*=bI;bY+=bK[bU].d}else{bK[bU].d*=bH}}else{}}bY/=bC}while(bY>b3&&++bW!==b1);for(bW=0;bW<bC;bW+=1){bZ=bK[bW].getIcon();bK[bW].pos.x=bK[bW].picto.x-bZ.size.width*0.5+bZ.iconAnchor.x;bK[bW].pos.y=bK[bW].picto.y-bZ.size.height*0.5+bZ.iconAnchor.y;bK[bW].setMarkerPosition();bK[bW].drawTail()}}bA()}function aP(bz,bw){var bH=bw.geoLayerContainer.getPosition();function bJ(bN){var bL=bN.pos.x+bH.x;var bK=bN.pos.y+bH.y;var bM=Math.round(bL/bx);var bO=Math.round(bK/bx);if(bM>=0&&bM<by&&bO>=0&&bO<by){if(bD[bM][bO]==null){bD[bM][bO]=bN}else{var bQ=false;for(var bP=1;bP<=2&&!bQ;bP++){for(var bR=-bP;bR<=bP&&!bQ;bR++){for(var bS=-bP;bS<=bP&&!bQ;bS++){if(bM+bS>=0&&bM+bS<by&&bO+bR>=0&&bO+bR<by&&bD[bM+bS][bO+bR]==null){bM=bM+bS;bO=bO+bR;bD[bM][bO]=bN;bQ=true}}}}}bN.pos.x=bM*bx-bH.x;bN.pos.y=bO*bx-bH.y;bN.setMarkerPosition()}}if(bz.length>0){var bB=bz[0];var bF=bB.getIcon().size;var bE=bF.width;var bC=bF.height;var bx=bE+2;var bI=bw.getSize().width;var by=Math.ceil(bI/bx)+1;if(by>0){var bD=new Array(by);for(var bA=0;bA<by;bA+=1){bD[bA]=new Array(by)}var bG=null;for(bA=0;bA<bz.length;bA+=1){bG=bz[bA];bJ(bG)}}}}var T=N({div:null,isOnMap:false,initialize:function(bx,bw){this.html=bx;this.marker=bw},setPopUpPosition:function(bz){var by=this.marker.getPopUpOptions();var bw=this.marker.getIcon();var bx=by.getAnchorPoint(this._controller,this.size,bw,bz);this.div.css({position:"absolute",left:bz.x+bx.x,top:bz.y+bx.y})},slideTo:function(bB){if(this.isOnMap){var bA=this.marker.getPopUpOptions();var bx=this.marker.getIcon();var bz=bA.getAnchorPoint(this._controller,this.size,bx,bB);var bw=new am(bB.x+bz.x,bB.y+bz.y);var by=new H(bw.x,bw.y,bw.x+this.size.width,bw.y+this.size.height);by.addPoint(new am(bB.x-bx.iconAnchor.x,bB.y-bx.iconAnchor.y));by.addPoint(new am(bB.x-bx.iconAnchor.x+bx.size.width,bB.y-bx.iconAnchor.y+bx.size.height));this._controller.slideToBounds(by,"popup")}},added:function(bw){this._controller=bw;var bx=this.marker.getPopUpOptions();var by=bx.createPopUp(this.html,bw.popuplayer.div,this.marker);this.div=by.div;this.size=by.size;this.isOnMap=true},removed:function(){this.div.remove();this.isOnMap=false}});var aS=aN.api.map.PopUpOptions=N({TEMPLATE:'<div class="popup"><div class="popup-nw"><img src="{imagePath}/popup/popup-sprite.png"/></div><div class="popup-sw"><img src="{imagePath}/popup/popup-sprite.png"/></div><div class="popup-ne"><img src="{imagePath}/popup/popup-sprite.png"/></div><div class="popup-se"><img src="{imagePath}/popup/popup-sprite.png"/></div><div class="popup-beak"><img src="{imagePath}/popup/popup-sprite.png"/></div><div class="popup-content"></div><div class="popup-close"></div></div>',mappyDecoration:false,left:null,right:null,top:null,bottom:null,autoLayout:false,initialize:function(bw){bw=bw||{};this.mappyDecoration=bw.mappyDecoration;if(this.mappyDecoration){this.bottom=0;this.left="auto"}else{this.autoLayout=bw.autoLayout;this.left=bw.left;this.right=bw.right;this.top=bw.top;this.bottom=bw.bottom}},getAnchorPoint:function(bx,bz,bA,bw){var by;if(this.autoLayout){by=new am(bA.size.width-bA.iconAnchor.x,-bA.iconAnchor.y);var bC=bx.model.getPadding();var bB=bx.view.position();bB.left+=bw.x+by.x;bB.top+=bw.y+by.y;var bD=bx.model.getSize();if(bB.left+bz.width>bD.width-bC.right&&bB.left-bz.width-bA.size.width>bC.left){by.x-=bz.width+bA.size.width}if(bB.top+bz.height>bD.height-bC.bottom){if(bz.height>bD.height-bC.top-bC.bottom){by.y-=bB.top-bC.top}else{by.y-=bB.top+bz.height-bD.height+bC.bottom}}}else{by=new am(bA.popUpAnchor.x-bA.iconAnchor.x,bA.popUpAnchor.y-bA.iconAnchor.y);if(aq(this.left)){if(this.left==="auto"){by.x-=bz.width/2}else{by.x-=this.left}}if(aq(this.right)){if(this.right==="auto"){by.x-=bz.width/2}else{by.x+=this.right-bz.width}}if(aq(this.top)){if(this.top==="auto"){by.y-=bz.height/2}else{by.y-=this.top}}if(aq(this.bottom)){if(this.bottom==="auto"){by.y-=bz.height/2}else{by.y+=this.bottom-bz.height}}}return by},createPopUp:function(bA,bE,bz){if(typeof bA!=="string"){bA=l(bA).clone(true)}var bw,bJ;if(this.mappyDecoration){var bB=o(this.TEMPLATE,{imagePath:G+((bi)?"img_png8":"img")});bw=l(bB);bE.append(bw);var bC=bw.find(".popup-content");bC.html(bA);var bG=aG(bC,true);bw.width(bG.width);bw.height(bG.height);var bx=bG.width-23;var by=bG.height-22;bw.find(".popup-nw").width(bx);bw.find(".popup-sw").width(bx);bw.find(".popup-sw").height(by);bw.find(".popup-se").height(by);var bI=bw.find(".popup-beak");var bH=new aO(23,49);var bF=bG.getCenter();var bD=bH.getCenter();bI.css("left",Math.round(bF.x-bD.x));bI.css("top",bG.height-5);bJ=new aO(bG.width,bG.height+bH.height-5);bw.find(".popup-close").click(function(bK){bz.closePopUp()})}else{bw=l('<div class="popup"></div>');bw.html(bA);bE.append(bw);bJ=aG(bw,true)}bw.mousemove(function(bK){bK.stopPropagation()});return{div:bw,size:bJ}}});var I=aN.api.map.Map=N(ba,{EVENTS:["changestart","changeend","zoomstart","zoomend","drag","dragstart","dragstop","mousewheel","click","dblclick","rightclick","mouseup","mousedown","mousemove","mouseover","mouseout","resize","controlchanged","touchstart","touchmove","touchend","gestureend","gesturechange","gesturestart","refreshdescr"],isReady:false,hasInertia:false,dragging:false,div:null,initialize:function(bx){ba.prototype.initialize.apply(this);var bw=l(bx.container);this.controller=new ab(this,bw);this.toolManager=new az(this);this.copyrights=new x();this.addTool(this.copyrights);this.div=this.controller.view.div},setCenter:function(bx,bw){this.controller.setState(bx,bw)},resize:function(){this.controller.resize(this.div.width(),this.div.height())},getCenter:function(){return this.controller.getCenter()},setZoomLevel:function(bw){this.controller.setZoom(bw)},getZoomLevel:function(){return this.controller.model.getZoom()},addLayer:function(bw){this.controller.addLayer(bw)},removeLayer:function(bw){this.controller.removeLayer(bw)},addTool:function(bw){this.toolManager.addTool(bw)},removeTool:function(bw){this.toolManager.removeTool(bw)},getVisibleBounds:function(){var bw=this.controller.model.getSize();var bx=this.controller.model.getPadding();return new aA(this.controller.converter.fromPixels(bw.width-bx.right,bx.top),this.controller.converter.fromPixels(bx.left,bw.height-bx.bottom))},getBoundsZoomLevel:function(bw){return this.controller.model.getBoundsZoomLevel(bw)},slideBy:function(bw){this.controller.slideBy(bw.x,bw.y)},slideTo:function(bw){if(this.isReady){this.controller.slideTo(bw)}},zoomIn:function(){this.controller.setZoom(this.controller.model.getZoom()+1)},zoomOut:function(){this.controller.setZoom(this.controller.model.getZoom()-1)},getViewMode:function(){return this.controller.model.getViewMode()},setViewMode:function(bw){this.controller.setViewMode(bw)},getSize:function(){return this.controller.model.getSize()},setPadding:function(by){var bw={};for(var bx in by){if(by.hasOwnProperty(bx)){if(bx==="n"){bw.top=by[bx]}if(bx==="s"){bw.bottom=by[bx]}if(bx==="e"){bw.right=by[bx]}if(bx==="w"){bw.left=by[bx]}}}this.controller.setPadding(bw)},getPadding:function(){var bw=this.controller.model.getPadding();return{n:bw.top,s:bw.bottom,e:bw.right,w:bw.left}},disableDraggable:function(){this.controller.disableDraggable()},enableDraggable:function(){this.controller.enableDraggable()},enableDblClickZoom:function(){if(this.controller.dblclickZoom===false){this.controller.dblclickZoom=true;this.trigger("controlchanged","dblClickZoom")}},disableDblClickZoom:function(){if(this.controller.dblclickZoom===true){this.controller.dblclickZoom=false;this.trigger("controlchanged","dblClickZoom")}},isDblClickZoomEnabled:function(){return this.controller.dblclickZoom},enableScrollWheelZoom:function(){if(this.controller.mousewheelZoom===false){this.controller.mousewheelZoom=true;this.trigger("controlchanged","scrollWheelZoom")}},disableScrollWheelZoom:function(){if(this.controller.mousewheelZoom===true){this.controller.mousewheelZoom=false;this.trigger("controlchanged","scrollWheelZoom")}},isScrollWheelZoomEnabled:function(){return this.controller.mousewheelZoom},enableZoomSelection:function(){if(this.controller.zoomSelection===false){this.controller.enableZoomSelection();this.trigger("controlchanged","selectionZoom")}},disableZoomSelection:function(){if(this.controller.zoomSelection===true){this.controller.disableZoomSelection();this.trigger("controlchanged","selectionZoom")}},isZoomSelectionEnabled:function(){return this.controller.zoomSelection},enableGestureZoom:function(){if(this.controller.gestureZoom===false){this.controller.gestureZoom=true;this.trigger("controlchanged","gestureZoom")}},disableGestureZoom:function(){if(this.controller.gestureZoom===true){this.controller.gestureZoom=false;this.trigger("controlchanged","gestureZoom")}},setLogoPosition:function(bw){this.controller.view.div.find("[name=logo]").css(bw)},destroy:function(){this.controller.view.destroy()},getBounds:function(by){var bx=new aA();for(var bw=0;bw<by.length;bw+=1){bx.extend(by[bw])}bx.refreshCenter();return bx}});var a=N({initialize:function(bw){this.view=bw;this.duration=500;this.durationReciprocal=1/500;this.finished=true;this.currScale=1;this.delta=0},reset:function(){this.startScale=1;this.currScale=1;this.deltaZoom=0},zoom:function(by,bx,bw){if(this.finished){this.startViewPosition=this.view.position();this.view.createBG();this.screenX=bx;this.screenY=bw;this.reset()}this.deltaZoom+=by;this.startAnimation(this.currScale,Math.pow(3,this.deltaZoom))},startAnimation:function(bx,bw){this.finished=false;this.startScale=bx;this.finalScale=bw;this.startTime=new Date().getTime()},stepAnimation:function(){if(this.finished){return false}var bx=new Date().getTime()-this.startTime;if(bx<this.duration){var bw=bx*this.durationReciprocal;this.currScale=this.startScale+(this.finalScale-this.startScale)*bw;if((this.currScale==this.finalScale)){this.finished=true}}else{this.currScale=this.finalScale;this.finished=true}this.applyToView();return true},applyToView:function(){var bw=this.startViewPosition;var bz=this.currScale;var by=bs(bw.left+(bw.left-this.screenX)*(bz-1));var bx=bs(bw.top+(bw.top-this.screenY)*(bz-1));this.view.setBGScale(bz,by,bx)}});var a7=N({initialize:function(bA,bx){this.controller=bx;this.tiles=[];bA.css({position:"relative",overflow:"hidden","background-color":"#FFF3DC"});this.div=bA;if(bi){bA.append('<img name="logo" class="default-logo" src="'+G+'img_png8/map/logo.png" style="position:absolute;right:5px;top:5px;z-index:999;"></img>')}else{bA.append('<img name="logo" class="default-logo" src="'+G+'img/map/logo.png" style="position:absolute;right:5px;top:5px;z-index:999;"></img>')}var bz=l('<div name="geolayer" style="position:absolute;"></div>');this.geolayer=bz;this.tilelayer=l('<div name="tilelayer" style="position:absolute;z-index:10;"></div>');this.bgTileLayer=l('<div name="bgtilelayer" style="position:absolute;z-index:5;"></div>');this.geolayer.append(this.bgTileLayer);this.geolayer.append(this.tilelayer);bA.append(this.geolayer);bx.resize(bA.width(),bA.height());aV(this.geolayer,{drag:function(bB){bx.drag(bB)},start:function(bB){bx.dragStart(bB)},stop:function(bB){bx.dragStop(bB)}});bz.mouseout(function(bB){bx.mouseout(bB)});bz.mouseover(function(bB){bx.mouseover(bB)});bz.click(function(bB){bx.click(bB)});bz.dblclick(function(bB){bx.dblclick(bB)});bz.mousedown(function(bB){bx.mousedown(bB)});bz.mouseup(function(bB){bx.mouseup(bB)});bz.mousemove(function(bB){bx.mousemove(bB)});bz.mousewheel(function(bB,bC){bx.mousewheel(bB,bC)});l(window).resize(function(){bx.resize(bA.width(),bA.height())});bz.each(function(){this.oncontextmenu=function(){return false}});if(bn){bz[0].addEventListener("touchmove",function(bB){bB.preventDefault();bx.touchmove(bB)});bz[0].addEventListener("touchend",function(bB){bx.touchend(bB)});var by=0;var bw={};bz[0].addEventListener("touchstart",function(bB){bx.touchstart(bB);bB.preventDefault();if(bB.touches.length===1){var bD=bB.touches[0];if((new Date().getTime()-by)<1000){var bC=Math.pow(bD.pageX-bw.pageX,2)+Math.pow(bD.pageY-bw.pageY,2);if(bC<900){by=0;bw.pageX=bD.pageX;bw.pageY=bD.pageY;bx.dblclick(bD);return}}by=new Date().getTime();bw.pageX=bD.pageX;bw.pageY=bD.pageY}})}if(a5){bz[0].addEventListener("gesturestart",function(bB){bx.gesturestart(bB)});bz[0].addEventListener("gestureend",function(bB){bx.gestureend(bB)});bz[0].addEventListener("gesturechange",function(bB){bx.gesturechange(bB)})}},slide:function(bw,bA,bz,by){var bx=this.position();this.geolayer.animate({left:bx.left+bw,top:bx.top+bA},{duration:500,complete:function(){if(l.isFunction(by)){by()}},queue:false})},setTiles:function(bw,bA,bz){var bB;var by;for(var bx=0;bx<bw.length;bx+=1){by=bw[bx];if(a3(this.tiles[by.key])){by.create(bA,bz);by.append(this.tilelayer);this.tiles[by.key]=by}}},destroyExtraTiles:function(bw){var bz;for(var by=0;by<bw.length;by+=1){bz=bw[by];if(this.tiles.hasOwnProperty(bz.key)){this.tiles[bz.key].keep=true}}for(var bx in this.tiles){bz=this.tiles[bx];if(bz.keep!==true){bz.remove();delete this.tiles[bx]}else{bz.keep=false}}},reset:function(){this.clean();this.setPosition(0,0)},clean:function(){var bw=this.tiles;for(var bx in bw){if(bw.hasOwnProperty(bx)){bw[bx].remove()}}this.tiles={}},setPosition:function(bx,bw){this.geolayer.css({left:bx,top:bw})},setScale:function(by,bx,bw){this.geolayer.css({WebkitTransform:"scale("+by+")",MozTransform:"scale("+by+")",left:bx,top:bw})},setBGScale:function(bC,bB,bA){var bx=this.bgTileLayer;bx.hide();bx.css({left:bB,top:bA});for(var by=0,bz=this.bgTiles,bw=bz.length;by<bw;by+=1){bz[by].zoomAt(bC)}bx.show()},createBG:function(){this.cleanBG();var bx=this.bgTileLayer;var bA=this.bgTiles;var bz;for(var by in this.tiles){bz=this.tiles[by];bA.push(bz);bz.append(bx)}this.bgTiles=bA;this.tiles={};var bw=this.position();this.setBGScale(1,bw.left,bw.top);this.setPosition(0,0)},cleanBG:function(){this.bgTileLayer.empty();this.bgTiles=[]},position:function(){return this.geolayer.position()},leftTopFromEvent:function(bx){var bw=this.div.offset();return{left:bx.pageX-bw.left,top:bx.pageY-bw.top}},disableDraggable:function(){this.geolayer.disableDraggable()},enableDraggable:function(){this.geolayer.enableDraggable()},enableZoomSelection:function(){var bw=this;this._mouseDownSelectionHandler=function(bB){var by=bw.div.offset();var bx=new am(bB.pageX-by.left,bB.pageY-by.top);var bC=bw.controller.converter.fromPixels(bx.x,bx.y);var bz=function(){bw.geolayer.unbind("mousemove",bz);bw.geolayer.unbind("mouseup",bA);var bD=l('<div style="position: absolute; z-index: 998; width:10000px; height:10000px;"></div>');if(l.browser.msie){var bH=l('<div style="background-color:white; position:absolute; width:2000px; height:2000px;"></div>');bH.css("opacity",0.01);bD.append(bH)}var bG=l('<div class="tools-selected-zone" style="position:absolute;z-index: 991;"></div>');bG.css("opacity",0.3);bD.append(bG);bw.div.append(bD);bD[0].onselectstart=function(){if(bB){bB.returnValue=false}return false};var bF=bC;var bE=bB;bD.mouseup(function(bK){bD.remove();if(bE.pageX!==bK.pageX&&bE.pageY!==bK.pageY){var bJ=bw.div.offset();var bI=new am(bK.pageX-bJ.left,bK.pageY-bJ.top);var bL=bw.controller.converter.fromPixels(bI.x,bI.y);var bM=new aA();bM.extend(bF);bM.extend(bL);bM.refreshCenter();bw.controller.onZoomSelection(bM)}});bD.mousemove(function(bM){var bK=bw.div.offset();var bJ=bE.pageX-bK.left,bN=bE.pageY-bK.top,bL=bM.pageX-bE.pageX,bI=bM.pageY-bE.pageY;if(bL<0){bJ=bJ+bL;bL=bL*-1}if(bI<0){bN=bN+bI;bI=bI*-1}bG.width(bL);bG.height(bI);bG.css({left:bJ,top:bN})})};bw.geolayer.mousemove(bz);var bA=function(){bw.geolayer.unbind("mouseup",bA);bw.geolayer.unbind("mousemove",bz)};bw.geolayer.mouseup(bA)};this.geolayer.mousedown(this._mouseDownSelectionHandler)},disableZoomSelection:function(){this.geolayer.unbind("mousedown",this._mouseDownSelectionHandler);this._mouseDownSelectionHandler=null},destroy:function(){this.div.empty()}});var ab=N({initialize:function(bx,bw){this.map=bx;this.model=new S();this.view=new a7(bw,this);this.mapdescr=new aJ(this);this.converter=new aF(this.model,this.view);this.layers=[];this._dragFlag=false;this.dblclickZoom=true;this.mousewheelZoom=true;this.gestureZoom=true;this.zoomSelection=false;this.zoomAnimation=!ao;this.popuplayer=new aa(900);this.addLayer(this.popuplayer);this.zoomAnimationHelper=new a(this.view)},setPadding:function(bw){this.model.setPadding(bw);if(this.map.isReady){this.newStaticPosition()}},setState:function(bx,bw){this.view.cleanBG();this.model.setState(bx,bw);this.map.isReady=true;this.newDisplayArea()},getCenter:function(){var bw=this.model.topLeftCornerX;var bx=this.model.topLeftCornerY;return this.converter.fromPixels(bw,bx)},setZoom:function(bC,by,bx){if(a3(by)){by=this.model.topLeftCornerX}if(a3(bx)){bx=this.model.topLeftCornerY}var bw=this.view.position();if(this.zoomAnimation){var bB=this.model.getZoom();if(this.model.setZoom(bC,by,bx,bw)){this.map.trigger("zoomstart");var bA=this;var bD=this.zoomAnimationHelper.finished;this.zoomAnimationHelper.zoom(this.model.getZoom()-bB,by,bx);function bz(){setTimeout(function(){if(bA.zoomAnimationHelper.stepAnimation()){bz()}else{bA.newDisplayArea();bA.map.trigger("zoomend")}},13)}if(bD){bz()}}}else{if(this.model.setZoom(bC,by,bx,bw)){this.map.trigger("zoomstart");this.newDisplayArea();this.map.trigger("zoomend")}}},setViewMode:function(bz){if(this.map.isReady){this.map.trigger("changestart","viewmode");this.model.setViewMode(bz);var bx=bz.zoomable(this.model.getZoom());if(bx!==-1){this.setZoom(bx)}else{this.view.clean();this.refreshTiles();var bw=this.view.position();var by=this.model.getTiles(bw.left,bw.top);this.mapdescr.newDisplayArea();this.mapdescr.refresh(by)}this.map.trigger("changeend","viewmode")}else{this.model.setViewMode(bz)}},newDisplayArea:function(){this.map.trigger("changestart","newDisplayArea");var bw=this.model.getTiles(0,0);this.view.reset();this.view.setTiles(bw,this.model.centerX-this.model.topLeftCornerX,this.model.centerY+this.model.topLeftCornerY);this.refreshLayers();this.mapdescr.newDisplayArea();this.mapdescr.refresh(bw);this.map.trigger("changeend","newDisplayArea")},refreshLayers:function(){for(var bw=0;bw<this.layers.length;bw+=1){this.layers[bw].newDisplayArea()}},refreshTiles:function(){var bw=this.view.position();var bx=this.model.getTiles(bw.left,bw.top);this.view.setTiles(bx,this.model.centerX-this.model.topLeftCornerX,this.model.centerY+this.model.topLeftCornerY);this._dragFlag=false;return bx},newStaticPosition:function(){var bw=this.refreshTiles();this.view.destroyExtraTiles(bw);this.mapdescr.refresh(bw)},addLayer:function(bw){bw.added(this);this.layers.push(bw)},removeLayer:function(bx){bx.removed();var bw=l.inArray(bx,this.layers);if(bw!==-1){this.layers.splice(bw,1)}},getCoordinatesFromEvent:function(bx){var by;if(this.map.isReady){var bw=this.view.leftTopFromEvent(bx);by=this.converter.fromPixels(bw.left,bw.top)}return by},slideBy:function(bw,bz,by){this.map.trigger("changestart","slide",by);var bx=this;this.view.slide(bw,bz,null,function(){var bA=bx.refreshTiles();bx.view.destroyExtraTiles(bA);bx.mapdescr.refresh(bA);bx.map.trigger("changeend","slide",by)})},slideTo:function(bw){var by=this.converter.toGeolayerPixels(this.getCenter());var bx=this.converter.toGeolayerPixels(bw);this.slideBy(by.x-bx.x,by.y-bx.y)},slideToBounds:function(by,bC){var bB=0;var bA=0;var bw=this.view.position();var bz=this.model.getPadding();var bx=this.model.getSize();if(by.minX+bw.left-bz.left<0){bB=-(by.minX+bw.left-bz.left)}else{if(by.maxX+bw.left+bz.right-bx.width>0){bB=-(by.maxX+bw.left+bz.right-bx.width)}}if(by.minY+bw.top-bz.top<0){bA=-(by.minY+bw.top-bz.top)}else{if(by.maxY+bw.top+bz.bottom-bx.height>0){bA=-(by.maxY+bw.top+bz.bottom-bx.height)}}if(bB!==0||bA!==0){this.slideBy(bB,bA,bC)}},enableDraggable:function(){this.view.enableDraggable();this.map.trigger("controlchanged","draggable")},disableDraggable:function(){this.view.disableDraggable();this.map.trigger("controlchanged","draggable")},enableZoomSelection:function(){if(!this.zoomSelection){this.disableDraggable();this.view.enableZoomSelection();this.zoomSelection=true}},disableZoomSelection:function(){if(this.zoomSelection){this.view.disableZoomSelection();this.zoomSelection=false}},drag:function(bw){if(!this._dragFlag&&!ao){this._dragFlag=true;setTimeout(a1(this.refreshTiles,this),200)}this.map.trigger("drag",bw)},dragStart:function(bw){this.view.cleanBG();this.map.dragging=true;this.map.trigger("changestart","drag");this.map.trigger("dragstart",bw)},dragStop:function(bw){this.newStaticPosition();this.map.dragging=false;this.map.trigger("changeend","drag");this.map.trigger("dragstop",bw)},click:function(bw){this.map.trigger("click",bw,this.getCoordinatesFromEvent(bw))},dblclick:function(bx){if(this.dblclickZoom===true){var bw=this.view.leftTopFromEvent(bx);this.setZoom(this.model.getZoom()+1,bw.left,bw.top)}this.map.trigger("dblclick",bx,this.getCoordinatesFromEvent(bx))},mousedown:function(bw){this.map.trigger("mousedown",bw,this.getCoordinatesFromEvent(bw))},mouseup:function(bw){if(bw.button===2){this.map.trigger("rightclick",bw,this.getCoordinatesFromEvent(bw))}else{this.map.trigger("mouseup",bw,this.getCoordinatesFromEvent(bw))}},mousemove:function(bw){this.map.trigger("mousemove",bw)},mousewheel:function(by,bz){if(this.mousewheelZoom===true){var bw=(bz>0)?1:-1;var bx=this.view.leftTopFromEvent(by);this.setZoom(this.model.getZoom()+bw,bx.left,bx.top);by.preventDefault()}this.map.trigger("mousewheel",by,bz)},mouseout:function(bw){this.map.trigger("mouseout",bw)},mouseover:function(bw){this.map.trigger("mouseover",bw)},resize:function(bw,by){this.model.setSize(bw,by);if(this.map.isReady){this.model.setState(this.model.center,this.model.zoom);var bx=this.model.getTiles(0,0);this.view.reset();this.view.setTiles(bx,this.model.centerX-this.model.topLeftCornerX,this.model.centerY+this.model.topLeftCornerY);this.refreshLayers();this.mapdescr.newDisplayArea();this.mapdescr.refresh(bx)}this.map.trigger("resize")},touchmove:function(bw){this.map.trigger("touchmove",bw)},touchstart:function(bw){if(this.gestureZoom&&bw.touches.length>1){this._dblTouch=true;this._gestureStartEvent={pageX:(bw.touches[0].pageX+bw.touches[1].pageX)/2,pageY:(bw.touches[0].pageY+bw.touches[1].pageY)/2};this._gestureStartPosition=this.view.position()}this.map.trigger("touchstart",bw)},touchend:function(bw){if(this._dblTouch){this.setZoom(this.model.getZoom()-1);this._dblTouch=false}this.map.trigger("touchend",bw)},gesturestart:function(bw){this.map.trigger("gesturestart",bw)},gestureend:function(by,bx){if(this.gestureZoom){this.view.setScale(1,this._gestureStartPosition.left,this._gestureStartPosition.top);var bw;if(by.scale>2){bw=this.view.leftTopFromEvent(this._gestureStartEvent);this.setZoom(this.model.getZoom()+1,bw.left,bw.top)}else{if(by.scale<0.5){bw=this.view.leftTopFromEvent(this._gestureStartEvent);this.setZoom(this.model.getZoom()-1,bw.left,bw.top)}}}this.map.trigger("gestureend",by)},gesturechange:function(bx){if(this.gestureZoom){this._dblTouch=false;var bB=bx.scale;var bw=this._gestureStartPosition;var bA=this.view.leftTopFromEvent(this._gestureStartEvent);var bz=bw.left+(bw.left-bA.left)*(bB-1);var by=bw.top+(bw.top-bA.top)*(bB-1);this.view.setScale(bB,bz,by)}this.map.trigger("gesturechange",bx)},onZoomSelection:function(bw){this.setState(bw.center,this.model.getBoundsZoomLevel(bw))}});var S=N({initialize:function(){this.viewMode=new Y("map");this.refreshResolutions();this.padding={left:0,top:0,right:0,bottom:0}},refreshResolutions:function(){var bx=this.viewMode.slabSize;this.resolutions=[];for(var by=0,bw=Y.mMaxZoomLevel;by<=bw;by+=1){this.resolutions[by]=bx*Math.pow(3,by)}},setSize:function(bw,bx){this.width=bw;this.height=bx;this.halfWidth=bw/2;this.halfHeight=bx/2;this.computeTopLeftCorner()},getSize:function(){return new aO(this.width,this.height)},setPadding:function(bw){if(aq(bw.left)){this.padding.left=bw.left}if(aq(bw.top)){this.padding.top=bw.top}if(aq(bw.right)){this.padding.right=bw.right}if(aq(bw.bottom)){this.padding.bottom=bw.bottom}},getPadding:function(){return this.padding},setCenter:function(bw){this.center=bw;this.computeCenter()},computeCenter:function(){var bx=this.getResolution();var bw=this.center;this.centerX=bs(bw._x*bx);this.centerY=bs(bw._y*bx)},computeTopLeftCorner:function(){this.topLeftCornerX=bs(this.halfWidth+(this.padding.left-this.padding.right)/2);this.topLeftCornerY=bs(this.halfHeight+(this.padding.top-this.padding.bottom)/2)},getResolution:function(){return this.resolutions[this.zoom]},getMeterPerPixel:function(){var bw=6378140;return(Math.PI*bw)/this.getResolution()},setZoom:function(bA,bz,by,bw){if(bA==this.zoom||bA<this.viewMode.minZoomLevel||bA>this.viewMode.maxZoomLevel){return false}if(bw.left!=0||bw.top!=0){this.center=this.offsetCenter(-bw.left,-bw.top);this.computeCenter()}if(bz!=this.topLeftCornerX||by!=this.topLeftCornerY){var bx=1-Math.pow(3,this.zoom-bA);this.center=this.offsetCenter((bz-this.topLeftCornerX)*bx,(by-this.topLeftCornerY)*bx);this.computeCenter()}this.zoom=bA;this.computeCenter();return true},getZoom:function(){return this.zoom},offsetCenter:function(bw,bA){var bx=this.getResolution();var bz=this.centerX+bw;var by=this.centerY-bA;return P.fromNormalized(bz/bx,by/bx)},setState:function(bw,bx){this.center=bw;this.zoom=bx;this.computeCenter()},setViewMode:function(bw){this.viewMode=bw;this.refreshResolutions()},getViewMode:function(){return this.viewMode},getPointXY:function(bx,by){if(!by){by=new am(0,0)}var bw=this.getResolution();by.x=bs(bx._x*bw-this.centerX+this.topLeftCornerX);by.y=bs(this.centerY+this.topLeftCornerY-bx._y*bw);return by},getGeoPoint:function(bx,bA){var by=this.centerX-this.topLeftCornerX+bx;var bw=this.centerY+this.topLeftCornerY-bA;var bz=this.getResolution();return P.fromNormalized(by/bz,bw/bz)},getBoundsZoomLevel:function(bw){var bx=this.width-this.padding.left-this.padding.right;var bD=this.height-this.padding.top-this.padding.bottom;var bB=bw.getDeltaX();var bA=bw.getDeltaY();var bE=Y.mMaxZoomLevel;var by=this.resolutions;var bz=bB*by[bE];var bC=bA*by[bE];while((bz>bx||bC>bD)&&bE>0){bE--;bz=bB*by[bE];bC=bA*by[bE]}return bE},getTiles:function(bA,bz){var bF=[];var bJ=this.zoom;var bI=this.viewMode.slabSize;var bL=this.centerX-this.topLeftCornerX-bA;var bK=this.centerY+this.topLeftCornerY+bz;var bH=bs(bL/bI);var bx=bs((bL+this.width)/bI);var bw=bs(bK/bI);var bG=bs((bK-this.height)/bI);var bE=Y.tileMaxIds[bJ][0];var bB=Y.tileMaxIds[bJ][1];if(bH<0){bH=0}if(bG<0){bG=0}if(bx>bE){bx=bE}if(bw>bB){bw=bB}var by=this.viewMode;for(var bD=bH;bD<=bx;bD+=1){for(var bC=bG;bC<=bw;bC+=1){bF.push(new bv(bD,bC,bJ,by))}}return bF}});var aJ=N({_tiles:null,_pois:null,_providers:null,_traEvents:null,_zoomLevel:0,initialize:function(bw){this._controller=bw;this._tiles={};this._pois=[];this._traEvents=[];this._providers=[];var bx=this;bw.map.addListener("mousemove",function(bB){var bD=bw.map;if(!bD.dragging){var bA=bD.controller.view.position();var by=bD.controller.view.div.offset();var bF=bB.pageX-by.left-bA.left;var bE=bB.pageY-by.top-bA.top;var bC=bx._pois;for(var bz=0;bz<bC.length;bz+=1){if(bC[bz].isOver(bF,bE)){bC[bz].openToolTip(bB);break}else{bC[bz].closeToolTip()}}for(bz+=1;bz<bC.length;bz+=1){bC[bz].closeToolTip()}}});bw.map.addListener("mouseout",function(){var bz=bx._pois;for(var by=0;by<bz.length;by+=1){bz[by].closeToolTip()}})},newDisplayArea:function(){for(var bw=0;bw<this._pois.length;bw+=1){this._pois[bw].destroy()}this._pois=[];this._tiles={};this._providers=[];this._controller.map.copyrights.setText(this._providers)},refresh:function(bD){var bC=[];var by=this._controller.model.getViewMode();var bw=this._controller.map.getZoomLevel();var bA=(by.name=="traffic"&&this._zoomLevel!=bw);if(bA){this._traEvents=[]}this._zoomLevel=bw;var bE;for(var bx=0;bx<bD.length;bx+=1){bE=bD[bx];if(bA||(a3(this._tiles[bE.key])&&by.checkSy(bE)&&by.checkSx(bE))){bC.push(bE.sx+","+bE.sy)}}if(bC.length>0){var bB=new d();bB.configure(bC.join("|"),this._controller.model.getZoom(),by.name);var bz=this;ad(bB,function(bF){try{var bR=parseInt(bF["slab-region"].zoom,10);if(bR===bz._controller.model.getZoom()){var bJ,bH,bG,bK,bL,bS,bN,bI;var bQ=bz._controller.model.getViewMode().name;var bP=l.makeArray(bF["slab-region"].slabs.slab);bz._updateTilesList(bP,bR,bQ);var bO={};for(bJ=0;bJ<bP.length;bJ+=1){bO[bP[bJ].sid]=bP[bJ].key}if(ao===false&&aq(bF["slab-region"].interact)&&aq(bF["slab-region"].interact.slab)){bK=l.makeArray(bF["slab-region"].interact.slab);for(bJ=0;bJ<bK.length;bJ+=1){if(aq(bz._tiles[bO[bK[bJ].sid]])){bL=l.makeArray(bK[bJ].layer);if(aq(bL)){for(bH=0;bH<bL.length;bH+=1){bS=l.makeArray(bL[bH].item);for(bG=0;bG<bS.length;bG+=1){if(bz._controller.model.getViewMode().name=="traffic"&&bL[bH].name=="evt_AT"){bS[bG].slab=bK[bJ].sid;bz._traEvents.push(bS[bG])}else{bz._pois.push(new aH(bS[bG],bz._controller,bO[bK[bJ].sid]))}}}}}}}if(aq(bF["slab-region"].copyright)&&aq(bF["slab-region"].copyright.slab)){bN=l.makeArray(bF["slab-region"].copyright.slab);for(bJ=0;bJ<bN.length;bJ+=1){if(aq(bz._tiles[bO[bN[bJ].sid]])){bI=l.makeArray(bN[bJ].provider);for(bH=0;bH<bI.length;bH+=1){if(a3(bz._providers[bI[bH]])){bz._providers[bI[bH]]=[]}bz._providers[bI[bH]][bO[bN[bJ].sid]]=true}}}}else{bz._providers=[]}bz._controller.map.copyrights.setText(bz._providers)}bz._controller.map.trigger("refreshdescr")}catch(bM){}});this.destroyExtraPois(bD)}},destroyExtraPois:function(bw){var bA={};for(var by=0;by<bw.length;by+=1){bA[bw[by].key]=true}for(var by=this._pois.length-1;by>=0;by-=1){if(a3(bA[this._pois[by].key])){this._pois[by].destroy();this._pois.splice(by,1)}}for(by in this._providers){if(this._providers.hasOwnProperty(by)){var bz=this._providers[by];for(var bx in bz){if(a3(bA[bx])){delete bz[bx]}}if(aI(this._providers[by])){delete this._providers[by]}}}},_updateTilesList:function(bw,by,bz){this._tiles={};for(var bx=0;bx<bw.length;bx+=1){bw[bx].key=bv.prototype.getKey(bw[bx].sx,bw[bx].sy,bw[bx].zoom,bz);this._tiles[bw[bx].key]=true}}});var aF=N({initialize:function(bx,bw){this.model=bx;this.view=bw},toGeolayerPixels:function(bx,bw){return this.model.getPointXY(bx,bw)},fromPixels:function(bw,by){var bx=this.view.position();return this.model.getGeoPoint(bw-bx.left,by-bx.top)},fromGeolayerPixels:function(bw,bx){return this.model.getGeoPoint(bw,bx)}});function ai(bw,bD,bz){if(l.browser.mozilla===true||(l.browser.msie&&parseFloat(l.browser.version)>=9)){return new s(bw,bD,bz)}else{if(l.browser.msie===true){var by=new ag(bw,bz);try{if(document.namespaces){var bx=false;for(var bC=0;bC<document.namespaces.length;bC+=1){var bB=document.namespaces(bC);if(bB.name==="v"){if(bB.urn==="urn:schemas-microsoft-com:vml"){bx=true}else{break}}}if(!bx){document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}}catch(bA){}return by}else{return new t(bw,bD,bz)}}}var j=N({initialize:function(by,bx,bw){this.type=bw;this.div=l('<div style="position:absolute;"></div>');by.append(this.div);this.div.hide();this._delta=bx||0;this.style=new R();this.lineCap="round";this.lineJoin="round"},setStyle:function(bw){if(aq(bw)){this.style=bw}},getStyle:function(){return this.style},refreshStyle:function(){},setBoundingBox:function(bw){this._bbox=bw;this.div.css("left",this._bbox.minX-this._delta);this.div.css("top",this._bbox.minY-this._delta)},clean:function(){this.div.hide();delete this._bbox;this.div.empty()},removed:function(){this.div.remove()},buildPath:function(bE){var by;var bx=bE.length;var bw=[[]];if(bx>1){var bF=this._bbox;var bD=bF.minX;var bC=bF.minY;var bA=bF.maxX;var bz=bF.maxY;var bB=W;for(by=1;by<bx;by+=1){bB(bD,bC,bA,bz,bE[by-1].x,bE[by-1].y,bE[by].x,bE[by].y,bw)}}for(by=bw.length-1;by>=0;by-=1){if(bw[by].length<4){bw.splice(by,1)}}return bw},buildPolygon:function(bw){return br(bw,this._bbox)}});function W(bH,bB,bG,bA,bF,bx,bE,bw,bO){var bD=-1;var bC=false;var bJ=false;var bL=false;var bI;var bM;var by=((bw-bx)/(bE-bF));if(bE<bF){bM=bE;bE=bF;bF=bM;bM=bw;bw=bx;bx=bM;bL=true}if(bF<bH){if(bE<=bH){return bD}else{bx+=(by*(bH-bF));bF=bH;bC=true}}if(bE>bG){if(bF>=bG){return bD}else{bw-=(by*(bE-bG));bE=bG;bJ=true}}if(bw<bx){bM=bE;bE=bF;bF=bM;bM=bw;bw=bx;bx=bM;bI=bJ;bJ=bC;bC=bI;bL=!bL}if(bx<bB){if(bw<=bB){return bD}else{bF+=((bB-bx)/by);bx=bB;bC=1}}if(bw>bA){if(bx>=bA){return bD}else{bE-=((bw-bA)/by);bw=bA;bJ=1}}if(bL){bM=bE;bE=bF;bF=bM;bM=bw;bw=bx;bx=bM;bI=bJ;bJ=bC;bC=bI}var bz=bC+bJ*2;var bK=Math.round;var bN=bO[bO.length-1];if(bz===0){if(bN.length===0){bN.push(bK(bF));bN.push(bK(bx))}bN.push(bK(bE));bN.push(bK(bw))}else{if(bz>0){bN.push(bK(bF));bN.push(bK(bx));bN.push(bK(bE));bN.push(bK(bw));if(bz>1){bO.push([])}}}}function br(bK,bw){var bL;var bJ=bK.length;var bM=[];var bC=bw.minX;var bz=bw.minY;var bA=bw.maxX;var by=bw.maxY;var bx=bK[bK.length-1];var bI;var bH=0;var bO,bN;var bQ;var bP=Math.round;for(var bL=0,bG=bK.length;bL<bG;bL+=1){bI=bx;bx=bK[bL];if(bM.length===0&&bI.x>=bC&&bI.x<=bA&&bI.y>=bz&&bI.y<=by){bH+=1;bM.push(bP(bI.x));bM.push(bP(bI.y))}var bF=L(bC,0,bC,1,bI.x,bI.y,bx.x,bx.y);var bE=L(bA,0,bA,1,bI.x,bI.y,bx.x,bx.y);var bD=L(0,bz,1,bz,bI.x,bI.y,bx.x,bx.y);var bB=L(0,by,1,by,bI.x,bI.y,bx.x,bx.y);if(bF>bE){bQ=bF;bF=bE;bE=bQ}if(bD>bB){bQ=bD;bD=bB;bB=bQ}if(bF>bD){bQ=bF;bF=bD;bD=bQ}if(bE>bB){bQ=bE;bE=bB;bB=bQ}if(bE>bD){bQ=bE;bE=bD;bD=bQ}if(bF>=0&&bF<=1){bO=bI.x+(bx.x-bI.x)*bF;bN=bI.y+(bx.y-bI.y)*bF;bO=Math.max(bO,bC);bO=Math.min(bO,bA);bN=Math.max(bN,bz);bN=Math.min(bN,by);bM.push(bP(bO));bM.push(bP(bN))}if(bE>=0&&bE<=1){bO=bI.x+(bx.x-bI.x)*bE;bN=bI.y+(bx.y-bI.y)*bE;bO=Math.max(bO,bC);bO=Math.min(bO,bA);bN=Math.max(bN,bz);bN=Math.min(bN,by);bM.push(bP(bO));bM.push(bP(bN))}if(bD>=0&&bD<=1){bO=bI.x+(bx.x-bI.x)*bD;bN=bI.y+(bx.y-bI.y)*bD;bO=Math.max(bO,bC);bO=Math.min(bO,bA);bN=Math.max(bN,bz);bN=Math.min(bN,by);bM.push(bP(bO));bM.push(bP(bN))}if(bB>=0&&bB<=1){bO=bI.x+(bx.x-bI.x)*bB;bN=bI.y+(bx.y-bI.y)*bB;bO=Math.max(bO,bC);bO=Math.min(bO,bA);bN=Math.max(bN,bz);bN=Math.min(bN,by);bM.push(bP(bO));bM.push(bP(bN))}if(bM.length!==0&&bx.x>=bC&&bx.x<=bA&&bx.y>=bz&&bx.y<=by){bH+=1;bM.push(bP(bx.x));bM.push(bP(bx.y))}}if(bM.length>4&&(bH!==0||ar(bM)>1)){return bM}else{return[]}}function ar(by){var bz=0;for(var bx=0,bw=by.length-2;bx<bw;bx+=2){bz+=(by[bx]+by[bx+2])*(by[bx+1]-by[bx+3])}bz+=(by[bx]+by[0])*(by[bx+1]-by[1]);return 0.5*Math.abs(bz)}function ae(by,bA,bx,bz,bw,bB){if(bx===by){return bw===by}else{return(bB-bw*(bz-bA)/(bx-by)+(by*bz-bA*bx)/(bx-by))===0}}function L(bF,bx,bE,bw,bA,bD,bz,bC){var by=(bw-bx)*(bA-bF)-(bE-bF)*(bD-bx);var bB=(bC-bD)*(bE-bF)-(bw-bx)*(bz-bA);if(bB!==0){return(by/bB)}else{if(ae(bF,bx,bE,bw,bz,bC)){return 0}else{return -1}}}var t=N(j,{initialize:function(bA,bz,by){j.prototype.initialize.call(this,bA,bz,by);var bx=l('<canvas name="mappy-route-layer"></canvas>');this.div.append(bx);var bw=bx[0];this._ctx=bw.getContext("2d")},getStrokeStyle:function(){var bw=this.style.getStrokeStyle();return"rgba("+parseInt(bw.substr(6,2),16)+", "+parseInt(bw.substr(4,2),16)+", "+parseInt(bw.substr(2,2),16)+", "+parseInt(bw.substr(0,2),16)/256+")"},getFillStyle:function(){var bw=this.style.getFillStyle();return"rgba("+parseInt(bw.substr(6,2),16)+", "+parseInt(bw.substr(4,2),16)+", "+parseInt(bw.substr(2,2),16)+", "+parseInt(bw.substr(0,2),16)/256+")"},refreshStyle:function(){this._ctx.clearRect(0,0,this._ctx.canvas.width,this._ctx.canvas.height);switch(this.type){case"line":this.line(this.points);break;case"polygon":this.polygon(this.points);break;case"circle":this.circle(this.center,this.radius)}},setBoundingBox:function(bw){j.prototype.setBoundingBox.call(this,bw);this._ctx.canvas.width=this._bbox.maxX-this._bbox.minX+this._delta*2;this._ctx.canvas.height=this._bbox.maxY-this._bbox.minY+this._delta*2},_path:function(bC){var bz=this.buildPath(bC);var bD;var by=this._ctx;var bx=this._delta-this._bbox.minX;var bw=this._delta-this._bbox.minY;for(var bB=0;bB<bz.length;bB+=1){bD=bz[bB];by.beginPath();by.moveTo(bD[0]+bx,bD[1]+bw);for(var bA=2;bA<bD.length;bA+=2){by.lineTo(bD[bA]+bx,bD[bA+1]+bw)}this._ctx.stroke()}},line:function(bw){this.points=bw;if(aq(this._bbox)){this._ctx.lineWidth=this.style.getLineWidth();this._ctx.strokeStyle=this.getStrokeStyle();this._ctx.lineCap=this.lineCap;this._ctx.lineJoin=this.lineJoin;this._path(bw);this.div.show()}},_polygon:function(bA){var bB=this.buildPolygon(bA);var by=this._ctx;var bx=this._delta-this._bbox.minX;var bw=this._delta-this._bbox.minY;by.beginPath();by.moveTo(bB[0]+bx,bB[1]+bw);for(var bz=2;bz<bB.length;bz+=2){by.lineTo(bB[bz]+bx,bB[bz+1]+bw)}by.fill();by.closePath();if(this.style.getLineWidth()>0){by.stroke()}},polygon:function(bw){this.points=bw;if(aq(this._bbox)){this._ctx.strokeStyle=this.getStrokeStyle();this._ctx.fillStyle=this.getFillStyle();this._ctx.lineWidth=this.style.getLineWidth();this._polygon(bw);this.div.show()}},circle:function(bx,bw){this.center=bx;this.radius=bw;if(aq(this._bbox)){this._ctx.lineWidth=this.style.getLineWidth();this._ctx.strokeStyle=this.getStrokeStyle();this._ctx.fillStyle=this.getFillStyle();this._ctx.beginPath();this._ctx.arc(bx.x-this._bbox.minX+this._delta,bx.y-this._bbox.minY+this._delta,bw,0,Math.PI*2,true);this._ctx.fill();this._ctx.stroke();this.div.show()}},clean:function(){this.points=[];this.div.hide();delete this._bbox;this._ctx.clearRect(0,0,this._ctx.canvas.width,this._ctx.canvas.height)}});var s=N(j,{initialize:function(by,bx,bw){j.prototype.initialize.call(this,by,bx,bw)},getStrokeColor:function(){var bw=this.style.getStrokeStyle();return"#"+bw.substr(6,2)+bw.substr(4,2)+bw.substr(2,2)},getStrokeOpacity:function(){var bw=this.style.getStrokeStyle();return parseInt(bw.substr(0,2),16)/256},getFillColor:function(){var bw=this.style.getFillStyle();return"#"+bw.substr(6,2)+bw.substr(4,2)+bw.substr(2,2)},getFillOpacity:function(){var bw=this.style.getFillStyle();return parseInt(bw.substr(0,2),16)/256},refreshStyle:function(){if(aq(this.div[0].firstChild)){switch(this.type){case"line":this.div[0].firstChild.firstChild.setAttribute("stroke",this.getStrokeColor());this.div[0].firstChild.firstChild.setAttribute("stroke-opacity",this.getStrokeOpacity());this.div[0].firstChild.firstChild.setAttribute("stroke-width",this.style.getLineWidth());break;case"polygon":case"circle":this.div[0].firstChild.firstChild.setAttribute("stroke",this.getStrokeColor());this.div[0].firstChild.firstChild.setAttribute("stroke-opacity",this.getStrokeOpacity());this.div[0].firstChild.firstChild.setAttribute("stroke-width",this.style.getLineWidth());this.div[0].firstChild.firstChild.setAttribute("fill",this.getFillColor());this.div[0].firstChild.firstChild.setAttribute("fill-opacity",this.getFillOpacity());break}}},_init:function(){var bx=this._bbox.maxX-this._bbox.minX+this._delta*2;var bw=this._bbox.maxY-this._bbox.minY+this._delta*2;return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+bx+'" height="'+bw+'" viewBox="'+(this._bbox.minX-this._delta)+" "+(this._bbox.minY-this._delta)+" "+bx+" "+bw+'">'},_end:function(bw){bw+="</svg>";var by=new DOMParser();var bx=by.parseFromString(bw,"text/xml");this.svg=bx.childNodes[0];this.div.append(this.svg)},_path:function(bz){var bx='<path stroke-linejoin="'+this.lineJoin+'" stroke-linecap="'+this.lineCap+'" fill="none" d="';var bw=this.buildPath(bz);var bA;for(var by=0;by<bw.length;by+=1){bA=bw[by];bA.splice(0,0," M");bA.splice(3,0,"L");bx+=bA.join(" ")}bx+='"/>';return bx},_polygon:function(by){var bx=this.buildPolygon(by);var bw='<polygon  points="';bw+=bx.join(" ");bw+='"/>';return bw},line:function(bx){if(aq(this._bbox)){var bw=this._init();bw+=this._path(bx);this._end(bw);this.refreshStyle();this.div.show()}},polygon:function(bx){if(aq(this._bbox)){var bw=this._init();bw+=this._polygon(bx);this._end(bw);this.refreshStyle();this.div.show()}},_circle:function(bx,bw){var by='<circle cx="'+bx.x+'" cy="'+bx.y+'" r="'+bw+'" />';return by},circle:function(bx,bw){if(aq(this._bbox)){var by=this._init();by+=this._circle(bx,bw);this._end(by);this.refreshStyle();this.div.show()}}});var ag=N(j,{initialize:function(bx,bw){j.prototype.initialize.call(this,bx,0,bw)},getStrokeColor:function(){var bw=this.style.getStrokeStyle();return"#"+bw.substr(6,2)+bw.substr(4,2)+bw.substr(2,2)},getStrokeOpacity:function(){var bw=this.style.getStrokeStyle();return parseInt(bw.substr(0,2),16)/256},getFillColor:function(){var bw=this.style.getFillStyle();return"#"+bw.substr(6,2)+bw.substr(4,2)+bw.substr(2,2)},getFillOpacity:function(){var bw=this.style.getFillStyle();return parseInt(bw.substr(0,2),16)/256},refreshStyle:function(){var bz=this.div[0];bz.onselectstart=function(){if(event){event.returnValue=false}return false};var bw=bz.getElementsByTagName("shape");if(bw.length>0){bw[0].strokecolor=this.getStrokeColor();bw[0].fillcolor=this.getFillColor();bw[0].strokeweight=this.style.getLineWidth()+"px";if(this.style.getLineWidth()===0){bw[0].stroked="false"}}var by=bz.getElementsByTagName("stroke");if(by.length>0){by[0].opacity=this.getStrokeOpacity()}var bx=bz.getElementsByTagName("fill");if(bx.length>0){bx[0].opacity=this.getFillOpacity()}},_path:function(bC){var bx='<v:shape coordorigin="0 0" coordsize="1 1" filled="false" style="position: absolute;width:1px; height:1px;behavior: url(#default#VML);" path="';var bz=this.buildPath(bC);var bD;var by=this._delta-this._bbox.minX;var bw=this._delta-this._bbox.minY;for(var bB=0;bB<bz.length;bB+=1){bD=bz[bB];for(var bA=0;bA<bD.length;bA+=2){bD[bA]+=by;bD[bA+1]+=bw}bD[0]="M"+bD[0];bD[2]=" L"+bD[2];bx+=bD.join(" ")+" E "}bx+='"><v:stroke joinstyle="'+this.lineJoin+'" endcap = "'+this.lineCap+'"  style="behavior: url(#default#VML);"/></v:shape>';return bx},_poly:function(bA){var bx='<v:shape coordorigin="0 0" coordsize="1 1" filled="true" style="position: absolute;width:1px; height:1px;behavior: url(#default#VML);" path="';var bB=this.buildPolygon(bA);var by=this._delta-this._bbox.minX;var bw=this._delta-this._bbox.minY;for(var bz=0;bz<bB.length;bz+=2){bB[bz]+=by;bB[bz+1]+=bw}bB[0]="M"+bB[0];bB[2]=" L"+bB[2];bx+=bB.join(" ")+" X E ";bx+='">';if(this.style.getLineWidth()>0){bx+='<v:stroke joinstyle = "'+this.lineJoin+'" endcap = "'+this.lineCap+'"  style="behavior: url(#default#VML);"/>'}bx+='<v:fill style="behavior: url(#default#VML);"></v:fill></v:shape>';return bx},line:function(bx){if(aq(this._bbox)){var bw=this._path(bx);this.div[0].insertAdjacentHTML("beforeEnd",bw);this.refreshStyle();this.div.show()}},polygon:function(bx){if(aq(this._bbox)){var bw=this._poly(bx);this.div[0].insertAdjacentHTML("beforeEnd",bw);this.refreshStyle();this.div.show()}},circle:function(bx,bw){}});var aj=aN.api.map.Marker=N(ba,{EVENTS:["click","dblclick","mouseover","mouseout","dragstart","dragstop","drag","popupopened","popupclosed"],div:null,coordinates:null,location:null,icon:null,isOnMap:false,isHidden:false,isPopUpOpened:false,isInCluster:false,dragging:false,isOver:false,_tailStyle:null,_toolTip:null,initialize:function(by,bw,bx){ba.prototype.initialize.apply(this);this.coordinates=by;this._icon=bw||new M(aN.api.ui.Icon.DEFAULT);this._popUpOptions=bx||new aS({mappyDecoration:true});this._toolTipListeners=[]},setIcon:function(bw){this._icon=bw;if(this.isOnMap){this._createIcon(this.div.parent());this.setMarkerPosition()}},getIcon:function(){return this._icon},setPopUpOptions:function(bw){this._popUpOptions=bw},getPopUpOptions:function(){return this._popUpOptions},_createIcon:function(bw){if(aq(this.div)){this.div.remove()}this.div=this._icon.create();this.div.css("position","absolute");var bx=this;this.div.click(function(by){bx.trigger("click",by)});this.div.dblclick(function(by){bx.trigger("dblclick",by)});this.div.mouseenter(function(by){if(!bx.isOver){bx.isOver=true;bx.trigger("mouseover",by)}});this.div.mouseleave(function(by){bx.isOver=false;bx.trigger("mouseout",by)});bw.append(this.div)},_createToolTip:function(){if(aq(this.toolTip)){this.removeToolTip();var bw=new aw(this._controller.view.div,this.toolTip);this._toolTipListeners.push(this.addListener("mouseover",function(bx){bw.add(bx)}));this._toolTipListeners.push(this.addListener("mouseout",function(){bw.remove()}));this._toolTipInst=bw}},geocode:function(bz,bw){var by=new aN.api.geolocation.Geocoder();var bx=this;by.geocode(this.coordinates,function(bA){if(bA.length>0){var bB=bA[0].Placemark.Point.coordinates;bx.location=bA[0];bx.coordinates=new aN.api.geo.Coordinates(bB[0],bB[1]);bx.setPosition()}if(typeof bz==="function"){bz(bA)}},bw)},added:function(bx,bw){this._controller=bw;this._createIcon(bx);if(bw.map.isReady){this.setPosition()}this.isOnMap=true;this._createToolTip();if(this.isHidden){this.hide()}},removed:function(){if(this.isOnMap){this.isOnMap=false;this.removeToolTip();this.closePopUp();this.div.remove()}},setPosition:function(){this.pos=this._controller.converter.toGeolayerPixels(this.coordinates);this.setMarkerPosition()},setMarkerPosition:function(){this.div.css({left:this.pos.x-this._icon.iconAnchor.x,top:this.pos.y-this._icon.iconAnchor.y,"z-index":this.pos.y+10000});if(aq(this._popUp)){this._popUp.setPopUpPosition(this.pos)}},openPopUp:function(bx,bw){if(aq(this._popUp)){this._controller.popuplayer.removePopUp(this._popUp)}if(!aq(this.pos)){this.setPosition()}this._popUp=new T(bx,this);this._controller.popuplayer.addPopUp(this._popUp);this._popUp.setPopUpPosition(this.pos);this.isPopUpOpened=true;this.trigger("popupopened");if(bw!==false){return this._popUp.slideTo(this.pos)}else{return false}},closePopUp:function(){if(aq(this._popUp)){this._controller.popuplayer.removePopUp(this._popUp);this.isPopUpOpened=false;this.trigger("popupclosed")}},addToolTip:function(bw){this.toolTip=bw;if(this.isOnMap){this._createToolTip()}},removeToolTip:function(){if(aq(this._toolTipInst)){this._toolTipInst.remove()}for(var bw=0;bw<this._toolTipListeners.length;bw+=1){this.removeListener(this._toolTipListeners[bw])}this._toolTipListeners=[]},addDraggable:function(){var bx=this;var bw=false,bz,by;function by(){var bD=0;var bB=0;var bH=bx._controller.view.position();var bE=bx._controller.model.getSize();var bC=bx.div.position();var bA=bx._icon.iconAnchor;var bG=bC.left+bA.x+bH.left;if(bG<20){bD=5}else{if(bG>bE.width-20){bD=-5}}var bF=bC.top+bA.y+bH.top;if(bF<20){bB=5}else{if(bF>bE.height-20){bB=-5}}if(bD||bB){bw=true;bH.left+=bD;bH.top+=bB;bx._controller.view.setPosition(bH.left,bH.top);bC.left-=bD;bC.top-=bB;bx.div.hackModifyInit(bD,bB);bx.div.css(bC);bx._controller.refreshTiles()}}this.div.unbind("click");aV(this.div,{start:function(bA){bz=setInterval(by,10);bx.dragging=true;bx.trigger("dragstart",bA)},stop:function(bD){window.clearInterval(bz);bx.dragging=false;var bB=bx.div.position();var bC=bB.left+bx._icon.iconAnchor.x;var bA=bB.top+bx._icon.iconAnchor.y;bx.coordinates=bx._controller.converter.fromGeolayerPixels(bC,bA);if(bw){bx._controller.newStaticPosition()}bx.trigger("dragstop",bD)},drag:function(bD){var bB=bx.div.position();var bC=bB.left+bx._icon.iconAnchor.x;var bA=bB.top+bx._icon.iconAnchor.y;bx.coordinates=bx._controller.converter.fromGeolayerPixels(bC,bA);bx.setPosition();bx.trigger("drag",bD)}});this.div.click(function(bA){bx.trigger("click",bA)})},hide:function(){this.isHidden=true;if(aq(this.div)){this.div.hide();this.closePopUp()}},show:function(){this.isHidden=false;if(aq(this.div)){this.div.show()}},setTailStyle:function(bw){this._tailStyle=bw},destroyTail:function(){if(aq(this.tail)){this.tail.clean()}},drawTail:function(){this.destroyTail();if(aq(this.center)){if(this.center.x!==this.pos.x||this.center.y!==this.pos.y){this.center.round();this.pos.round();if(!this.tail){this.tail=ai(this.div.parent(),10,"line");var bx=this._tailStyle||new R({lineWidth:1,strokeStyle:"FF000000"});this.tail.setStyle(bx)}var bw=new H(this.center.x,this.center.y,this.center.x,this.center.y);bw.addPoint(this.pos);this.tail.setBoundingBox(bw);this.center.px=this.center.x;this.center.py=this.center.y;this.pos.px=this.pos.x;this.pos.py=this.pos.y;this.tail.line([this.center,this.pos])}delete this.center}}});var bd=N({isOnMap:false,isHidden:false,initialize:function(bw,bx){this.name=bw;this.zIndex=bx;this.div=l('<div name="'+bw+'" class="layer"></div>');this.div.css("z-index",bx);this.div.css("position","absolute")},added:function(bw){bw.view.geolayer.append(this.div);this._controller=bw;this.isOnMap=true},newDisplayArea:function(){},removed:function(){this.div.remove();this.isOnMap=false},hide:function(){this.div.hide();this.isHidden=true},show:function(){this.div.show();this.isHidden=false},clean:function(){this.div.empty()}});var ap=aN.api.map.layer.MarkerLayer=N(bd,{markers:null,clusters:null,markersCount:0,initialize:function(bw){bw=bw||50;bd.prototype.initialize.call(this,"markerLayer",bw);this.markers=[];this.clusters=[]},added:function(bw){bd.prototype.added.call(this,bw);this.div.mousedown(function(by){by.stopPropagation()});if(bn){this.div[0].addEventListener("touchstart",function(by){by.stopPropagation()})}this._map=bw.map;bw.map.addListener("zoomstart",a1(this._zoomStartHandler,this));bw.map.addListener("zoomend",a1(this._zoomEndHandler,this));for(var bx=0;bx<this.markersCount;bx+=1){if(this.markers[bx].isOnMap===false){this.markers[bx].added(this.div,bw)}}},newDisplayArea:function(){var bw;for(bw=0;bw<this.clusters.length;bw+=1){this.clusters[bw].removed()}this.clusters=[];for(bw=0;bw<this.markersCount;bw+=1){this.markers[bw].destroyTail();this.markers[bw].setPosition()}},addMarker:function(bw){if(this.isOnMap){bw.added(this.div,this._controller)}this.markers.push(bw);this.markersCount+=1},addMarkers:function(bx){for(var bw=0;bw<bx.length;bw+=1){this.addMarker(bx[bw])}},_zoomStartHandler:function(){this.div.hide()},_zoomEndHandler:function(){if(this.isHidden===false){this.div.show()}},removeMarker:function(bw){var bx=l.inArray(bw,this.markers);if(bx!==-1){this.markers.splice(bx,1);this.markersCount-=1;bw.removed();return true}else{return false}},getMarkers:function(){return this.markers},closeAllPopup:function(){var by=this.markers;for(var bx=0,bw=this.markersCount;bx<bw;bx+=1){by[bx].closePopUp()}},clean:function(){while(this.markersCount>0){this.removeMarker(this.markers[0])}bd.prototype.clean.call(this)},getBounds:function(){if(this.markersCount>0){var bw=new aA();var by=this.markers;for(var bx=0;bx<this.markersCount;bx+=1){bw.extend(by[bx].coordinates)}bw.refreshCenter();return bw}},conglomerate:function(bx,bw){bx=bx||new aN.api.ui.Icon({cssClass:"default-cluster",image:G+"img/poi/anis_cluster.png",size:new aN.api.types.Size(34,34),iconAnchor:new aN.api.types.Point(17,17),popUpAnchor:new aN.api.types.Point(17,0)});this.clusters=k(this.markers,bx,this.div,this._map,bw)},explode:function(){a0(this.markers)},grid:function(){aP(this.markers,this._map)},reset:function(){this.newDisplayArea()}});var bo=aN.api.map.layer.TrafficLayer=N(ap,{_types:{"10306":{name:"roadwork",label:"Travaux",icon:new aN.api.ui.Icon({cssClass:"evt_marker",iconAnchor:new aN.api.types.Point(18,18),label:'<div class="evt_marker evt_picto_10306"></div>',popUpAnchor:new aN.api.types.Point(18,0),size:new aN.api.types.Size(36,36)}),is_visible:true,markers:[]},"10305":{name:"accident",label:"Accident",icon:new aN.api.ui.Icon({cssClass:"evt_marker",iconAnchor:new aN.api.types.Point(18,18),label:'<div class="evt_marker evt_picto_10305 "></div>',popUpAnchor:new aN.api.types.Point(18,0),size:new aN.api.types.Size(36,36)}),is_visible:true,markers:[]},"10304":{name:"bad_weather",label:"Intemp&eacute;ries",icon:new aN.api.ui.Icon({cssClass:"evt_marker",iconAnchor:new aN.api.types.Point(18,18),label:'<div class="evt_marker evt_picto_10304 "></div>',popUpAnchor:new aN.api.types.Point(18,0),size:new aN.api.types.Size(36,36)}),is_visible:true,markers:[]}},_zoomLevel:0,_slabs:null,initialize:function(bz,bx){ap.prototype.initialize.call(this,bz,"trafficLayer");var bw,by;for(sid in this._types){if(bx){bw=this._types[sid].name;if(aq(bx[bw])){if(bx[bw].icon){this._types[sid].icon=bx[bw].icon}this._types[sid].is_visible=bx[bw].is_visible||false}}this._types[sid].markers=[]}},added:function(bw){ap.prototype.added.call(this,bw);var bx=this;this._map.addListener("refreshdescr",function(){bx.refresh()})},refresh:function(){var bz=this._map.controller.mapdescr._traEvents;var bw=this._map.getZoomLevel();this.clean();for(sid in this._types){this._types[sid].markers=[];this._types[sid].added=false}this._zoomLevel=bw;for(var by=0;by<bz.length;by++){var bx=this.create_marker(bz[by]);if(bx!=null){this._types[bx.picto].markers.push(bx);if(this._types[bx.picto].is_visible==true){this._types[bx.picto].added=true;this.addMarker(bx);bx.show()}}}},toggleEvent:function(bx){var bw=this.get_sid(bx);if(aq(this._types[bw])){if(this._types[bw].is_visible){this.hideEvent(bx)}else{this.showEvent(bx)}}},showEvent:function(by){var bx=this.get_type(by);if(bx){bx.is_visible=true;for(var bw=0;bw<bx.markers.length;bw++){if(!bx.added){this.addMarker(bx.markers[bw])}bx.markers[bw].show()}}},hideEvent:function(by){var bx=this.get_type(by);if(bx&&bx.added){bx.is_visible=false;for(var bw=0;bw<bx.markers.length;bw++){bx.markers[bw].hide()}}},create_marker:function(bF){if(aq(bF.picto)){var bw=bF.picto["picto-id"];if(aq(this._types[bw])){var bD=aq(this._types[bw]["icon"])&&this._types[bw]["icon"]||null;if(bD==null){bD=new aN.api.ui.Icon(aN.api.ui.Icon.DEFAULT)}var bE=0,bB=0;var bC=bF.region.p;for(var bx=0;bx<bC.length;bx++){bE+=parseFloat(bC[bx].x);bB+=parseFloat(bC[bx].y)}var bA=new aN.api.geo.Coordinates((bE/bC.length),(bB/bC.length));var by=new aN.api.map.Marker(bA,bD);by.picto=bw;by.toolType=new aw(this._map.controller.view.div,this._types[bw]["label"]);var bz=this;by.addListener("mouseover",function(bJ){var bG,bI,bH;for(bG in bz._types){bI=bz._types[bG];for(bH=0;bH<bI.markers.length;bH++){if(bI.markers[bH]!=by){bI.markers[bH].toolType.remove()}}}by.toolType.add(bJ)});by.addListener("mouseout",function(){by.toolType.remove()});return by}}return null},get_type:function(bw){for(sid in this._types){if(this._types[sid].name==bw){return this._types[sid]}}return null},get_sid:function(bw){for(sid in this._types){if(this._types[sid].name==bw){return sid}}return null},get_markers:function(bx){var bz=[];if(aq(bx)){var by=this.get_type(bx);if(by!=null){bz=by.markers}}else{var bw;for(bw in this._types){bz.push(this._types[bw].markers)}}return bz},is_visible:function(bw){var bx=this.get_type(bw);if(bx!=null){return bx.is_visible}return false}});function bu(bw,by){for(var bx=0;bx<by.length;bx++){if(by[bx]==bw){return true}}return false}var aa=N(bd,{_popUps:null,initialize:function(bw){bd.prototype.initialize.call(this,"popUpLayer",bw);this._popUps=[]},added:function(bw){bd.prototype.added.call(this,bw);this.div.mousedown(function(bx){bx.stopPropagation()});this.div.dblclick(function(bx){bx.stopPropagation()});this.div.mousewheel(function(bx){bx.stopPropagation()});if(bn){this.div[0].addEventListener("touchstart",function(bx){bx.stopPropagation()})}bw.map.addListener("zoomstart",a1(this._zoomStartHandler,this));bw.map.addListener("zoomend",a1(this._zoomEndHandler,this))},_zoomStartHandler:function(){this.hide()},_zoomEndHandler:function(){this.show()},addPopUp:function(bw){bw.added(this._controller);this._popUps.push(bw)},removePopUp:function(bw){var bx=l.inArray(bw,this._popUps);if(bx!==-1){bw.removed();this._popUps.slice(bx,1)}}});var C=aN.api.map.layer.ShapeLayer=N(bd,{_shapes:null,_movedFromLastRefresh:null,initialize:function(bw){bw=bw||50;bd.prototype.initialize.call(this,"shapeLayer",bw);this._shapes=[];this._movedFromLastRefresh=new aN.api.types.Point(0,0)},added:function(bx){bd.prototype.added.call(this,bx);bx.map.addListener("zoomstart",a1(this._zoomStartHandler,this));bx.map.addListener("zoomend",a1(this._zoomEndHandler,this));bx.map.addListener("changeend",a1(this._redrawShapes,this));var bz=this;var bw=null;var bA=bx.map;bA.addListener("dragstart",function(bB){bw=bB});bA.addListener("drag",function(bB){if(bw!==null){bz._movedFromLastRefresh.x+=bw.pageX-bB.pageX;bz._movedFromLastRefresh.y+=bw.pageY-bB.pageY;if(Math.abs(bz._movedFromLastRefresh.x)>500||Math.abs(bz._movedFromLastRefresh.y)>500){bz._redrawShapes()}bw=bB}});bA.addListener("mousemove",function(bE){var bB=bz._shapes;if(bA.dragging===false){for(var bD=0;bD<bB.length;bD+=1){var bC=bB[bD];if(bC.hasListeners){if(bC.isOver){if(bC.isInShape(bE)===false){bC.isOver=false;bC.trigger("mouseout",bE)}}else{if(bC.isInShape(bE)){bC.isOver=true;bC.trigger("mouseover",bE)}}}}}});bA.addListener("mouseout",function(bC){for(var bB=0;bB<bz._shapes.length;bB+=1){if(bz._shapes[bB].isOver){bz._shapes[bB].isOver=false;bz._shapes[bB].trigger("mouseout",bC)}}});bA.addListener("click",function(bC){for(var bB=0;bB<bz._shapes.length;bB+=1){if(bz._shapes[bB].isInShape(bC)){bz._shapes[bB].trigger("click",bC)}}});bA.addListener("mousedown",function(bC){for(var bB=0;bB<bz._shapes.length;bB+=1){if(bz._shapes[bB].isInShape(bC)){bz._shapes[bB].trigger("mousedown",bC)}}bC.preventDefault()});bA.addListener("mouseup",function(bC){for(var bB=0;bB<bz._shapes.length;bB+=1){if(bz._shapes[bB].isInShape(bC)){bz._shapes[bB].trigger("mouseup",bC)}}});for(var by=0;by<this._shapes.length;by+=1){if(this._shapes[by].isOnMap===false){this._shapes[by].added(this.div,this._controller)}}if(bx.map.isReady){this.newDisplayArea()}},newDisplayArea:function(){for(var bw=0;bw<this._shapes.length;bw+=1){this._shapes[bw].calcPoints()}this._redrawShapes()},_zoomStartHandler:function(){this.div.hide()},_zoomEndHandler:function(){if(this.isHidden===false){this.div.show()}},_calcViewBox:function(){var by=this._controller.model.getSize();var bx=this._controller.converter;var bz=bx.fromPixels(by.width+500,-500);var bw=bx.fromPixels(-500,by.height+500);if(bz._x>1||bz._y<0||bw._x>1||bw._y<0||bz._x<bw._x){bz=new P(180,90);bw=new P(-180,-90)}this.viewBox=new aA(bz,bw)},_redrawShapes:function(bx){if(bx!=="drag"){this._calcViewBox();for(var bw=0;bw<this._shapes.length;bw+=1){this._shapes[bw].draw(this.viewBox)}this._movedFromLastRefresh=new aN.api.types.Point(0,0)}},addShape:function(bw){if(this.isOnMap){bw.added(this.div,this._controller);if(this._controller.map.isReady){bw.calcPoints();bw.draw(this.viewBox)}}this._shapes.push(bw)},removeShape:function(bw){var bx=l.inArray(bw,this._shapes);if(bx!==-1){this._shapes[bx].removed();this._shapes.splice(bx,1);return true}else{return false}},clean:function(){while(this._shapes.length>0){this.removeShape(this._shapes[0])}bd.prototype.clean.call(this)},getBounds:function(){if(this._shapes.length>0){var bx=new aA();for(var by=0;by<this._shapes.length;by+=1){var bw=this._shapes[by].getBounds();if(aq(bw)){bx.extend(bw.sw);bx.extend(bw.ne)}}bx.refreshCenter();return bx}},getShapes:function(){return this._shapes}});var O=aN.api.map.layer.DirectionLayer=N(C,ba,{EVENTS:["newroadbook","routedragged","dragerror"],maxSteps:null,handlerMarker:null,_movedFromLastRefresh:null,initialize:function(bw){C.prototype.initialize.call(this,bw);ba.prototype.initialize.apply(this);this.routeService=new ac();this.maxSteps=100},setRoadbook:function(bw){this.clean();this.roadbook=bw;if(this.isOnMap){var bx;for(bx=0;bx<bw.shapes.length;bx+=1){this.addShape(bw.shapes[bx])}var bA=new M({image:G+"img/poi/poi-route-start_png8.png",size:new am(37,37),iconAnchor:new am(18,18)});var bD=new M({image:G+"img/poi/poi-route-waypoint_png8.png",size:new am(25,25),iconAnchor:new am(12,12)});var bE=new M({image:G+"img/poi/poi-route-end_png8.png",size:new am(37,37),iconAnchor:new am(18,18)});var by,bB,bC;for(bx=0;bx<bw.wayPoints.length;bx+=1){bB=bw.wayPoints[bx].Placemark.Point.coordinates;if(bx===0){bC=bA}else{if(bx===bw.wayPoints.length-1){bC=bE}else{bC=bD}}by=new aj(new P(bB[0],bB[1]),bC);by.added(this.div,this._controller);by.addDraggable();var bz=this;this.geocodingEnable=false;by.addListener("dragstop",(function(bG,bF){return function(){bz.geocodingEnable=false;bF.geocode(function(bI){var bL=[];for(var bK=0;bK<bw.wayPoints.length;bK+=1){bL.push(bw.wayPoints[bK])}bL[bG]=bI[0];var bJ=bz.routeService;var bH=l.extend(true,{},bw.options);bH.route=bH.route||{};bH.route.optim=0;bJ.loadRoute(bL,bH,function(bM){bz.setRoadbook(bM)},function(bM){bz.trigger("dragerror")})});bz.trigger("routedragged")}}(bx,by)));bw.wayPoints[bx].marker=by}}if(bw.wayPoints.length<this.maxSteps+2){this.hideMarker=false}this.trigger("newroadbook",bw)},sendFastRouteRequest:function(bz){var bx=this.roadbook.options;var bB;if(bx.multiModal===true){bB=new A()}else{bB=new aL()}var bw=[];for(var by=0;by<bz.length;by+=1){if(aq(bz[by].getRidInfo)){bw.push(bz[by].getRidInfo())}else{bw.push(bz[by])}}bB.configure(bw,bx);var bA=this;ad(bB,function(bH){if(bA.geocodingEnable){try{var bG=[];var bE=bH.xml.route.ids.rid;var bF;for(var bD=0;bD<bE.length;bD+=1){bF=bE[bD];bG.push(new P(bF.x1,bF.y1))}bG.push(new P(bF.x2,bF.y2));while(bA._shapes.length>0){bA.removeShape(bA._shapes[0])}var bC=new Z(bG);bA.addShape(bC)}catch(bI){}}})},added:function(bB){bd.prototype.added.call(this,bB);var bw=bB.map;bw.addListener("zoomstart",a1(this.hide,this));bw.addListener("zoomend",a1(this.show,this));bw.addListener("changeend",a1(this._redrawShapes,this));var by=null;var bC=this;bw.addListener("dragstart",function(bG){by=bG});bw.addListener("drag",function(bG){if(by!==null){bC._movedFromLastRefresh.x+=by.pageX-bG.pageX;bC._movedFromLastRefresh.y+=by.pageY-bG.pageY;if(Math.abs(bC._movedFromLastRefresh.x)>500||Math.abs(bC._movedFromLastRefresh.y)>500){bC._redrawShapes()}by=bG}});var bF=new M({image:G+"img/poi/poi-route-waypoint_png8.png",size:new am(25,25),iconAnchor:new am(12,12)});var bA=this._viaMarker=new aj(new P(0,0),bF);this.handlerMarker=bA;bA.added(this.div,bB);bA.addDraggable();bA.hide();this.hideMarker=true;var bE;var bD;var bx;bA.addListener("dragstart",function(){bC.geocodingEnable=true;bD=bE});bA.addListener("dragstop",function(){bC.geocodingEnable=false;bA.hide();bC.hideMarker=true;bA.geocode(function(bH){var bK=[];for(var bJ=0;bJ<bC.roadbook.wayPoints.length;bJ+=1){bK.push(bC.roadbook.wayPoints[bJ]);if(bJ===bD){bK.push(bH[0])}}var bI=bC.routeService;var bG=l.extend(true,{},bC.roadbook.options);bG.route=bG.route||{};bG.route.optim=0;bI.loadRoute(bK,bG,function(bL){bC.setRoadbook(bL)},function(bL){bC.trigger("dragerror")})});bC.trigger("routedragged")});bw.addListener("mousemove",function(bK){if(bA.dragging===false&&bw.dragging===false&&bC.hideMarker===false&&!bC.roadbook.options.multiModal&&aq(bC.roadbook)){var bI;var bH=bC.roadbook.wayPoints;for(bI=0;bI<bH.length;bI+=1){if(bH[bI].marker.dragging){return}}var bM;var bL=1000000;var bG=bC._shapes;for(bI=0;bI<bG.length;bI+=1){var bJ=bG[bI].getDistance(bK);if(aq(bJ)){if(bJ.distance<bL){bE=bI;bL=bJ.distance;bM=bJ.position}}}if(aq(bM)){bA.pos=bM;bA.setMarkerPosition();bA.div.css({"z-index":1});bA.show()}else{bA.hide()}}});for(var bz=0;bz<this._shapes.length;bz+=1){if(this._shapes[bz].isOnMap===false){this._shapes[bz].added(this.div,this._map)}}if(bw.isReady){this.newDisplayArea();this._redrawShapes()}if(aq(this.roadbook)){this.setRoadbook(this.roadbook)}},newDisplayArea:function(){this._viaMarker.hide();C.prototype.newDisplayArea.call(this);if(aq(this.roadbook)){var bx=this.roadbook.wayPoints;for(var bw=0;bw<bx.length;bw+=1){bx[bw].marker.setPosition()}}},clean:function(){while(this._shapes.length>0){this.removeShape(this._shapes[0])}if(aq(this.roadbook)){var bx=this.roadbook.wayPoints;for(var bw=0;bw<bx.length;bw+=1){bx[bw].marker.removed()}}}});var R=aN.api.map.shape.ShapeStyle=N({initialize:function(bw){bw=bw||{};this.setLineWidth(aq(bw.lineWidth)?bw.lineWidth:5);this.setStrokeStyle(bw.strokeStyle||"7FFF0000");this.setFillStyle(bw.fillStyle||"7F0000FF")},setLineWidth:function(bw){this._lineWidth=bw},setStrokeStyle:function(bw){this._strokeStyle=bw},setFillStyle:function(bw){this._fillStyle=bw},getLineWidth:function(){return this._lineWidth},getStrokeStyle:function(){return this._strokeStyle},getFillStyle:function(){return this._fillStyle},clone:function(){return new R({lineWidth:this._lineWidth,strokeStyle:this._strokeStyle,fillStyle:this._fillStyle})}});var a2=N(ba,{EVENTS:["click","mouseover","mouseout","mousedown","mouseup"],isOnMap:false,isOver:false,initialize:function(bB,bA,bz){ba.prototype.initialize.apply(this);this.type=bz;this._style=bA;this._coords=bB;var bx;var bw=bB.length;if(bw>0){bx=new aA();var bC;for(var by=0;by<bw;by+=1){bC=bB[by];bx.extend(bC)}bx.refreshCenter()}this.boundingBox=bx},added:function(bx,bw){this._controller=bw;this._drawer=ai(bx,10,this.type);this._drawer.setStyle(this._style);this.isOnMap=true},calcPoints:function(){var bB=this._coords;var bz=[];var by=this._controller.converter;for(var bx=0,bw=bB.length;bx<bw;bx+=1){bz.push(by.toGeolayerPixels(bB[bx]))}if(bz.length>2){var bA=[];bA.push(bz[0]);var bC;for(var bx=2;bx<bz.length;bx+=1){bC=Math.abs((bz[bx-1].x-bz[bx].x)*(bz[bx-1].y-bA[bA.length-1].y)-(bz[bx-1].y-bz[bx].y)*(bz[bx-1].x-bA[bA.length-1].x));if(bC>=1){bA.push(bz[bx-1])}}bA.push(bz[bx-1]);this.points=bA}else{this.points=bz}},draw:function(bB){this.clean();var by=this._controller.converter;var bx=bB.intersect(this.boundingBox);if(aq(bx)){var bz=by.toGeolayerPixels(bx.ne);var bw=by.toGeolayerPixels(bx.sw);var bA=new H(bw.x,bz.y,bz.x,bw.y);this._drawer.setBoundingBox(bA)}},getCoordinates:function(){return this._coords},setStyle:function(bw){this._style=bw;if(this.isOnMap){this._drawer.setStyle(bw);this._drawer.refreshStyle()}},getStyle:function(){return this._style},clean:function(){this._drawer.clean()},removed:function(){this._drawer.removed();this.isOnMap=false},isInShape:function(){return false},getBounds:function(){return this.boundingBox}});var Z=aN.api.map.shape.Line=N(a2,{initialize:function(bx,bw){a2.prototype.initialize.call(this,bx,bw,"line")},draw:function(bw){a2.prototype.draw.call(this,bw);this._drawer.line(this.points)},isInShape:function(bK){var bB=this._drawer.div.offset();var by=this._drawer.div.position();var bC=[bK.pageX-bB.left+by.left,bK.pageY-bB.top+by.top];var bw=this._drawer.getStyle().getLineWidth();var bF=(bw/2)*(bw/2);var bP,bN,bA,bz,bD,bJ,bI,bx,bH,bG,bE,bO;var bM=this.points;for(var bL=1;bL<bM.length;bL+=1){bP=bM[bL].x-bM[bL-1].x;bN=bM[bL].y-bM[bL-1].y;bA=bC[0]-bM[bL-1].x;bz=bC[1]-bM[bL-1].y;bD=(bP*bP)+(bN*bN);bJ=bP*bA+bN*bz;bI=bJ/bD;if(bI<0){bI=0;bx=0}else{if(bI>1){bI=1;bx=bD}else{bx=(bJ*bJ)/bD}}bH=bI*bP;bG=bI*bN;bE=[bH-bA,bG-bz];bO=(bE[0]*bE[0])+(bE[1]*bE[1]);if(bO<=bF){return true}}return false},getDistance:function(bK){var bA=this._drawer.div.offset();var bx=this._drawer.div.position();var bF=bK.pageX-bA.left+bx.left;var bC=bK.pageY-bA.top+bx.top;var bO,bN,bz,by,bD,bJ,bI,bw,bH,bG,bE,bP;var bQ;var bB=1000;var bM=this.points;for(var bL=1;bL<bM.length;bL+=1){bO=bM[bL].x-bM[bL-1].x;bN=bM[bL].y-bM[bL-1].y;bz=bF-bM[bL-1].x;by=bC-bM[bL-1].y;bD=(bO*bO)+(bN*bN);bJ=bO*bz+bN*by;bI=bJ/bD;if(bI<0){bI=0;bw=0}else{if(bI>1){bI=1;bw=bD}else{bw=(bJ*bJ)/bD}}bH=bI*bO;bG=bI*bN;bE=[bH-bz,bG-by];bP=(bE[0]*bE[0])+(bE[1]*bE[1]);if(bP<=bB){bB=bP;bQ={position:new am(bH+bM[bL-1].x,bG+bM[bL-1].y),distance:bP}}}return bQ}});var aM=aN.api.map.shape.Polygon=N(a2,{initialize:function(bx,bw){a2.prototype.initialize.call(this,bx,bw,"polygon")},draw:function(bw){a2.prototype.draw.call(this,bw);this._drawer.polygon(this.points)},isInShape:function(bw){var by=this._drawer.div.offset();var bB=this._drawer.div.position();var bC=[bw.pageX-by.left+bB.left,bw.pageY-by.top+bB.top];var bE=this.points;var bx=bE.length;var bA,bz=bx-1;var bD=false;for(bA=0;bA<bx;bA+=1){if(bE[bA].y<bC[1]&&bE[bz].y>=bC[1]||bE[bz].y<bC[1]&&bE[bA].y>=bC[1]){if(bE[bA].x+(bC[1]-bE[bA].y)/(bE[bz].y-bE[bA].y)*(bE[bz].x-bE[bA].x)<bC[0]){bD=!bD}}bz=bA}return bD}});var aD=aN.api.map.shape.Circle=N(aM,{initialize:function(bw,bD,by){var bz=6378137;var bx=6356752.314;var bH=bz*bz;var bA=bx*bx;var bG=100;function bC(bO,bK,bI){var bJ=bI/bz;var bL=Math.tan(bO.y*Math.PI/180);bL=bL*bL;var bN=(bK*Math.sqrt(bH+(bA*bL)))/bH;var bM=new P(bO.x+bN*180/Math.PI,bO.y+bJ*180/Math.PI);return bM}var bF=[];for(var bB=0;bB<bG;bB+=1){var bE=bC(bw,bD*Math.cos(2*Math.PI*bB/bG),bD*Math.sin(2*Math.PI*bB/bG));bF.push(bE)}aM.prototype.initialize.call(this,bF,by)}});var be=aN.api.map.shape.GPolyline=N(Z,{initialize:function(bw,bx){var by=av(bw);Z.prototype.initialize.call(this,by,bx)}});function av(bx){var bz=bx.length;var by=0;var bB=[];var bD=0;var bE=0;while(by<bz){var bF;var bw=0;var bG=0;do{bF=bx.charCodeAt(by++)-63;bG|=(bF&31)<<bw;bw+=5}while(bF>=32);var bA=((bG&1)?~(bG>>1):(bG>>1));bD+=bA;bw=0;bG=0;do{bF=bx.charCodeAt(by++)-63;bG|=(bF&31)<<bw;bw+=5}while(bF>=32);var bC=((bG&1)?~(bG>>1):(bG>>1));bE+=bC;bB.push(new P(bE*0.00001,bD*0.00001))}return bB}var m=N({initialize:function(bw){this._url=bw.Icon.href;this._coords={nw:{x:parseFloat(bw.LatLonBox.west),y:parseFloat(bw.LatLonBox.north)},se:{x:parseFloat(bw.LatLonBox.east),y:parseFloat(bw.LatLonBox.south)}}},configure:function(bw,bx){this._map=bx;this._map.addListener(this);this.container=bw;this.img=l("<img style='position:absolute;' src='"+this._url+"'></img>");this.container.append(this.img);if(this._map.isReady()){this.calcPosition(this._map.getZoomLevel());this.setPosition()}},draw:function(){this.setPosition()},setPosition:function(){this.img.css("left",this.points.nw[0]);this.img.css("top",this.points.nw[1]);this.img.css("width",this.points.se[0]-this.points.nw[0]);this.img.css("height",this.points.se[1]-this.points.nw[1])},calcPosition:function(bw){this.points={};this.zoomLevel=bw;this.points.nw=this._map.getDraggableLayersContainer().getMapLayer().getPosition(this._map.getDraggableLayersContainer().getMapLayer().getTileInfoFromCoordinates(this._coords.nw,this.zoomLevel));this.points.se=this._map.getDraggableLayersContainer().getMapLayer().getPosition(this._map.getDraggableLayersContainer().getMapLayer().getTileInfoFromCoordinates(this._coords.se,this.zoomLevel))},onMapBuildBegin:function(bx){var bw=this._map.getZoomLevel();if(this.zoomLevel!==bw){this.calcPosition(bw);this.setPosition()}}});var aC=N(Z,{initialize:function(by,bw,bC){this.Placemark=bC;var bD=by.coordinates;bD=bD.split(/\s+/);var bE=[];var bz;for(var bA=0,bx=bD.length;bA<bx;bA+=1){bz=bD[bA].split(",");if(bz.length===2||bz.length===3){bE.push(new P(bz[0],bz[1]))}}bw=bw||{};bw.LineStyle=bw.LineStyle||{};var bB=new R({lineWidth:bw.LineStyle.width,strokeStyle:bw.LineStyle.color});Z.prototype.initialize.call(this,bE,bB)}});var B=N(aM,{initialize:function(bD,bw,bB){this.Placemark=bB;var bC=bD.outerBoundaryIs.LinearRing.coordinates;bC=bC.split(/\s+/);var bE=[];var by;for(var bz=0,bx=bC.length;bz<bx;bz+=1){by=bC[bz].split(",");if(by.length===2||by.length===3){bE.push(new P(by[0],by[1]))}}bw=bw||{};bw.LineStyle=bw.LineStyle||{};bw.PolyStyle=bw.PolyStyle||{};var bA=new R({lineWidth:bw.LineStyle.width,strokeStyle:bw.LineStyle.color,fillStyle:bw.PolyStyle.color});aM.prototype.initialize.call(this,bE,bA)}});var aX=aN.api.map.shape.kml.KmlReader=N({initialize:function(){},getShapes:function(bx,bA){if(bA!==true){this.shapes=[];this.styles={}}var bw;for(bw in bx){if(bx.hasOwnProperty(bw)){if(bw==="Style"){this._computeStyle(bx[bw])}}}for(bw in bx){if(bx.hasOwnProperty(bw)){if(bw==="Document"||bw==="Folder"){var bz=l.makeArray(bx[bw]);for(var by=0;by<bz.length;by+=1){this.getShapes(bz[by],true)}}if(bw==="GroundOverlay"){this._computeGroundOverlay(bx[bw])}if(bw==="Placemark"){this._computePlacemark(bx[bw])}}}if(bA!==true){return this.shapes}},_computeStyle:function(bz){var by=l.makeArray(bz);var bw;for(var bx=0;bx<by.length;bx+=1){if(aq(by[bx].id)){this.styles[by[bx].id]=by[bx]}else{if(aq(by[bx]["@attributes"])&&aq(by[bx]["@attributes"].id)){this.styles[by[bx]["@attributes"].id]=by[bx]}}bw=by[bx]}return bw},_computeGroundOverlay:function(bx){var by=l.makeArray(bx);for(var bw=0;bw<by.length;bw+=1){this.shapes.push(new m(by[bw]))}},_computePlacemark:function(bB){var bz,by;var bx=l.makeArray(bB);var bA;for(bz=0;bz<bx.length;bz+=1){if(aq(bx[bz].Style)){bA=this._computeStyle(bx[bz].Style)}if(aq(bx[bz].styleUrl)){bA=bx[bz].styleUrl.substring(1);bA=this.styles[bA]}if(aq(bx[bz].Polygon)){this.shapes.push(new B(bx[bz].Polygon,bA,bx[bz]))}if(aq(bx[bz].LineString)){this.shapes.push(new aC(bx[bz].LineString,bA,bx[bz]))}if(aq(bx[bz].MultiGeometry)){if(aq(bx[bz].MultiGeometry.LineString)){var bC=l.makeArray(bx[bz].MultiGeometry.LineString);for(by=0;by<bC.length;by+=1){this.shapes.push(new aC(bC[by],bA,bx[bz]))}}if(aq(bx[bz].MultiGeometry.Polygon)){var bw=l.makeArray(bx[bz].MultiGeometry.Polygon);for(by=0;by<bw.length;by+=1){this.shapes.push(new B(bw[by],bA,bx[bz]))}}}}}});var h=aN.api.map.tools.ToolPosition=N({POSSIBLE_ANCHORS:["lt","rt","lb","rb"],DEFAULT_ANCHOR:"rb",DEFAULT_OFFSET:new am(0,0),initialize:function(bw,bx){if(aq(bw)&&l.inArray(bw,this.POSSIBLE_ANCHORS)!==-1){this.anchor=bw}else{this.anchor=this.DEFAULT_ANCHOR}if(aq(bx)){this.offset=bx}else{this.offset=this.DEFAULT_OFFSET.clone()}},clone:function(){return new h(this.anchor,this.offset.clone())}});var z=aN.api.map.tools.Tool=N({isOnMap:false,POSSIBLE_DIRECTIONS:["vertical","horizontal","none"],DEFAULT_DIRECTION:"horizontal",DEFAULT_POSITION:new h(),div:null,direction:null,position:null,initialize:function(bw,bx){this.setPosition(bw);this.setDirection(bx)},added:function(bw){bw.controller.view.div.append(this.div);this.div.css({position:"absolute","z-index":999});this._map=bw;this.isOnMap=true},removed:function(){this.div.remove();this.isOnMap=false},setPosition:function(bw){if(aq(bw)){this.position=bw}else{this.position=this.DEFAULT_POSITION.clone()}},setDirection:function(bw){if(aq(bw)&&l.inArray(bw,this.POSSIBLE_DIRECTIONS)!==-1){this.direction=bw}else{this.direction=this.DEFAULT_DIRECTION}},refreshPosition:function(){var bw;var bx=this._map.miniMap;if(aq(bx)&&bx.position.anchor===this.position.anchor&&this.direction!=="none"){if(this.direction==="horizontal"){bw=new am(bx.position.offset.x,0)}else{bw=new am(0,bx.position.offset.y)}}else{bw=new am(0,0)}switch(this.position.anchor){case"lt":this.div.css({left:this.position.offset.x+bw.x,top:this.position.offset.y+bw.y});break;case"rt":this.div.css({right:this.position.offset.x+bw.x,top:this.position.offset.y+bw.y});break;case"lb":this.div.css({left:this.position.offset.x+bw.x,bottom:this.position.offset.y+bw.y});break;case"rb":this.div.css({right:this.position.offset.x+bw.x,bottom:this.position.offset.y+bw.y});break}}});var x=N(z,{DEFAULT_DIRECTION:"horizontal",TEMPLATE:'<a class="copyright" href="javascript:void(0);"></a>',initialize:function(){z.prototype.initialize.call(this)},added:function(bw){this.div=l(this.TEMPLATE);this.div.click(function(){window.open("http://api-pro.mappy.com/copyright.html","Copyright")});z.prototype.added.call(this,bw)},setText:function(bx){var by=[];for(var bw in bx){if(bx.hasOwnProperty(bw)){if(bw!=="Mappy"){by.push(bw)}}}if(by.length>0){this.div.html("&copy; Mappy - "+by.join(", "))}else{this.div.empty()}}});var af=aN.api.map.tools.MiniMap=N(z,{ZOOM_DELTA:3,TEMPLATE:'<div class="minimap"><div class="minimap-content"><div style="position:absolute;left:0;top:0;" class="minimap-layer"></div><div class="minimap-rectangle"></div></div><div class="minimap-close"></div></div>',TEMPLATE_IE6:'<div class="minimap minimap-ie6"><div class="minimap-bg-ie6" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=\''+G+'/img/tools/border_minimap.png\');"></div><div class="minimap-content"><div style="position:absolute;left:0;top:0;" class="minimap-layer"></div><div class="minimap-rectangle"></div></div><div class="minimap-close"><div class="minimap-close-ie6" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=\''+G+"/img/tools/border_minimap.png');\"></div></div></div>",_tiles:[],_mapListeners:[],shift:null,initialize:function(bw){z.prototype.initialize.call(this,bw);this.model=new S()},added:function(by){if(bi){this.div=l(this.TEMPLATE_IE6)}else{this.div=l(this.TEMPLATE)}z.prototype.added.call(this,by);this.model.setSize(120,120);var bz=this.div.find(".minimap-close");var bw=this;bz.click(function(){by.removeTool(bw)});var bx=new aO(132,132);this.div.width(bx.width);this.div.height(bx.height);this._addRectangle();this._mapListeners.push(by.addListener("resize",a1(this._resizeHandler,this)));this._mapListeners.push(by.addListener("dragstart",a1(this._dragStartHandler,this)));this._mapListeners.push(by.addListener("drag",a1(this._dragHandler,this)));this._mapListeners.push(by.addListener("changeend",a1(this._newDisplayArea,this)));this.tilelayer=this.div.find(".minimap-layer");if(by.isReady){this._newDisplayArea()}this.position.offset=new am(bx.width,bx.height);this.refreshPosition()},refreshPosition:function(){var bw=this.div.find(".minimap-close");switch(this.position.anchor){case"lt":this.div.css({left:-6,top:-6});bw.css({right:0,bottom:0,"background-position":"-43px -43px"});if(bi){bw.find(".minimap-close-ie6").css({left:-43,top:-43})}break;case"rt":this.div.css({right:-6,top:-6});bw.css({left:0,bottom:0,"background-position":"-66px -43px"});if(bi){bw.find(".minimap-close-ie6").css({left:-66,top:-43})}break;case"lb":this.div.css({left:-6,bottom:-6});bw.css({right:0,top:0,"background-position":"-43px -66px"});if(bi){bw.find(".minimap-close-ie6").css({left:-43,top:-66})}break;case"rb":this.div.css({right:-6,bottom:-6});bw.css({left:0,top:0,"background-position":"-66px -66px"});if(bi){bw.find(".minimap-close-ie6").css({left:-66,top:-66})}break}},removed:function(){for(var bw=0;bw<this._mapListeners.length;bw+=1){this._map.removeListener(this._mapListeners[bw])}z.prototype.removed.call(this)},_newDisplayArea:function(){this._rectangle.show();var bx=this._map.controller.converter.fromPixels(this._map.controller.model.halfWidth,this._map.controller.model.halfHeight);this.model.setState(bx,Math.max(this._map.getZoomLevel()-this.ZOOM_DELTA,this.model.viewMode.minZoomLevel));this.reset();var bw=this.model.getTiles(0,0);this.setTiles(bw,this.model.centerX-this.model.halfWidth,this.model.centerY+this.model.halfHeight);this.tiles=bw;this._rectangle.css(this._rectPosInit);if(this.model.viewMode.minZoomLevel>this._map.getZoomLevel()-this.ZOOM_DELTA){this._rectangle.hide()}},setTiles:function(bw,bA,bz){var bB;var by;for(var bx=0;bx<bw.length;bx+=1){by=bw[bx];if(a3(this.tiles[by.key])){by.create(bA,bz);by.append(this.tilelayer);this.tiles[by.key]=by}}},refreshTiles:function(){var bw=this.tilelayer.position();var bx=this.model.getTiles(bw.left,bw.top);this.setTiles(bx,this.model.centerX-this.model.halfWidth,this.model.centerY+this.model.halfHeight)},reset:function(){this.clean();this.tilelayer.css({left:0,top:0})},clean:function(){var bw=this.tiles;for(var bx in bw){if(bw.hasOwnProperty(bx)){bw[bx].remove()}}this.tiles={}},_resizeHandler:function(){this._refreshRectangleSize();this._newDisplayArea()},_dragStartHandler:function(bw){this._dragStartEvent=bw},_dragHandler:function(bw){this._rectangle.css({left:this._rectPosInit.left+(this._dragStartEvent.pageX-bw.pageX)/Math.pow(3,this.ZOOM_DELTA),top:this._rectPosInit.top+(this._dragStartEvent.pageY-bw.pageY)/Math.pow(3,this.ZOOM_DELTA)})},_refreshRectangleSize:function(){var bw=this._map.getSize();this._rectSize=new aO(bw.width/Math.pow(3,this.ZOOM_DELTA),bw.height/Math.pow(3,this.ZOOM_DELTA));this._rectangle.width(this._rectSize.width);this._rectangle.height(this._rectSize.height);this._rectPosInit={left:(this.model.width-this._rectSize.width)/2,top:(this.model.height-this._rectSize.height)/2};this._rectangle.css(this._rectPosInit)},_addRectangle:function(){this._rectangle=this.div.find(".minimap-rectangle");this._rectangle.css("position","absolute");this._rectangle.css("opacity",0.3);this._refreshRectangleSize();var bw;var bx=this;var by=function(){var bA=[0,0];var bB=bx._rectangle.position();if(bB.left<-bx._rectSize.width){bA[0]=5}else{if(bB.left>bx.model.width){bA[0]=-5}}if(bB.top<-bx._rectSize.height){bA[1]=5}else{if(bB.top>bx.model.height){bA[1]=-5}}if(bA[0]||bA[1]){bw[0]+=bA[0];bw[1]+=bA[1];var bC=bx.tilelayer.position();bx.tilelayer.css({left:bA[0]+bC.left,top:bA[1]+bC.top});bx.refreshTiles()}};var bz;aV(this._rectangle,{start:function(){bw=[0,0];bz=setInterval(by,10)},stop:function(){window.clearInterval(bz);var bB=bx._rectangle.position();var bA=new am(bx._rectPosInit.left-bB.left+bw[0],bx._rectPosInit.top-bB.top+bw[1]);bA.x*=Math.pow(3,bx.ZOOM_DELTA);bA.y*=Math.pow(3,bx.ZOOM_DELTA);bx._map.slideBy(bA)}})}});var J=aN.api.map.tools.Scale=N(z,{MAX_WIDTH:100,DEFAULT_DIRECTION:"horizontal",TEMPLATE:'<div class="tools-scale" style="height:30px;font-family:Arial,sans-serif;font-size: 11px;"><div style="position:relative;float:left;overflow:hidden;width:7px;height:18px;"><img src="{imagesPath}tools/sprite-scale.png"></img></div><div class="tools-scale-middle" style="position:relative;float:left;overflow:hidden;top:6px;height:7px;"><img style="position: absolute;top:-18px;left:0;height:25px;" src="{imagesPath}tools/sprite-scale.png"></img></div><div style="position:relative;float:left;overflow:hidden;width:7px;height:13px;"><img style="position: absolute;right:0;" src="{imagesPath}tools/sprite-scale.png"></img></div><div class="tools-scale-milesbar" style="position:absolute;overflow:hidden;width:7px;height:8px;top:10px;"><img style="position: absolute;left:-7px;top:-10px;" src="{imagesPath}tools/sprite-scale.png"></img></div><div class="tools-scale-meter" style="position: absolute; left:12px; top:-7px;"></div><div class="tools-scale-miles" style="position: absolute; left:12px; bottom:4px;"></div></div>',_mapListeners:[],initialize:function(bw,bx){z.prototype.initialize.call(this,bw,bx)},added:function(bx){var bw=G+((bi)?"img_png8/":"img/");this.div=l(o(this.TEMPLATE,{imagesPath:bw}));this.div.width(this.MAX_WIDTH+14);z.prototype.added.call(this,bx);this._mapListeners.push(bx.addListener("changeend",a1(this._compute,this)));if(bx.isReady){this._compute()}},_compute:function(){var bw,bx;var bD,bC;var bz=this._map.controller.model.getMeterPerPixel();var bA=this.MAX_WIDTH*bz;bx=this._calcRoundDistance(bA);if(bx>1000){bD="km";this.div.find(".tools-scale-meter").html(bx/1000+" "+bD)}else{bD="m";this.div.find(".tools-scale-meter").html(bx+" "+bD)}var by=(bx/bz)-6;var bE=this.div.find(".tools-scale-middle");bE.width(by);bE.find(":first-child").width(by);var bB=bx*0.6213711/1000;if(bB<1){bC="yd";bB*=1760}else{bC="mi"}bw=this._calcRoundDistance(bB);this.div.find(".tools-scale-miles").html(bw+" "+bC);this.div.find(".tools-scale-milesbar").css("left",bw*(bx/bz)/bB-6)},_calcRoundDistance:function(bx){var bw=[1,2,4,5,6,8,10];var bz=1;while((bx/bz)>10){bz*=10}for(var by=bw.length-1;by>=0;by-=1){if((bx/bz)>=bw[by]){return bw[by]*bz}}},removed:function(){for(var bw=0;bw<this._mapListeners.length;bw+=1){this._map.removeListener(this._mapListeners[bw])}z.prototype.removed.call(this)}});var U=aN.api.map.tools.ToolBar=N(z,ba,{DEFAULT_DIRECTION:"vertical",EVENTS:["movemiddleclick"],_mapListeners:[],initialize:function(bx,bw,by){z.prototype.initialize.call(this,bw,by);ba.prototype.initialize.call(this);this.buttonList=bx},added:function(by){this.div=l('<div class="tools-toolbar" style="position:absolute;z-index:999"></div>');var bx=this.buttonList;z.prototype.added.call(this,by);var bw=true;if(aq(bx.move)&&bx.move!==false){this._addMove(bx.move.label,bx.move.labelMiddle);bw=false}if(aq(bx.selection)&&bx.selection!==false){this._addZoomOnSelect(bx.selection.label);bw=false}if(aq(bx.mouseWheelZoom)&&bx.mouseWheelZoom!==false){this._addZoomOnWheelSelection(bx.mouseWheelZoom.label);bw=false}if(aq(bx.viewMode)&&bx.viewMode!==false){this._addViewModeSelector(bw,bx.viewMode.label,bx.viewMode.lang);bw=false}if(aq(bx.zoom)&&bx.zoom!==false){this._addPlus(bw,bx.zoom.label)}if(aq(bx.slider)&&bx.slider!==false){this._addSlider(bx.slider.label)}if(aq(bx.zoom)&&bx.zoom!==false){this._addMinus(!bx.miniMap,bx.zoom.label)}if(aq(bx.miniMap)&&bx.miniMap!==false){this._addMiniMap(bx.miniMap.position,bx.miniMap.label);bw=false}},_addToolTip:function(by,bw){if(aq(bw)){var bx=new aw(this._map.controller.view.div,bw);by.mouseover(function(bz){bx.add(bz);bz.stopPropagation()});by.mouseout(function(){bx.remove()})}},_addMove:function(bz,bw){var by;if(bi){by='<div class="tools-move-ie6"><div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=\''+G+"img/tools/spriteToolbar.png');\"></div></div>"}else{by='<div class="tools-move"></div>'}var bA=l(by);var bB=this;bA.click(function(bE){var bF=bA.offset();var bD=bB._map.getSize();bF=[bE.pageX-bF.left-bA.width()/2,bE.pageY-bF.top-(bA.height()+2)/2];var bC;if(bF[0]<5&&bF[0]>-5&&bF[1]<5&&bF[1]>-5){bB.trigger("movemiddleclick");return}else{if(bF[0]<5&&bF[0]>-5&&(bF[1]>5||bF[1]<-5)){bC=new am(0,-bF[1]*bD.height/(bA.height()/2))}else{if(bF[1]<5&&bF[1]>-5&&(bF[0]>5||bF[0]<-5)){bC=new am(-bF[0]*bD.width/(bA.width()/2),0)}else{bC=new am(-bF[0]*bD.width/(bA.width()/2),-bF[1]*bD.height/(bA.height()/2))}}}bB._map.slideBy(bC)});if(aq(bw)){var bx=l('<div style="width:10px;height:10px;position:absolute;z-index:10;left:13px;top:14px;"></div>');bA.append(bx);this._addToolTip(bx,bw)}this.div.append(bA);this._addToolTip(bA,bz)},_addMiniMap:function(bw,by){var bx;if(bi){bx='<div class="tools-minimap-rounded-ie6"><div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=\''+G+"/img/tools/spriteToolbar.png');\"></div></div>"}else{bx='<div class="tools-minimap-rounded"></div>'}var bB=l(bx);var bA=this;var bz=new af(bw);bB.click(function(){if(aq(bA._map.miniMap)){bA._map.removeTool(bA._map.miniMap)}else{bA._map.addTool(bz)}});this.div.append(bB);this._addToolTip(bB,by)},_addPlus:function(bw,by){var bz=this;var bx;if(bi){bx="<div><div style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+G+"/img/tools/spriteToolbar.png');\"></div></div>"}else{bx="<div></div>"}var bA=l(bx);if(bw){if(bi){bA.addClass("tools-plus-rounded-ie6")}else{bA.addClass("tools-plus-rounded")}}else{if(bi){bA.addClass("tools-plus-ie6")}else{bA.addClass("tools-plus")}}bA.click(function(){bz._map.zoomIn()});this.div.append(bA);this._addToolTip(bA,by)},_addMinus:function(bA,bx){var bz=this;var bw;if(bi){bw="<div><div style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+G+"/img/tools/spriteToolbar.png');\"></div></div>"}else{bw="<div></div>"}var by=l(bw);if(bA){if(bi){by.addClass("tools-minus-rounded-ie6")}else{by.addClass("tools-minus-rounded")}}else{if(bi){by.addClass("tools-minus-ie6")}else{by.addClass("tools-minus")}}by.click(function(){bz._map.zoomOut()});this.div.append(by);this._addToolTip(by,bx)},_addSlider:function(bx){var bC=this;var bz=this._map.getViewMode();var bB;var bw;if(bi){bw='<div class="tools-slider-ie6"><div class="tools-slider-bg-ie6" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src=\''+G+"/img/tools/gdeBarreZoom_centre.png');\"></div></div>"}else{bw='<div class="tools-slider"></div>'}var bA=l(bw);this.div.append(bA);var by=function(bD){bz=bD;if(aq(bB)){bB.destroy()}bB=new y({container:bA,min:bz.minZoomLevel,max:bz.maxZoomLevel,stop:function(bE){bC._map.setZoomLevel(bE)}})};by(bz);this._mapListeners.push(this._map.addListener("changeend",function(){var bD=bC._map.getViewMode();if(bz!==bD){by(bD)}bB.setValue(bC._map.getZoomLevel())}));if(this._map.isReady){bB.setValue(this._map.getZoomLevel())}this._addToolTip(bA,bx);this._slider=bB},_addZoomOnSelect:function(bz){var by;var bx;var bw;if(bi){by="<div><div style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+G+"/img/tools/spriteToolbar.png');\"></div></div>";bx="tools-selection-selected-ie6";bw="tools-selection-ie6"}else{by="<div></div>";bx="tools-selection-selected";bw="tools-selection"}var bA=l(by);var bB=this._map;if(bB.isZoomSelectionEnabled()===false){bA.addClass(bw)}else{bA.addClass(bx)}this._mapListeners.push(bB.addListener("controlchanged",function(bC){if(bC==="selectionZoom"){if(bB.isZoomSelectionEnabled()===false){bA.removeClass(bx);bA.addClass(bw)}else{bA.removeClass(bw);bA.addClass(bx)}}}));bA.click(function(){if(bB.isZoomSelectionEnabled()){bB.disableZoomSelection();bB.enableDraggable()}else{bB.enableZoomSelection()}});this.div.append(bA);this._addToolTip(bA,bz)},_addZoomOnWheelSelection:function(bz){var by;if(bi){by="<div><div style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+G+"/img/tools/spriteToolbar.png');\"></div></div>"}else{by="<div></div>"}var bA=l(by);var bB=this;var bx=(bi)?"tools-mousewheelzoom-enable-ie6":"tools-mousewheelzoom-enable";var bw=(bi)?"tools-mousewheelzoom-disable-ie6":"tools-mousewheelzoom-disable";this._mapListeners.push(this._map.addListener("controlchanged",function(bC){if(bC==="scrollWheelZoom"){if(bB._map.isScrollWheelZoomEnabled()===false){bA.removeClass(bx);bA.addClass(bw)}else{bA.removeClass(bw);bA.addClass(bx)}}}));if(this._map.isScrollWheelZoomEnabled()===true){bA.addClass(bx)}else{bA.addClass(bw)}bA.click(function(){if(bB._map.isScrollWheelZoomEnabled()===false){bB._map.enableScrollWheelZoom()}else{bB._map.disableScrollWheelZoom()}});this.div.append(bA);this._addToolTip(bA,bz)},_addViewModeSelector:function(bC,bH,bB){var bz=this._map;var bD;if(bi){bD="<div><div style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+G+"/img/tools/spriteToolbar.png');\"></div></div>"}else{bD="<div></div>"}var by=l(bD);function bG(){var bI=bz.getViewMode().name;by.removeClass();if(bC){if(bi){by.addClass("tools-viewmode-"+bI+"-rounded-ie6")}else{by.addClass("tools-viewmode-"+bI+"-rounded")}}else{if(bi){by.addClass("tools-viewmode-"+bI+"-ie6")}else{by.addClass("tools-viewmode-"+bI)}}}bG();var bA=l('<ul class="tools-viewmode-container"></ul>');bA.hide();var bx=(bB==="EN")?"Map":"Plan";var bF=l('<li class="tools-viewmode-liste-map">'+bx+"</li>");bF.click(function(bI){if(bz.getViewMode().name!=="map"){bz.setViewMode(new Y("map"));bG()}bA.hide();bI.stopPropagation()});bA.append(bF);var bw=l('<li class="tools-viewmode-liste-photo">Photo</li>');bw.click(function(bI){if(bz.getViewMode().name!=="photo"){bz.setViewMode(new Y("photo"));bG()}bA.hide();bI.stopPropagation()});bA.append(bw);bx=(bB==="EN")?"Hybrid":"Mixte";var bE=l('<li class="tools-viewmode-liste-hybrid">'+bx+"</li>");bE.click(function(bI){if(bz.getViewMode().name!=="hybrid"){bz.setViewMode(new Y("hybrid"));bG()}bA.hide();bI.stopPropagation()});bA.append(bE);by.append(bA);by.mouseleave(function(){bA.hide()});by.mouseenter(function(){bA.show()});this.div.append(by);this._addToolTip(by,bH)},removed:function(){if(aq(this._slider)){this._slider.destroy()}for(var bw=0;bw<this._mapListeners.length;bw+=1){this._map.removeListener(this._mapListeners[bw])}z.prototype.removed.call(this)}});var bh=N({name:null,group:null,Placemark:null,contact:null,extras:null,information:null,type:null,guid:null,id:null,provider:null,distance:null,initialize:function(bG){var bx=bG.point.distance;var bE;var bw;var bI;var bB;var bD;var bJ={comments:null,text:null};var bA=bG.type;var bz=bG.guid;var bC=bG.id;var bF=bG.provider;if(bG.data){bE=bG.data.name;bw=bG.data.group;bI={};bI.Point={coordinates:[bG.point.x,bG.point.y]};if(bG.data.address){bI.name=bG.data.name;bI.AddressDetails={};bI.AddressDetails.Country={};bI.AddressDetails.Country.CountryName=bG.data.address.country;bI.AddressDetails.Country.CountryNameCode=bG.data.address.countrycode;bI.AddressDetails.Country.AdministrativeArea={};bI.AddressDetails.Country.AdministrativeArea.AdministrativeAreaName=null;bI.AddressDetails.Country.AdministrativeArea.Locality={};bI.AddressDetails.Country.AdministrativeArea.Locality.LocalityName=bG.data.address.town;bI.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare={};bI.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareName=bG.data.address.way;bI.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber=bG.data.address.number;bI.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.PostalCode={};bI.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.PostalCode.PostalCodeNumber=[bG.data.address.postal_code]}bD=bG.data.extras;bB=bG.data.contact;if(bG.data.information){bJ.comments=bG.data.information.comments;bJ.description=bG.data.information.description;if(bG.data.information.text){bJ.text={};var bH=l.makeArray(bG.data.information.text);for(var by=0;by<bH.length;by+=1){bJ.text[bH[by].lang]=bH[by].value}}}}this.name=bE;this.group=bw;this.Placemark=bI;this.contact=bB;this.extras=bD;this.information=bJ;this.type=bA;this.guid=bz;this.id=bC;this.provider=bF;this.distance=bx}});var p=aN.api.poi.PoiService=N({initialize:function(){},search:function(bB,bA,bx,bz,bw){var by=new bg();by.configure(bB,bA,bx);ad(by,function(bG){var bC={};try{var bK=l.makeArray(bG.pois.answer);var bD,bE;var bH=[];if(aq(bG.pois.postkey)){bC.postKey=bG.pois.postkey.value}if(bK){for(var bI=0;bI<bK.length;bI+=1){if(bK.hasOwnProperty(bI)){if(bK[bI].poi.length){bE=[];for(var bF in bK[bI].poi){if(bK[bI].poi.hasOwnProperty(bF)){bD=new bh(bK[bI].poi[bF]);bD.duplicated=bE;bE.push(bD);bH.push(bD)}}}else{bH.push(new bh(bK[bI].poi))}}}}bz(bH)}catch(bJ){if(aq(bw)){bw(bJ)}}})}});var aW=N({name:null,num:null,nextRoad:null,label:null,town:null,countryCode:null,step:null,type:null,meter:null,sec:null,from:null,to:null,coordinates:null,initialize:function(bw){this.name=bw.name;this.num=bw.num;this.nextRoad=bw["next-road"];this.exitNumber=bw["exit-number"];this.label=bw.label;this.town=bw.town;this.countryCode=bw["country-code"];this.step=bw.step-0;this.type=bw.type;this.meter=bw.meter-0;this.sec=bw.sec-0;this.from=bw.from-0;this.to=bw.to-0;this.coordinates=null;this.depDate=bw.depDate;this.arrDate=bw.arrDate;this.dataprovider=bw.dataprovider;this.simpleLabel=bw.simpleLabel;this.mode=bw.mode;this.lineName=bw.lineName;this.depStation=bw.depStation;this.arrStation=bw.arrStation;this.lineDir=bw.lineDir}});var v=N({actions:null,ways:null,pois:null,shields:null,postKey:null,shapes:null,options:null,wayPoints:null,_rids:null,summary:null,initialize:function(bL,bB,bz){var bK,bI,bH;if(aq(bz)){this.options=bz}if(aq(bB)&&aq(bL.route.ids.waypoint)){var bM=[];for(bK=0;bK<bB.length;bK+=1){bM.push(bB[bK])}var bx=bL.route.ids.waypoint;for(bK=0;bK<bx.length;bK+=1){bB[bK]=bM[bx[bK].num]}this.wayPoints=bB}if(aq(bL.traceKml)){this.kml=bL.traceKml.kml}var bC,bN,bw,bE;if(aq(bL.roadbook.pois)){bC=this._computePois(bL.roadbook.pois)}else{bC=[]}if(aq(bL.roadbook.shields)&&aq(bL.roadbook.shields.shield)){bN=this._computeShields(bL.roadbook.shields.shield)}else{bN=[]}if(aq(bL.roadbook.way)&&aq(bL.roadbook.way.country)){bw=this._computeWays(bL.roadbook.way.country)}else{bw=[]}if(aq(bL.roadbook.actions)&&aq(bL.roadbook.actions.action)){bE=this._computeActions(bL.roadbook.actions.action)}else{bE=[]}for(bK=0,bI=0,bH=0;bK<bw.length;bK+=1){for(;bI<bC.length;bI+=1){if(bC[bI].index>=bw[bK].from&&bC[bI].index<=bw[bK].to){bw[bK].pois.push(bC[bI])}else{if(bC[bI].index>bw[bK].to){break}}}for(;bH<bN.length;bH+=1){if(bN[bH].index>=bw[bK].from&&bN[bH].index<=bw[bK].to){bw[bK].shields.push(bN[bH])}else{if(bN[bH].index>bw[bK].to){break}}}}var bG=[];if(aq(bL.route.ids.rid)){var bA=l.makeArray(bL.route.ids.rid);for(bK=0;bK<bA.length;bK+=1){bG[bA[bK].idx]=bA[bK]}}var bD=new aX();var bF=bD.getShapes(this.kml);if(bF.length>0){var bJ=bF[0].getCoordinates();if(aq(bJ[0])){bE[0].coordinates=new P(bJ[0].x,bJ[0].y)}bJ=bF[bF.length-1].getCoordinates();if(aq(bJ[bJ.length-1])){bE[bE.length-1].coordinates=new P(bJ[bJ.length-1].x,bJ[bJ.length-1].y)}}var by;for(bK=1;bK<bE.length-1;bK+=1){by=bG[bE[bK].from];if(aq(by)){bE[bK].coordinates=new P(by.x2,by.y2)}}this.actions=bE;this.ways=bw;this.pois=bC;this.shields=bN;this.postKey=bL.postkey;this.shapes=bF;this._rids=bG;this.summary=new n(bL.roadbook.summary,bL.roadbook.request)},_computePois:function(bz){var bw=[];if(bz!==""){for(var by in bz){if(bz.hasOwnProperty(by)){var bA=l.makeArray(bz[by]);for(var bx=0;bx<bA.length;bx+=1){bw.push(new au(bA[bx],by))}}}bw.sort(function(bC,bB){return bC.index-bB.index})}return bw},_computeShields:function(by){var bx=[];by=l.makeArray(by);for(var bw=0;bw<by.length;bw+=1){bx.push(new bl(by[bw],this))}bx.sort(function(bA,bz){return bA.index-bz.index});return bx},_computeWays:function(bx){var bD=["road","ramp","junction","place"];var bG=[];var bH=l.makeArray(bx);var bB,bA,bz,by,bw;for(bB=0;bB<bH.length;bB+=1){var bC=l.makeArray(bH[bB].town);for(bA=0;bA<bC.length;bA+=1){var bF=bC[bA];for(bz=0;bz<bD.length;bz+=1){bw=l.makeArray(bF[bD[bz]]);for(by=0;by<bw.length;by+=1){bG.push(new bm(bw[by],bD[bz],bH[bB].name,bC[bA].name))}}}for(bz=0;bz<bD.length;bz+=1){bw=l.makeArray(bH[bB][bD[bz]]);for(by=0;by<bw.length;by+=1){bG.push(new bm(bw[by],bD[bz],bH[bB].name,null))}}}try{bG.sort(function(bJ,bI){return bJ.meter-bI.meter})}catch(bE){}return bG},_computeActions:function(by){var bw=[];by=l.makeArray(by);for(var bx=0;bx<by.length;bx+=1){bw.push(new aW(by[bx]))}return bw},getPois:function(bA,bz){var bx=[];var by=this.pois;for(var bw=0;bw<by.length;bw+=1){if(by[bw].index>=bA&&by[bw].index<=bz){bx.push(by[bw])}else{if(by[bw].index>bz){break}}}return bx},getShields:function(bA,bz){var by=[];var bw=this.shields;for(var bx=0;bx<bw.length;bx+=1){if(bw[bx].index>=bA&&bw[bx].index<=bz){by.push(bw[bx])}else{if(bw[bx].index>bz){break}}}return by},getWay:function(bw){for(var bx=0;bx<this.ways.length;bx+=1){if(this.ways[bx].from<=bw&&this.ways[bx].to>=bw){return this.ways[bx]}}},getVehicle:function(bw){if(aq(this._rids[bw])){return this._rids[bw].veh}},getLine:function(bw){if(aq(this._rids[bw])){return this._rids[bw].line}},toHtml:function(){var bL='<tr class="{trClass}">            <td class="number">{number}</td>            <td class="details"><div class="panel {panelClass}"></div></td>            <td class="action">{action}</td>            <td class="time">{time}</td>            <td class="km">{km} km</td>        </tr>        {details}';var bJ='<tr class="details {trClass}">            <td></td>            <td></td>            <td colspan="3" class="shields">                <table>                    <tr>                        <td>{shields}</td>                        <td>{poi}</td>                    </tr>                </table>            </td>        </tr>';var bK='<tr><td class="km">{meter} km</td><td><div class="panel {poiClass}"></div></td><td>{label}</td></tr>';var bB='<table class="pois">{pois}</table>';var by=[];var bE,bC;for(bE=0;bE<this.actions.length;bE+=1){var bA=this.actions[bE];var bx=(this.actions[bE+1])?this.actions[bE+1].from-1:bA.to;var bI=this.getShields(bA.from,bx);var bF=[];for(bC=0;bC<bI.length;bC+=1){bF.push(bI[bC].toHtml())}var bG=this.getPois(bA.from,bx);var bz=[];for(bC=0;bC<bG.length;bC+=1){bz.push(o(bK,{meter:bG[bC].meter/1000,poiClass:bG[bC].type,label:bG[bC].label}))}var bH="";if(bF.length>0||bz.length>0){bH=o(bJ,{trClass:(bE%2===0)?"out":"in",shields:bF.join(""),poi:o(bB,{pois:bz.join("")})})}var bD;if(bA.type==="town-enter"||bA.type==="town-exit"){bD=unescape(escape(bA.label).replace(new RegExp("("+escape(bA.town)+")","gi"),'<div class="town-sign"><span>'+bA.town.toUpperCase()+"</span></div>"))}else{var bw=(bA.name)?bA.name:bA.nextRoad;bD=unescape(escape(bA.label).replace(new RegExp("("+escape(bw)+")","gi"),'<span class="bold">'+bw+"</span>"))}by.push(o(bL,{trClass:(bE%2===0)?"out":"in",number:bE+1,panelClass:bA.type,action:bD,details:bH,time:bq(bA.sec),km:bA.meter/1000}))}return'<table class="roadbook">'+by.join("")+"</table>"}});var bm=N({category:null,country:null,town:null,type:null,meter:null,sec:null,from:null,to:null,name:null,num:null,pois:null,shields:null,initialize:function(by,bx,bz,bw){this.category=bx;this.country=bz;this.town=bw;this.type=by.type;this.meter=by.meter-0;this.sec=by.sec-0;this.from=by.from-0;this.to=by.to-0;this.name=by.name;this.num=by.num;this.pois=[];this.shields=[]}});var au=N({type:null,index:null,name:null,label:null,meter:null,sec:null,len:null,speedLimit:null,pop:null,cost:null,initialize:function(bx,bw){this.type=bw;this.index=bx.ridx-0;this.name=bx.name;this.label=bx.label;this.meter=bx.meter-0;this.sec=bx.sec-0;this.len=bx.len-0;this.speedLimit=bx["speed-limit"]-0;this.pop=bx.pop-0;this.cost=bx.cost}});var bl=N({index:null,meter:null,sec:null,lines:null,initialize:function(bw,bx){this.index=bw.ridx-0;this.meter=bw.meter-0;this.sec=bw.sec-0;this.lines=l.makeArray(bw.line);this._roadbook=bx},toHtml:function(){var bE=[];var bB=(this._roadbook.getWay(this.index).type==="highway")||false;var bx=false;var bD="";for(var bC=0;bC<this.lines.length;bC+=1){var bG="";var bw=l.makeArray(this.lines[bC].dir);for(var bA=0;bA<bw.length;bA+=1){var by=bw[bA];if(typeof by==="string"){bG+='<span class="name">'+by.toUpperCase()+"</span>"}else{if(by.type==="num"){var bF=(by.value&&by.value.charAt(0)&&by.value.charAt(0).toLowerCase())||"";var bz='<span class="num-'+bF+'">'+by.value+"</span>";if(by.branch){if(bF==="a"){bB=true}bE.push(bz)}else{bG+=bz}}else{if(by.type==="exit"){bx=true;bG+='<img src="'+G+'img/roadbook/shield/exit_frame.gif"/><span style="position:relative;left:-25px;font-size:11px;top:-3px;">'+by.value+"</span>"}else{if(by.type==="exitname"){bx=true;bG+='<span class="exitname">'+by.value+'</span>&nbsp;<img src="'+G+'img/roadbook/shield/exit_arrow.gif"/>'}else{if(by.type==="picto"){bG+='<img src="'+G+"img/roadbook/shield/picto"+parseInt(by.value,10)+'.gif"/>'}else{if(by.type==="name"||by.type==="other"||by.type==="streetname"){bG+='<span class="'+by.type+'">'+by.value.toUpperCase()+"</span>"}}}}}}if(bA+1<bw.length&&bG!==""){bG+="&nbsp;"}}if(bG!==""){bD+="<li>"+bG+"</li>"}}if(bD===""&&bE.length){l.each(bE,function(bI,bH){bD+="<li>"+bH+"</li>"});bE=[]}return'<div class="shield">'+(bE.length?'<div class="hat">'+bE.join("&nbsp")+"</div>":"")+(bD!==""?"<ul"+(bB&&!bx?' class="highway"':"")+">"+bD+"</ul>":"")+"</div>"}});var n=N({speedPct:null,gasConsumption:null,gasName:null,length:null,time:null,vehicle:null,caravan:null,tolls:null,nbCorrespondances:null,correspondances:null,departDateTime:null,fareZone:null,arriveeDateTime:null,initialize:function(bw,by){if(aq(bw.costs.spdpct)){this.speedPct=bw.costs.spdpct-0}if(aq(bw.costs.gas)){this.gasConsumption=bw.costs.gas-0}if(aq(bw.costs.length)){this.length=bw.costs.length-0}if(aq(bw.costs.time)){this.time=bw.costs.time-0}if(aq(by)){if(aq(by.vehicle)){this.vehicle=by.vehicle}if(aq(by.gas)){this.gasName=by.gas}this.caravan=(by.caravan==="1")}var bz;if(aq(bw.costs.tolls)&&aq(bw.costs.tolls.toll)){bz=l.makeArray(bw.costs.tolls.toll);for(var bx=0;bx<bz.length;bx+=1){if(typeof bz[bx].amount!=="string"){bz[bx].amount=l.makeArray(bz[bx].amount)}}}else{bz=[]}this.tolls=bz;if(aq(bw.nbCorrespondances)){this.nbCorrespondances=bw.nbCorrespondances-0}if(aq(bw.correspondances)){this.correspondances=bw.correspondances}if(aq(bw.departDateTime)){this.departDateTime=bw.departDateTime}if(aq(bw.arriveeDateTime)){this.arriveeDateTime=bw.arriveeDateTime}if(aq(bw.fareZone)){this.fareZone=bw.fareZone}},toHtml:function(){var bA='<div class="summary"><h2>Résumé de l\'itinéraire</h2>Véhicule: <span class="bold">{vehicle}</span><br/>Type de carburant: <span class="bold">{gasName}</span><br/>Consommation: <span class="bold">{gasConsumption} litre(s)</span><br/>Péages: <span class="bold">{tolls}</span><br/>Durée: <span class="bold">{time}</span></div>';var bz,by;if(this.tolls.length>0){var bw=[];for(var bx=0;bx<this.tolls.length;bx+=1){by=this.tolls[bx];bw.push(by.country+" : "+by.amount+" "+by.currency)}bz=bw.join(", ")}else{bz="Aucun"}return o(bA,{vehicle:this.vehicle,gasName:this.gasName,gasConsumption:this.gasConsumption,time:bq(this.time),tolls:bz})}});var ac=aN.api.route.RouteService=N({initialize:function(){},loadRoute:function(bz,bE,bD,bB){var bC=new aT();var bA=[];var by=this;bC.addListener("empty",function(){var bG=[];for(var bF=0;bF<bz.length;bF+=1){if(a3(bA[bF])&&l.isFunction(bB)){bB(new Error("One location not found at step "+bF+"."));return}bG.push(bA[bF].getRidInfo())}by._sendRequest(bG,bE,bD,bB,bA)});var bw=new ah();bC.size=bz.length;for(var bx=0;bx<bz.length;bx+=1){bw.geocode(bz[bx],this._geocoderSuccessHandler(bA,bx,bC),this._geocoderErrorHandler(bC))}},_geocoderSuccessHandler:function(bw,bx,by){return function(bz){bw[bx]=bz[0];by.removeTask()}},_geocoderErrorHandler:function(bw){return function(){bw.removeTask()}},_sendRequest:function(bz,by,bB,bx,bw){var bA;if(by.multiModal===true){bA=new bk()}else{bA=new K()}bA.configure(bz,by);ad(bA,function(bC){var bE;try{if(bC&&bC.xml&&bC.xml.route&&bC.xml.route.stats&&bC.xml.roadbook&&bC.xml.roadbook.stats){if(bC.xml.route.stats.error==="none"&&bC.xml.roadbook.stats.error==="none"){bE=new v(bC.xml,bw,by)}else{if(l.isFunction(bx)){bx({message:"Route : "+bC.xml.route.stats.error+"; Roadbook : "+bC.xml.roadbook.stats.error,errors:{route:bC.xml.route.stats.error,roadbook:bC.xml.roadbook.stats.error}})}}}else{if(l.isFunction(bx)){bx({message:"Mappy.api.route.RouteService._sendRequest",errors:{route:"parse error",roadbook:"parse error"}})}}}catch(bD){if(l.isFunction(bx)){bx({message:bD})}return}bB(bE)},bx)},loadRouteFromRids:function(by,bx,bz,bw){this._sendRequest(by,bx,bz,bw,by)}});var u=N({initialize:function(bw,bx){this._townCode=bw;this._file=bx.file;this._rotate=bx.rot;this._id=bx.id;this._type=bx.type;this._description=bx.desc;this._view=bx.view},getURL:function(bx){var bw=D+aZ.photo;bw+="&townCode="+this._townCode;bw+="&file="+this._file;bw+="&opt.rotate="+this._rotate;if(bx){bw+=(bx.width)?"&opt.maxWidth="+bx.width:"";bw+=(bx.height)?"&opt.maxHeight="+bx.height:"";bw+=(bx.miniature)?"&opt.miniature=1":"";bw+=(bx.frame)?"&opt.frame=1":"";bw+=(bx.fixedSize)?"&opt.fixedSize=1":"";bw+=(bx.marks)?"&opt.marks={"+bx.marks+"}":""}bw+="&auth="+aE;return bw},getDescription:function(){return this._description},getId:function(){return this._id},getType:function(){return this._type},getView:function(){return this._view}});var ak=N({townName:null,countryCode:null,townCode:null,townOfficialCode:null,initialize:function(bz){this._photos=[];var bx=bz.townCodePhotos;this.townCode=bx;for(var by=0;by<E.length;by+=1){if(E[by].Code===this.townCode){this.countryCode=E[by].CountryCode-0;this.townName=E[by].Name;this.townOfficialCode=E[by].Order08;break}}this._angle=bz.nav.angle-0;if(bz.photos&&bz.photos.photosList&&bz.photos.photosList.photo){var bA=bz.photos.photosList.photo;if(bA.length){for(var bw in bA){if(bA.hasOwnProperty(bw)){this._photos.push(new u(bx,bA[bw]))}}}else{this._photos.push(new u(bx,bA))}}},getPhotos:function(){return this._photos},getAngle:function(){return this._angle}});var ax=aN.api.visiocity.Frontage=N(ak,{initialize:function(bA){ak.prototype.initialize.call(this,bA);var bz,by;var bx=bA.townCodePhotos;var bw=bA.nav.navLevel.length?bA.nav.navLevel:[bA.nav.navLevel];for(bz in bw){if(bw.hasOwnProperty(bz)){var bB=parseInt(bw[bz].level,10);if(bB===0){for(by in bw[bz].navAction){if(bw[bz].navAction.hasOwnProperty(by)){if(bw[bz].navAction[by].action==="current"){this._current=new u(bx,bw[bz].navAction[by]);if(aq(bw[bz].navAction[by].XYList)===true){this._coordinates=new P(bw[bz].navAction[by].XYList.XY.X,bw[bz].navAction[by].XYList.XY.Y)}}if(bw[bz].navAction[by].action==="frontOf"){this._facing=new u(bx,bw[bz].navAction[by])}if(bw[bz].navAction[by].action==="right"){this._rightSide=new u(bx,bw[bz].navAction[by])}if(bw[bz].navAction[by].action==="left"){this._leftSide=new u(bx,bw[bz].navAction[by])}if(bw[bz].navAction[by].action==="leftSequence"){this._leftSequence=new u(bx,bw[bz].navAction[by])}if(bw[bz].navAction[by].action==="rightSequence"){this._rightSequence=new u(bx,bw[bz].navAction[by])}}}}if(bB===1){if(bw[bz].direction==="Left"){for(by in bw[bz].navAction){if(bw[bz].navAction.hasOwnProperty(by)){if(bw[bz].navAction[by].action==="current"){this._leftAlong=new u(bx,bw[bz].navAction[by])}}}}if(bw[bz].direction==="Right"){for(by in bw[bz].navAction){if(bw[bz].navAction.hasOwnProperty(by)){if(bw[bz].navAction[by].action==="current"){this._rightAlong=new u(bx,bw[bz].navAction[by])}}}}}}}},getCurrent:function(){return this._current},getLeftSide:function(){return this._leftSide},getLeftAlong:function(){return this._leftAlong},getRightSide:function(){return this._rightSide},getRightAlong:function(){return this._rightAlong},getFacing:function(){return this._facing},getLeftSequence:function(){return this._leftSequence},getRightSequence:function(){return this._rightSequence},getCoordinates:function(){return this._coordinates}});var ay=N({initialize:function(bw,bx){this._townCode=bw;this._description=bx.desc;this._angle=bx.angle-0;this._id=bx.id;this._view=bx.view},getId:function(){return this._id},getView:function(){return this._view},getAngle:function(){return this._angle},getDescription:function(){return this._description}});var a9=aN.api.visiocity.Sequence=N(ak,{initialize:function(bB){ak.prototype.initialize.call(this,bB);var bA;var bC;var by=bB.townCodePhotos;var bw=bB.nav.navLevel.length?bB.nav.navLevel:[bB.nav.navLevel];for(bA in bw){if(bw.hasOwnProperty(bA)){if(parseInt(bw[bA].level,10)===0){for(var bz in bw[bA].navAction){if(bw[bA].navAction.hasOwnProperty(bz)){if(bw[bA].navAction[bz].action==="current"){this._current=new u(by,bw[bA].navAction[bz]);bC=bw[bA].navAction[bz].view;if(aq(bw[bA].navAction[bz].XYList)===true){this._coordinates=new P(bw[bA].navAction[bz].XYList.XY.X,bw[bA].navAction[bz].XYList.XY.Y)}}if(bw[bA].navAction[bz].action==="leftAhead"){this._leftAhead=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="leftBehind"){this._leftBehind=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="left"){this._left=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="rightAhead"){this._rightAhead=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="right"){this._right=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="rightBehind"){this._rightBehind=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="goBack"){this._goBack=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="next"){this._next=new u(by,bw[bA].navAction[bz])}if(bw[bA].navAction[bz].action==="previous"){this._previous=new u(by,bw[bA].navAction[bz])}}}}}}if(bB.intersections){var bx=bB.intersections.intersectionsList.intersection.length?bB.intersections.intersectionsList.intersection:[bB.intersections.intersectionsList.intersection];this._intersections=[];for(bA in bx){if(bx.hasOwnProperty(bA)){this._intersections.push(new ay(by,bx[bA]))}}}},getCurrent:function(){return this._current},getLeftAhead:function(){return this._leftAhead},getLeft:function(){return this._left},getLeftBehind:function(){return this._leftBehind},getRightAhead:function(){return this._rightAhead},getRight:function(){return this._right},getRightBehind:function(){return this._rightBehind},getGoBack:function(){return this._goBack},getNext:function(){return this._next},getPrevious:function(){return this._previous},getIntersections:function(){return this._intersections},getCoordinates:function(){return this._coordinates}});var aU=aN.api.visiocity.PhotoService=N({initialize:function(){},townHasPhotos:function(by,bw){for(var bx in E){if(E.hasOwnProperty(bx)){if(E[bx].CountryCode===by&&E[bx].Order08===bw){return true}}}return false},search:function(bx,bD,bH,bE){var bF,bw;var bG;var bB;var bz;var by;var bA;var bC=function(bJ){var bI;try{if(bJ.photo.photoSearch.answer.nav.type==="frontage"){bI=new ax(bJ.photo.photoSearch.answer)}else{if(bJ.photo.photoSearch.answer.nav.type==="sequence"){bI=new a9(bJ.photo.photoSearch.answer)}}}catch(bK){if(aq(bE)){bE(bK)}return}bH(bI)};if(bx&&bx.officialTownCode&&bx.countryNameCode&&bx.wayName&&bx.number){for(bA=0;bA<E.length;bA+=1){if(E[bA].CountryCode===bx.countryNameCode&&E[bA].Order08===bx.officialTownCode){bG=E[bA].Code;break}}if(bG){bF=new r();bF.configure({townCode:bG,countryCode:bx.countryNameCode,number:bx.number,wayName:bx.wayName,objectType:bD});ad(bF,bC)}else{bE(new Error("Town not found."))}}else{if(bx&&bx.Placemark&&bx.Placemark.AddressDetails&&bx.Placemark.AddressDetails.Country&&bx.Placemark.AddressDetails.Country.CountryNameCode&&bx.Placemark.AddressDetails.Country.CountryNameCode.value&&bx.Placemark.AddressDetails.Country.AdministrativeArea&&bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality&&bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare&&bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber&&bx.Placemark.ExtendedData["mappy:OfficialTownCode"]){for(bA=0;bA<E.length;bA+=1){if(E[bA].CountryCode===bx.Placemark.AddressDetails.Country.CountryNameCode.value&&E[bA].Order08===bx.Placemark.ExtendedData["mappy:OfficialTownCode"]&&bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare){bG=E[bA].Code;bB=E[bA].CountryCode;bz=bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber.Requested||bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareNumber.Interpolated;by=bx.Placemark.AddressDetails.Country.AdministrativeArea.Locality.Thoroughfare.ThoroughfareName}}if(bG&&bB&&by&&bz){bF=new r();bF.configure({townCode:bG,countryCode:bB,number:bz,wayName:by,objectType:bD});ad(bF,bC)}else{if(typeof bE==="function"){bE(new Error("Not enough information."))}}}else{if(bx instanceof u){bF=new r();bD=bx.getType();if(bD==="Facades"){bw="f"}else{if(bD==="Sequences"){bw="s"}}bF.configure({id:bx.getId(),objectType:bw,view:bx.getView()});ad(bF,bC)}else{if(bx instanceof ay){bF=new r();bw="s";bF.configure({id:bx.getId(),objectType:bw,view:bx.getView()});ad(bF,bC)}else{if(bx instanceof P){bF=new r();bF.configure({coordinates:bx,objectType:bD});ad(bF,bC)}else{if(typeof bE==="function"){bE(new Error("Not enough information."))}}}}}}}})}(_mappyInit));