
/*------------------------------------------------------------------------
# Path Parser Class
# ------------------------------------------------------------------------
# author:    Dmitry Zhuk
# copyright: Copyright (C) 2019 zhuk.cc. All Rights Reserved.
# license:   http://creativecommons.org/licenses/by-nc-nd/4.0/
#            Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
# website:   http://zhuk.cc
# Technical Support Forum: http://forum.zhuk.cc/
# version: 23.03.16
-------------------------------------------------------------------------*/
function zhomPathParser(){zhomPathParser.ac+=1;this.bQ=zhomPathParser.ac;this.bV="";this.map=null;this.aj=jQuery.noConflict();this.kM=null;this.R="0";this.jW="";this.lB=null;this.jI="0";this.jG="";this.kV=0;zhomPathParser.aO[this.bQ]=this;};zhomPathParser.ac=0;zhomPathParser.aO=[];zhomPathParser.prototype.setRequestURL=function(t){this.bV=t;};zhomPathParser.prototype.setGPXIconPath=function(t){this.jW=t;};zhomPathParser.prototype.setMap=function(t){this.map=t;};zhomPathParser.prototype.setObjectManager=function(t){this.kM=t;};zhomPathParser.prototype.setHoverMarkerType=function(t){this.R=t;};zhomPathParser.prototype.fe=function(l,t,kl,il,jX,ee,dn){var iC=t;if(iC.documentElement.nodeName=="kml"){var gO=iC.documentElement.childNodes;for(var i=0;i<gO.length;i++){if(gO[i].nodeName!="#text"){if(gO[i].nodeName=="Document"||gO[i].nodeName=="Folder"){var jx=new Object();var io=new Object();l.eK("1",l,gO[i],jx,io,kl,il,jX,ee,dn);}}}}else{console.log("There is no kml tag");}};zhomPathParser.prototype.eK=function(kL,l,t,lf,lh,kl,il,jX,ee,dn){var gO=t.childNodes;var jx;var io;if(kL=="1"){jx=new Object();io=new Object();}else{jx=lf;io=lh;}for(var i=0;i<gO.length;i++){if(gO[i].nodeName=="Style"){var fV=gO[i].childNodes;var iI=new Object();for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="IconStyle"){var gV=fV[j].childNodes;for(var k=0;k<gV.length;k++){if(gV[k].nodeName=="Icon"){var ga=gV[k].childNodes;for(var w=0;w<ga.length;w++){if(ga[w].nodeName=='href'){iI["icon"]=ga[w].childNodes[0].nodeValue;}}}else if(gV[k].nodeName=="scale"){iI["scale"]=gV[k].childNodes[0].nodeValue;}}}else if(fV[j].nodeName=="LineStyle"){var gV=fV[j].childNodes;for(var k=0;k<gV.length;k++){if(gV[k].nodeName=="color"){var fI=gV[k].childNodes[0].nodeValue;var ea=fI.substr(6,2)+fI.substr(4,2)+fI.substr(2,2)+fI.substr(0,2);iI["line_color"]=ea;}else if(gV[k].nodeName=="width"){iI["line_width"]=Number(gV[k].childNodes[0].nodeValue);}}}else if(fV[j].nodeName=="PolyStyle"){var gV=fV[j].childNodes;for(var k=0;k<gV.length;k++){if(gV[k].nodeName=="color"){var fI=gV[k].childNodes[0].nodeValue;var ea=fI.substr(6,2)+fI.substr(4,2)+fI.substr(2,2)+fI.substr(0,2);iI["polygon_color"]=ea;}else if(gV[k].nodeName=="outline"){iI["polygon_outline"]=gV[k].childNodes[0].nodeValue;}else if(gV[k].nodeName=="fill"){iI["polygon_fill"]=gV[k].childNodes[0].nodeValue;}}}}jx["#"+gO[i].getAttribute('id')]=iI;}else if(gO[i].nodeName=="StyleMap"){var fV=gO[i].childNodes;var iI=new Object();for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="Pair"){var gV=fV[j].childNodes;var iF="";var jp="";for(var k=0;k<gV.length;k++){if(gV[k].nodeName=="key"){iF=gV[k].childNodes[0].nodeValue;}else if(gV[k].nodeName=="styleUrl"){jp=gV[k].childNodes[0].nodeValue;}}}if(iF!=""&&jp!=""){iI[iF]=jp;}}io["#"+gO[i].getAttribute('id')]=iI;}else if(gO[i].nodeName=="Placemark"){l.fg(l,gO[i],jx,io,kl,il,jX,ee,dn);}else if(gO[i].nodeName=="Folder"){l.eK("0",l,gO[i],jx,io,kl,il,jX,ee,dn);}else if(gO[i].nodeName=="Document"){l.eK("1",l,gO[i],jx,io,kl,il,jX,ee,dn);}}};zhomPathParser.prototype.eR=function(l,lp,il,jX,gm,jj,au,iz,jV,kC,js,jt,lj,kK,kc,ky,mk,ks,ee,dn){var mw=l;var ak=mw.map;var gA=mw.kM;var gb=il;var aG=ee;var cv=dn;var bi;var aV;var fV=lp.childNodes;var mr="";var fj=[];var hZ=new Object();var hN={};var fD;var el;var dY="";var eS="";var kf="";for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="coordinates"){mr=fV[j].childNodes[0].nodeValue;}}if(mr!=""){fj=mr.replace(/\r?\n/g," ");fj=fj.split(",");if(gm!=""){hZ.title=gm;}hN=JSON.parse(JSON.stringify(hZ));dY=fj[1];eS=fj[0];dY=dY.trim();eS=eS.trim();dY=Number(dY);eS=Number(eS);var bd=L.marker(L.latLng(dY,eS),hN);if(au!=""){var ev=new Image();ev.onload=function(){var dW;dW=this.width*iz/2;var fJ=dW+jV;var ef=this.height*iz+kC;fD=L.icon({iconUrl:au,iconSize:[this.width*iz,this.height*iz],iconAnchor:[fJ,ef]});bd.setIcon(fD);if(js!=""){bd.on('mouseout',function(event){bd.setIcon(fD);});}};ev.src=au;}if(kc=="0"){if(ky=="0"){}else if(ky=="1"){if(gm!=""){bd.bindPopup(gm);}}else if(ky=="2"){if(jj!=""){bd.bindPopup(jj);}}else if(ky=="3"){if(jj!=""){bd.bindPopup(jj);}else if(gm!=""){bd.bindPopup(gm);}}else if(ky=="5"){if(gm!=""){kf+="<div class=\"placemarkHead pathPlacemarkHead\">"+gm+"</div>";}if(jj!=""){kf+="<div class=\"placemarkBody pathPlacemarkBody\">"+jj+"</div>";}if(kf!=""){bd.bindPopup(kf);}}}if(mk=="0"){}else if(mk=="1"){if(gm!=""){if(mw.R=="10"){bd.bindTooltip(gm,{sticky:true});}else{bd.bindTooltip(gm);}}}else if(mk=="2"){if(jj!=""){if(mw.R=="10"){bd.bindTooltip(jj,{sticky:true});}else{bd.bindTooltip(jj);}}}else if(mk=="3"){if(jj!=""){if(mw.R=="10"){bd.bindTooltip(jj,{sticky:true});}else{bd.bindTooltip(jj);}}else if(gm!=""){if(mw.R=="10"){bd.bindTooltip(gm,{sticky:true});}else{bd.bindTooltip(gm);}}}if(js!=""){var ir=new Image();ir.onload=function(){var dW;dW=this.width*jt/2;var fJ=dW+lj;var ef=this.height*jt+kK;el=L.icon({iconUrl:js,iconSize:[this.width*jt,this.height*jt],iconAnchor:[fJ,ef]});bd.on('mouseover',function(event){bd.setIcon(el);});};ir.src=js;}aV=ks;if(aV!==""){gA.PlacemarkAdd(aV,-1,bd,null);if((typeof aG[aV]!=='undefined')&&(aG[aV]!=null)){aG[aV]+=1;bi=cv[aV];bi.push(bd);cv[aV]=bi;}else{aG[aV]=1;cv[aV]=[bd];}}else{bd.addTo(ak);}jX.push(bd.getLatLng());}};zhomPathParser.prototype.eg=function(l,lp,kl,il,jX,gm,jj,kT,lm,ke,ll,kc,lb,kj){var mw=l;var ak=mw.map;var gb=il;var mr="";var ez=[];var fj=[];var ei=[];var eI="";var hZ=new Object();var hN={};var mo="0";var nt="";var nv="";var mG="";var lW="";var dY="";var eS="";var kE=0;var jL="";var jU;var kf="";var fV=lp.childNodes;var ly="0";var ly=mw.jI;var kW=mw.lB;var lv=mw.jG;if(typeof kl["elevationPosition"]!=='undefined'){ly=kl["elevationPosition"];}if(typeof kl["overrideStyles"]!=='undefined'){mo=kl["overrideStyles"];}if(typeof kl["overrideStyles_line_color"]!=='undefined'){nt=kl["overrideStyles_line_color"];}if(typeof kl["overrideStyles_line_width"]!=='undefined'){nv=kl["overrideStyles_line_width"];}if(typeof kl["overrideStyles_line_opacity"]!=='undefined'){mG=kl["overrideStyles_line_opacity"];}if(typeof kl["overrideStyles_hover_line_color"]!=='undefined'){lW=kl["overrideStyles_hover_line_color"];}for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="coordinates"){mr=fV[j].childNodes[0].nodeValue;}}if(mr!=""){ez=mr.replace(/\r?\n/g," ");ez=ez.split(" ");for(var x=0;x<ez.length;x++){eI=ez[x];eI=eI.trim();if(eI!=""){fj=ez[x].split(",");dY=fj[1];eS=fj[0];dY=dY.trim();eS=eS.trim();if(dY!=""&&eS!=""){dY=Number(dY);eS=Number(eS);jL=new L.LatLng(dY,eS);jL.meta={time:null,ele:null,hr:null,cad:null,atemp:null};kE=0;kE=fj[2];if(kE.length>0){jL.meta.ele=Number(kE);}ei.push(jL);}}}if(mo!=""&&mo!="0"){if(nt!=""){hZ.color=nt;}else{if(kT!=""){if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}}}if(nv!=""){hZ.weight=nv;}else{if(lm!=""){hZ.weight=lm;}}if(mG!=""){hZ.opacity=mG;}}else{if(kT!=""){if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}}if(lm!=""){hZ.weight=lm;}}hN=JSON.parse(JSON.stringify(hZ));var iB=L.polyline(ei,hN);if(kc=="0"){if(lb=="0"){}else if(lb=="1"){if(gm!=""){iB.bindPopup(gm);}}else if(lb=="2"){if(jj!=""){iB.bindPopup(jj);}}else if(lb=="3"){if(jj!=""){iB.bindPopup(jj);}else if(gm!=""){iB.bindPopup(gm);}}else if(lb=="5"){if(gm!=""){kf+="<div class=\"pathHead pathPolylineHead\">"+gm+"</div>";}if(jj!=""){kf+="<div class=\"pathBody pathPolylineBody\">"+jj+"</div>";}if(kf!=""){iB.bindPopup(kf);}}}if(kj=="0"){}else if(kj=="1"){if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}else if(kj=="2"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}}else if(kj=="3"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}else if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}if((ke!=""||ll!="")||(mo!=""&&mo!="0"&&lW!="")){var jb=new Object();var jv={};if(mo!=""&&mo!="0"){if(lW!=""){jb.color=lW;}else{if(ke!=""){if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}}}else{if(ke!=""){if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}}if(ll!=""){jb.weight=ll;}jv=JSON.parse(JSON.stringify(jb));iB.on('mouseover',function(event){iB.setStyle(jv);});iB.on('mouseout',function(event){iB.setStyle(hN);});}if(ly!="0"){gb.zhomElevation=1;gb.zhomElevationObject=kW;}else{gb.zhomElevation=0;}gb.addLayer(iB);if(ly!="0"){kW.addData(iB);kW._updateSummary();}}};zhomPathParser.prototype.fw=function(l,lp,kl,il,jX,gm,jj,kT,lm,ke,ll,kc,lb,kj){var mw=l;var ak=mw.map;var gb=il;var mr="";var ez=[];var ei=[];var hZ=new Object();var hN={};var mo="0";var nt="";var nv="";var mG="";var lW="";var dY="";var eS="";var kE=0;var jL="";var jU;var kf="";var fV=lp.childNodes;var ly="0";var ly=mw.jI;var kW=mw.lB;var lv=mw.jG;if(typeof kl["elevationPosition"]!=='undefined'){ly=kl["elevationPosition"];}if(typeof kl["overrideStyles"]!=='undefined'){mo=kl["overrideStyles"];}if(typeof kl["overrideStyles_line_color"]!=='undefined'){nt=kl["overrideStyles_line_color"];}if(typeof kl["overrideStyles_line_width"]!=='undefined'){nv=kl["overrideStyles_line_width"];}if(typeof kl["overrideStyles_line_opacity"]!=='undefined'){mG=kl["overrideStyles_line_opacity"];}if(typeof kl["overrideStyles_hover_line_color"]!=='undefined'){lW=kl["overrideStyles_hover_line_color"];}for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="gx:coord"){mr=fV[j].childNodes[0].nodeValue;if(mr!=""){ez=mr.replace(/\r?\n/g," ");ez=ez.split(" ");for(var x=0;x<ez.length;x++){dY=ez[1];eS=ez[0];dY=dY.trim();eS=eS.trim();if(dY!=""&&eS!=""){dY=Number(dY);eS=Number(eS);jL=new L.LatLng(dY,eS);jL.meta={time:null,ele:null,hr:null,cad:null,atemp:null};kE=0;kE=ez[2];if(kE.length>0){jL.meta.ele=Number(kE);}ei.push(jL);}}}}}if(ei.length>0){if(mo!=""&&mo!="0"){if(nt!=""){hZ.color=nt;}else{if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}}if(nv!=""){hZ.weight=nv;}else{if(lm!=""){hZ.weight=lm;}}if(mG!=""){hZ.opacity=mG;}}else{if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}if(lm!=""){hZ.weight=lm;}}hN=JSON.parse(JSON.stringify(hZ));var iB=L.polyline(ei,hN);if(kc=="0"){if(lb=="0"){}else if(lb=="1"){if(gm!=""){iB.bindPopup(gm);}}else if(lb=="2"){if(jj!=""){iB.bindPopup(jj);}}else if(lb=="3"){if(jj!=""){iB.bindPopup(jj);}else if(gm!=""){iB.bindPopup(gm);}}else if(lb=="5"){if(gm!=""){kf+="<div class=\"pathHead pathPolylineHead\">"+gm+"</div>";}if(jj!=""){kf+="<div class=\"pathBody pathPolylineBody\">"+jj+"</div>";}if(kf!=""){iB.bindPopup(kf);}}}if(kj=="0"){}else if(kj=="1"){if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}else if(kj=="2"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}}else if(kj=="3"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}else if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}if((ke!=""||ll!="")||(mo!=""&&mo!="0"&&lW!="")){var jb=new Object();var jv={};if(mo!=""&&mo!="0"){if(lW!=""){jb.color=lW;}else{if(ke!=""){if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}}}else{if(ke!=""){if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}}if(ll!=""){jb.weight=ll;}jv=JSON.parse(JSON.stringify(jb));iB.on('mouseover',function(event){iB.setStyle(jv);});iB.on('mouseout',function(event){iB.setStyle(hN);});}if(ly!="0"){gb.zhomElevation=1;gb.zhomElevationObject=kW;}else{gb.zhomElevation=0;}gb.addLayer(iB);if(ly!="0"){kW.addData(iB);kW._updateSummary();}}};zhomPathParser.prototype.fi=function(l,lp,kl,il,jX,gm,jj,kT,lm,ke,ll,jJ,kQ,kO,kn,kz,ka,kc,lc,jH){var mw=l;var ak=mw.map;var gb=il;var mr="";var ez=[];var fj=[];var dX=[];var eI="";var hZ=new Object();var hN={};var mo="0";var nt="";var nv="";var mG="";var lW="";var na="";var lM="";var dY="";var eS="";var jU;var kf="";var eY=[];var eN=[];var fa=[];if(typeof kl["overrideStyles"]!=='undefined'){mo=kl["overrideStyles"];}if(typeof kl["overrideStyles_line_color"]!=='undefined'){nt=kl["overrideStyles_line_color"];}if(typeof kl["overrideStyles_line_width"]!=='undefined'){nv=kl["overrideStyles_line_width"];}if(typeof kl["overrideStyles_line_opacity"]!=='undefined'){mG=kl["overrideStyles_line_opacity"];}if(typeof kl["overrideStyles_hover_line_color"]!=='undefined'){lW=kl["overrideStyles_hover_line_color"];}if(typeof kl["overrideStyles_fill_color"]!=='undefined'){na=kl["overrideStyles_fill_color"];}if(typeof kl["overrideStyles_hover_fill_color"]!=='undefined'){lM=kl["overrideStyles_hover_fill_color"];}if(typeof kl["overrideStyles_fill_opacity"]!=='undefined'){me=kl["overrideStyles_fill_opacity"];}var hU=lp.childNodes;for(var b=0;b<hU.length;b++){if(hU[b].nodeName=="outerBoundaryIs"||hU[b].nodeName=="innerBoundaryIs"){var hh=hU[b].childNodes;for(var r=0;r<hh.length;r++){if(hh[r].nodeName=="LinearRing"){var fV=hh[r].childNodes;for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="coordinates"){mr=fV[j].childNodes[0].nodeValue;}}if(mr!=""){ez=mr.replace(/\r?\n/g," ");ez=ez.split(" ");for(var x=0;x<ez.length;x++){eI=ez[x];eI=eI.trim();if(eI!=""){fj=ez[x].split(",");dY=fj[1];eS=fj[0];dY=dY.trim();eS=eS.trim();if(dY!=""&&eS!=""){dY=Number(dY);eS=Number(eS);if(hU[b].nodeName=="outerBoundaryIs"){dX.push([dY,eS]);}else if(hU[b].nodeName=="innerBoundaryIs"){eY.push([dY,eS]);}}}}}if(hU[b].nodeName=="innerBoundaryIs"){eN.push(eY);eY=[];}}}}}if(dX.length!=0){if(mo!=""&&mo!="0"){if(nt!=""){hZ.color=nt;hZ.stroke=true;}else{if(kO==""||kO=="1"){if(kT!=""||lm!=""){if(kT!=""){hZ.stroke=true;if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}}if(lm!=""){hZ.stroke=true;hZ.weight=lm;}if(nv!=""){hZ.weight=nv;}if(mG!=""){hZ.opacity=mG;}}else{hZ.stroke=false;}}else{hZ.stroke=false;}}if(mG!=""){hZ.opacity=mG;}if(nv!=""){hZ.weight=nv;}}else{if(kO==""||kO=="1"){if(kT!=""||lm!=""){if(kT!=""){hZ.stroke=true;if(kT.length==8){hZ.color="#"+kT.substr(0,6);jU=parseInt(kT.substr(6,2),16)/255;hZ.opacity=jU.toFixed(2);}else{hZ.color="#"+kT;hZ.opacity=1;}}if(lm!=""){hZ.stroke=true;hZ.weight=lm;}}else{hZ.stroke=false;}}else{hZ.stroke=false;}}if(mo!=""&&mo!="0"){if(na!=""){hZ.fill=true;hZ.fillColor=na;}else{if(jJ!=""){if(kQ==""||kQ=="1"){if(jJ!=""){hZ.fill=true;if(jJ.length==8){hZ.fillColor="#"+jJ.substr(0,6);jU=parseInt(jJ.substr(6,2),16)/255;hZ.fillOpacity=jU.toFixed(2);}else{hZ.fillColor="#"+jJ;hZ.fillOpacity=1;}}else{hZ.fill=false;}}else{hZ.fill=false;}}}if(me!=""){hZ.fillOpacity=me;}}else{if(kQ==""||kQ=="1"){if(jJ!=""){hZ.fill=true;if(jJ.length==8){hZ.fillColor="#"+jJ.substr(0,6);jU=parseInt(jJ.substr(6,2),16)/255;hZ.fillOpacity=jU.toFixed(2);}else{hZ.fillColor="#"+jJ;hZ.fillOpacity=1;}}else{hZ.fill=false;}}else{hZ.fill=false;}}if(eN.length!=0){fa.push(dX);for(var i=0;i<eN.length;i++){fa.push(eN[i]);}}else{fa=dX;}hN=JSON.parse(JSON.stringify(hZ));var iB=L.polygon(fa,hN);if(kc=="0"){if(lc=="0"){}else if(lc=="1"){if(gm!=""){iB.bindPopup(gm);}}else if(lc=="2"){if(jj!=""){iB.bindPopup(jj);}}else if(lc=="3"){if(jj!=""){iB.bindPopup(jj);}else if(gm!=""){iB.bindPopup(gm);}}else if(lc=="5"){if(gm!=""){kf+="<div class=\"pathHead pathPolygonHead\">"+gm+"</div>";}if(jj!=""){kf+="<div class=\"pathBody pathPolygonBody\">"+jj+"</div>";}if(kf!=""){iB.bindPopup(kf);}}}if(jH=="0"){}else if(jH=="1"){if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}else if(jH=="2"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}}else if(jH=="3"){if(jj!=""){if(mw.R=="10"){iB.bindTooltip(jj,{sticky:true});}else{iB.bindTooltip(jj);}}else if(gm!=""){if(mw.R=="10"){iB.bindTooltip(gm,{sticky:true});}else{iB.bindTooltip(gm);}}}if((ke!=""||ll!=""||kn!="")||(mo!=""&&mo!="0"&&lW!="")){var jb=new Object();var jv={};if(mo!=""&&mo!="0"){if(lW!=""){jb.color=lW;jb.stroke=true;}else{if(ke!=""||ll!=""){if(ka==""||ka=="1"){if(ke!=""||ll!=""){if(ke!=""){jb.stroke=true;if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}if(ll!=""){jb.stroke=true;jb.weight=ll;}}else{jb.stroke=false;}}else{jb.stroke=false;}}}}else{if(ka==""||ka=="1"){if(ke!=""||ll!=""){if(ke!=""){jb.stroke=true;if(ke.length==8){jb.color="#"+ke.substr(0,6);jU=parseInt(ke.substr(6,2),16)/255;jb.opacity=jU.toFixed(2);}else{jb.color="#"+ke;jb.opacity=1;}}if(ll!=""){jb.stroke=true;jb.weight=ll;}}else{jb.stroke=false;}}else{jb.stroke=false;}}if(mo!=""&&mo!="0"){if(lM!=""){jb.fill=true;jb.fillColor=lM;}else{if(kn!=""){if(kz==""||kz=="1"){if(kn!=""){jb.fill=true;if(kn.length==8){jb.fillColor="#"+kn.substr(0,6);jU=parseInt(kn.substr(6,2),16)/255;jb.fillOpacity=jU.toFixed(2);}else{jb.fillColor="#"+kn;jb.fillOpacity=1;}}else{jb.fill=false;}}else{jb.fill=false;}}}}else{if(kz==""||kz=="1"){if(kn!=""){if(kn.length==8){jb.fillColor="#"+kn.substr(0,6);jU=parseInt(kn.substr(6,2),16)/255;jb.fillOpacity=jU.toFixed(2);}else{jb.fillColor="#"+kn;jb.fillOpacity=1;}}else{jb.fill=false;}}else{jb.fill=false;}}jv=JSON.parse(JSON.stringify(jb));iB.on('mouseover',function(event){iB.setStyle(jv);});iB.on('mouseout',function(event){iB.setStyle(hN);});}gb.addLayer(iB);}};zhomPathParser.prototype.fg=function(l,lp,lf,lh,kl,il,jX,ee,dn){var mw=l;var gO=lp.childNodes;var hV="";var iy="";var ey="";var fG="";var hz="";var eO="";var ew="";var fb="";var gj="";var fN="";var im="";var jR="";var ku="";var jf="";var kv="";var jN="";var ik="0";var jB="2";var jC="2";var jd="2";var lQ="0";var iR="1";var hW="1";var hs="";var ih;var ge;var iG;var jY=0;var jZ=0;var jS=0;var kA="";var lA=0;var lu=0;var kH=0;var kG=0;if(typeof kl==='undefined'){}else{if(typeof kl["suppressPopup"]!=='undefined'){ik=kl["suppressPopup"];}if(typeof kl["popupPlacemark"]!=='undefined'){jB=kl["popupPlacemark"];}if(typeof kl["popupPolyline"]!=='undefined'){jC=kl["popupPolyline"];}if(typeof kl["popupPolygon"]!=='undefined'){jd=kl["popupPolygon"];}if(typeof kl["tooltipPlacemark"]!=='undefined'){lQ=kl["tooltipPlacemark"];}if(typeof kl["tooltipPolyline"]!=='undefined'){iR=kl["tooltipPolyline"];}if(typeof kl["tooltipPolygon"]!=='undefined'){hW=kl["tooltipPolygon"];}if(typeof kl["controlByGroupListGroup"]!=='undefined'){hs=kl["controlByGroupListGroup"];}}for(var i=0;i<gO.length;i++){ih=gO[i].childNodes[0];if(typeof ih!=='undefined'){ge=ih.nodeValue;}else{ge=null;}if(gO[i].nodeName=="name"){hV=ge;}else if(gO[i].nodeName=="description"){iy=ge;}else if(gO[i].nodeName=="styleUrl"){if(typeof ge!=='undefined'&&ge!=null){if(ge!=""){iG=null;if(typeof lf[ge]!=='undefined'){iG=ge;if(typeof lf[iG]!=='undefined'&&iG!=null){if(typeof lf[iG].icon!=='undefined'){ey=lf[iG].icon;}if(typeof lf[iG].line_color!=='undefined'){hz=lf[iG].line_color;}if(typeof lf[iG].line_width!=='undefined'){eO=lf[iG].line_width;}if(typeof lf[iG].scale!=='undefined'){fG=lf[iG].scale;}if(typeof lf[iG].polygon_color!=='undefined'){im=lf[iG].polygon_color;}if(typeof lf[iG].polygon_fill!=='undefined'){jR=lf[iG].polygon_fill;}if(typeof lf[iG].polygon_outline!=='undefined'){ku=lf[iG].polygon_outline;}}else{console.log("Unprocessed style: "+iG);}}else if(typeof lh[ge]!=='undefined'){var jz=lh[ge];if(typeof jz["normal"]!=='undefined'){iG=jz["normal"];if(typeof lf[iG]!=='undefined'&&iG!=null){if(typeof lf[iG].icon!=='undefined'){ey=lf[iG].icon;}if(typeof lf[iG].line_color!=='undefined'){hz=lf[iG].line_color;}if(typeof lf[iG].line_width!=='undefined'){eO=lf[iG].line_width;}if(typeof lf[iG].scale!=='undefined'){fG=lf[iG].scale;}if(typeof lf[iG].polygon_color!=='undefined'){im=lf[iG].polygon_color;}if(typeof lf[iG].polygon_fill!=='undefined'){jR=lf[iG].polygon_fill;}if(typeof lf[iG].polygon_outline!=='undefined'){ku=lf[iG].polygon_outline;}}else{console.log("Unprocessed style map for normal style: "+iG);}}if(typeof jz["highlight"]!=='undefined'){iG=jz["highlight"];if(typeof lf[iG]!=='undefined'&&iG!=null){if(typeof lf[iG].icon!=='undefined'){ew=lf[iG].icon;}if(typeof lf[iG].line_color!=='undefined'){gj=lf[iG].line_color;}if(typeof lf[iG].line_width!=='undefined'){fN=lf[iG].line_width;}if(typeof lf[iG].scale!=='undefined'){fb=lf[iG].scale;}if(typeof lf[iG].polygon_color!=='undefined'){jf=lf[iG].polygon_color;}if(typeof lf[iG].polygon_fill!=='undefined'){kv=lf[iG].polygon_fill;}if(typeof lf[iG].polygon_outline!=='undefined'){jN=lf[iG].polygon_outline;}}else{console.log("Unprocessed style map for highlight style: "+iG);}}}else{console.log("Unprocessed style on document: "+ge);}}}else{console.log("Unprocessed first node: "+ih.nodeName+ih.nodeValue);}}else if(gO[i].nodeName=="Point"){var fE=fG;if(fE==""){fE=1;}var fz=fb;if(fz==""){fz=1;}if(typeof kl==='undefined'){}else{if(typeof kl["overrideMarkerIcon"]!=='undefined'){jY=kl["overrideMarkerIcon"];}if(typeof kl["groupIconOfsetX"]!=='undefined'){jZ=kl["groupIconOfsetX"];}if(typeof kl["groupIconOfsetY"]!=='undefined'){jS=kl["groupIconOfsetY"];}if(typeof kl["groupIconType"]!=='undefined'){kA=kl["groupIconType"];}}if(jY==1){ey=kA;lA=jZ;lu=jS;fE=1;ew="";kH=0;kG=0;fz=1;}mw.eR(l,gO[i],il,jX,hV,iy,ey,fE,lA,lu,ew,fz,kH,kG,ik,jB,lQ,hs,ee,dn);}else if(gO[i].nodeName=="MultiGeometry"){var hH=gO[i].childNodes;for(var k=0;k<hH.length;k++){if(hH[k].nodeName=="LineString"){mw.eg(l,hH[k],kl,il,jX,hV,iy,hz,eO,gj,fN,ik,jC,iR);}else if(hH[k].nodeName=="Polygon"){mw.fi(l,hH[k],kl,il,jX,hV,iy,hz,eO,gj,fN,im,jR,ku,jf,kv,jN,ik,jd,hW);}}}else if(gO[i].nodeName=="LineString"){mw.eg(l,gO[i],kl,il,jX,hV,iy,hz,eO,gj,fN,ik,jC,iR);}else if(gO[i].nodeName=="Polygon"){mw.fi(l,gO[i],kl,il,jX,hV,iy,hz,eO,gj,fN,im,jR,ku,jf,kv,jN,ik,jd,hW);}else if(gO[i].nodeName=="MultiTrack"){var hH=gO[i].childNodes;for(var k=0;k<hH.length;k++){if(hH[k].nodeName=="gx:Track"){mw.fw(l,hH[k],kl,il,jX,hV,iy,hz,eO,gj,fN,ik,jC,iR);}}}else if(gO[i].nodeName=="gx:Track"){mw.fw(l,gO[i],kl,il,jX,hV,iy,hz,eO,gj,fN,ik,jC,iR);}}};zhomPathParser.prototype.kml=function(t,kl){var ej="0";var mw=this;var ak=mw.map;var aG=[];var cv=[];if(typeof kl["fitMapBounds"]!=='undefined'){ej=kl["fitMapBounds"];}var fZ=L.featureGroup();this.dZ(mw,t,kl,ej,fZ,aG,cv);return fZ;};zhomPathParser.prototype.dZ=function(l,lp,kl,kZ,il,ee,dn){var bw=lp;var hS="";var mw=l;var ak=mw.map;var gA=mw.kM;var ae=mw.aj;var kw=[];var ly="0";if(typeof kl["elevationPosition"]!=='undefined'){ly=kl["elevationPosition"];}if(bw!=""){if(bw.substr(0,1)=="/"){hS=this.bV+bw.substr(1);}else if(bw.substr(0,5).toUpperCase()=="HTTP:"||bw.substr(0,6).toUpperCase()=="HTTPS:"){hS=bw;}else{hS=this.bV+bw;}}if(hS!=""){ae.ajax({type:"get",url:hS,dataType:"xml",success:function(data){var kN;if(ly!="0"){kN=mw.kB(mw,kl);kN.addTo(ak);}mw.fe(mw,data,kl,il,kw,ee,dn);gA.bX(ee,dn);if(kZ=="1"){var km;if(kw.length==0){km=il.getBounds();}else{km=L.latLngBounds(kw);km.extend(il.getBounds());}ak.fitBounds(km);}},error:function(xhr,status){alert("Unable get file: "+hS+" :"+status);}});}};zhomPathParser.prototype.gpx=function(t,kl){var ej="0";var aG=[];var cv=[];var mw=this;var ak=mw.map;if(typeof kl["fitMapBounds"]!=='undefined'){ej=kl["fitMapBounds"];}var fZ=L.featureGroup();this.bo(mw,t,kl,ej,fZ,aG,cv);return fZ;};zhomPathParser.prototype.kB=function(l,kl){var mw=l;var gA=mw.kM;mw.kV+=1;var kW;var ly="0";var hZ=new Object();var hN={};if(typeof kl["elevation_div"]!=='undefined'){hZ.elevationDiv=kl["elevation_div"];}hZ.almostOver=true;if(typeof kl["elevationPosition"]!=='undefined'){ly=kl["elevationPosition"];switch(ly){case 100:hZ.position="topleft";hZ.detached=true;hZ.closeBtn=false;break;case 2:hZ.position="topleft";hZ.detached=false;hZ.closeBtn=true;break;case 3:hZ.position="topright";hZ.detached=false;hZ.closeBtn=true;break;case 11:hZ.position="bottomleft";hZ.detached=false;hZ.closeBtn=true;break;case 12:hZ.position="bottomright";hZ.detached=false;hZ.closeBtn=true;break;default:hZ.position="topleft";hZ.detached=true;hZ.closeBtn=false;break;}mw.jI=ly;hZ.skipNullZCoords=true;hZ.legend=false;hZ.polyline={className:''};if(typeof kl["elevation_width"]!=='undefined'){if(kl["elevation_width"]!=""){hZ.width=Number(kl["elevation_width"]);}}if(typeof kl["elevation_height"]!=='undefined'){if(kl["elevation_height"]!=""){hZ.height=Number(kl["elevation_height"]);}}if(typeof kl["y_min_value"]!=='undefined'){if(kl["y_min_value"]!=""){hZ.yAxisMin=Number(kl["y_min_value"]);}}if(typeof kl["y_max_value"]!=='undefined'){if(kl["y_max_value"]!=""){hZ.yAxisMax=Number(kl["y_max_value"]);}}if(typeof kl["x_gridline_count"]!=='undefined'){if(kl["x_gridline_count"]!=""){hZ.xTicks=Number(kl["x_gridline_count"]);}}if(typeof kl["y_gridline_count"]!=='undefined'){if(kl["y_gridline_count"]!=""){hZ.yTicks=Number(kl["y_gridline_count"]);}}if(typeof kl["elevation_follow"]!=='undefined'){if(kl["elevation_follow"]==0){hZ.followMarker=false;}else{hZ.followMarker=true;}hZ.zFollow=mw.map.getZoom();}else{hZ.followMarker=true;}if(typeof kl["elevation_unitsystem"]!=='undefined'){if(kl["elevation_unitsystem"]==2){hZ.imperial=true;}else{hZ.imperial=false;}}else{hZ.imperial=false;}if(typeof kl["elevation_showtime"]!=='undefined'){if(kl["elevation_showtime"]==1){hZ.time=true;}else{hZ.time=false;}}else{hZ.time=false;}if(typeof kl["elevation_theme"]!=='undefined'){var kU="";switch(kl["elevation_theme"]){case 0:kU="lightblue";break;case 1:kU="lime";break;case 2:kU="steelblue";break;case 3:kU="purple";break;case 4:kU="yellow";break;case 5:kU="red";break;case 6:kU="magenta";break;case 7:kU="lightblue";break;default:kU="lightblue";break;}var unmin_v=kU;
unmin_v = unmin_v + "-theme";
hZ.theme=unmin_v;mw.jG=hZ.theme;}if(typeof kl["elevation_summary"]!=='undefined'){switch(kl["elevation_summary"]){case 0:hZ.summary=false;break;case 1:hZ.summary="inline";break;case 2:hZ.summary="multiline";break;default:hZ.summary=false;break;}}hN=JSON.parse(JSON.stringify(hZ));}if(ly!="0"){kW=L.control.elevation(hN);kW.zhomElevationIndex=mw.kV;mw.lB=kW;}return kW;};zhomPathParser.prototype.bo=function(l,lp,kl,kZ,il,ee,dn){var bw=lp;var hS="";var mw=l;var ak=mw.map;var gA=mw.kM;var ae=mw.aj;var kw=[];var ly="0";if(typeof kl["elevationPosition"]!=='undefined'){ly=kl["elevationPosition"];}if(bw!=""){if(bw.substr(0,1)=="/"){hS=this.bV+bw.substr(1);}else if(bw.substr(0,5).toUpperCase()=="HTTP:"||bw.substr(0,6).toUpperCase()=="HTTPS:"){hS=bw;}else{hS=this.bV+bw;}}if(hS!=""){ae.ajax({type:"get",url:hS,dataType:"xml",success:function(data){var kN;if(ly!="0"){kN=mw.kB(mw,kl);kN.addTo(ak);}mw.en(mw,data,kl,il,kw,ee,dn);gA.bX(ee,dn);if(kZ=="1"){var km;if(kw.length==0){km=il.getBounds();}else{km=L.latLngBounds(kw);km.extend(il.getBounds());}ak.fitBounds(km);}},error:function(xhr,status){alert("Unable get file: "+hS+" :"+status);}});}};zhomPathParser.prototype.en=function(l,lp,kl,il,jX,ee,dn){var mw=l;var iC=lp;var ik="0";var jB="2";var jC="2";var jd="2";var lQ="0";var iR="1";var hW="1";var mo="0";var nt="";var nv="";var mG="";var lW="";var jY=0;var jZ=0;var jS=0;var kA="";var lA=0;var lu=0;var kH=0;var kG=0;var ey="";var fG=1;var ew="";var fb=1;var hs="";if(typeof kl==='undefined'){}else{if(typeof kl["suppressPopup"]!=='undefined'){ik=kl["suppressPopup"];}if(typeof kl["popupPlacemark"]!=='undefined'){jB=kl["popupPlacemark"];}if(typeof kl["popupPolyline"]!=='undefined'){jC=kl["popupPolyline"];}if(typeof kl["popupPolygon"]!=='undefined'){jd=kl["popupPolygon"];}if(typeof kl["tooltipPlacemark"]!=='undefined'){lQ=kl["tooltipPlacemark"];}if(typeof kl["tooltipPolyline"]!=='undefined'){iR=kl["tooltipPolyline"];}if(typeof kl["tooltipPolygon"]!=='undefined'){hW=kl["tooltipPolygon"];}if(typeof kl["controlByGroupListGroup"]!=='undefined'){hs=kl["controlByGroupListGroup"];}if(typeof kl["overrideStyles"]!=='undefined'){mo=kl["overrideStyles"];}if(typeof kl["overrideStyles_line_color"]!=='undefined'){nt=kl["overrideStyles_line_color"];}if(typeof kl["overrideStyles_line_width"]!=='undefined'){nv=kl["overrideStyles_line_width"];}if(typeof kl["overrideStyles_line_opacity"]!=='undefined'){mG=kl["overrideStyles_line_opacity"];}if(typeof kl["overrideStyles_hover_line_color"]!=='undefined'){lW=kl["overrideStyles_hover_line_color"];}}if(iC.documentElement.nodeName=="gpx"){var gO=iC.documentElement.childNodes;for(var i=0;i<gO.length;i++){if(gO[i].nodeName!="#text"){if(gO[i].nodeName=="trk"){mw.ag(l,gO[i],il,jX,ik,jC,iR,mo,nt,nv,mG,lW);}else if(gO[i].nodeName=="wpt"){if(typeof kl==='undefined'){}else{if(typeof kl["overrideMarkerIcon"]!=='undefined'){jY=kl["overrideMarkerIcon"];}if(typeof kl["groupIconOfsetX"]!=='undefined'){jZ=kl["groupIconOfsetX"];}if(typeof kl["groupIconOfsetY"]!=='undefined'){jS=kl["groupIconOfsetY"];}if(typeof kl["groupIconType"]!=='undefined'){kA=kl["groupIconType"];}}fG=1;fb=1;var fE=fG;if(fE==""){fE=1;}var fz=fb;if(fz==""){fz=1;}if(jY==1){ey=kA;lA=jZ;lu=jS;fE=1;ew="";kH=0;kG=0;fz=1;}mw.ff(l,gO[i],il,jX,ey,fE,lA,lu,ew,fz,kH,kG,ik,jB,lQ,hs,ee,dn,jY,mw.jW);}else if(gO[i].nodeName=="rte"){if(typeof kl==='undefined'){}else{if(typeof kl["overrideMarkerIcon"]!=='undefined'){jY=kl["overrideMarkerIcon"];}if(typeof kl["groupIconOfsetX"]!=='undefined'){jZ=kl["groupIconOfsetX"];}if(typeof kl["groupIconOfsetY"]!=='undefined'){jS=kl["groupIconOfsetY"];}if(typeof kl["groupIconType"]!=='undefined'){kA=kl["groupIconType"];}}fG=1;fb=1;var fE=fG;if(fE==""){fE=1;}var fz=fb;if(fz==""){fz=1;}if(jY==1){ey=kA;lA=jZ;lu=jS;fE=1;ew="";kH=0;kG=0;fz=1;}var ni=gO[i].childNodes;for(var j=0;j<ni.length;j++){if(ni[j].nodeName!="#text"){if(ni[j].nodeName=="rtept"){mw.ff(l,ni[j],il,jX,ey,fE,lA,lu,ew,fz,kH,kG,ik,jB,lQ,hs,ee,dn,jY,mw.jW);}}}}}}}else{console.log("There is no gpx tag");}};zhomPathParser.prototype.ag=function(l,lp,il,jX,kc,lb,kj,lG,nu,ng,mJ,nb){var mw=l;var ak=mw.map;var gb=il;var hV="";var iy="";var hz="";var eO="";var ei=[];var hZ=new Object();var hN={};var dY="";var eS="";var kE=0;var jL="";var kf="";var ly=mw.jI;var kW=mw.lB;var lv=mw.jG;var gD=lp.childNodes;for(var i=0;i<gD.length;i++){if(gD[i].nodeName=="name"){if(typeof gD[i].childNodes[0]!=='undefined'){hV=gD[i].childNodes[0].nodeValue;}}else if(gD[i].nodeName=="desc"){if(typeof gD[i].childNodes[0]!=='undefined'){iy=gD[i].childNodes[0].nodeValue;}}else if(gD[i].nodeName=="extensions"){var hg=gD[i].childNodes;for(var j=0;j<hg.length;j++){if(hg[j].nodeName=="gpxx:TrackExtension"){var hj=hg[j].childNodes;for(var k=0;k<hj.length;k++){if(hj[k].nodeName=="gpxx:DisplayColor"){hz=hj[k].childNodes[0].nodeValue;}}}}}else if(gD[i].nodeName=="trkseg"){var fV=gD[i].childNodes;for(var j=0;j<fV.length;j++){if(fV[j].nodeName=="trkpt"){kE=0;dY=fV[j].getAttribute("l"+"a"+"t");eS=fV[j].getAttribute("lon");dY=dY.trim();eS=eS.trim();if(dY!=""&&eS!=""){dY=Number(dY);eS=Number(eS);jL=new L.LatLng(dY,eS);jL.meta={time:null,ele:null,hr:null,cad:null,atemp:null};kE=0;kE=fV[j].getElementsByTagName('ele');if(kE.length>0){jL.meta.ele=Number(kE[0].textContent);}ei.push(jL);}}}}if(gD[i].nodeName=="trkseg"){if(ei.length>0){if(lG!=""&&lG!="0"){if(nu!=""){hZ.color=nu;}else{if(hz!=""){hZ.color=hz;}}if(ng!=""){hZ.weight=ng;}else{if(eO!=""){hZ.weight=eO;}}if(mJ!=""){hZ.opacity=mJ;}}else{if(hz!=""){hZ.color=hz;}if(eO!=""){hZ.weight=eO;}}hN=JSON.parse(JSON.stringify(hZ));var iB=L.polyline(ei,hN);if(kc=="0"){if(lb=="0"){}else if(lb=="1"){if(hV!=""){iB.bindPopup(hV);}}else if(lb=="2"){if(iy!=""){iB.bindPopup(iy);}}else if(lb=="3"){if(iy!=""){iB.bindPopup(iy);}else if(hV!=""){iB.bindPopup(hV);}}else if(lb=="5"){if(hV!=""){kf+="<div class=\"pathHead pathPolylineHead\">"+hV+"</div>";}if(iy!=""){kf+="<div class=\"pathBody pathPolylineBody\">"+iy+"</div>";}if(kf!=""){iB.bindPopup(kf);}}}if(kj=="0"){}else if(kj=="1"){if(hV!=""){iB.bindTooltip(hV);}}else if(kj=="2"){if(iy!=""){iB.bindTooltip(iy);}}else if(kj=="3"){if(iy!=""){iB.bindTooltip(iy);}else if(hV!=""){iB.bindTooltip(hV);}}if(nb!=""){iB.zhomLineColor=nu;iB.zhomHoverLineColor=nb;iB.on('mouseover',function(event){var hZ=new Object();var hN={};hZ.color=iB.zhomHoverLineColor;hN=JSON.parse(JSON.stringify(hZ));iB.setStyle(hN);});iB.on('mouseout',function(event){var hZ=new Object();var hN={};hZ.color=iB.zhomLineColor;hN=JSON.parse(JSON.stringify(hZ));iB.setStyle(hN);});}if(ly!="0"){gb.zhomElevation=1;gb.zhomElevationObject=kW;}else{gb.zhomElevation=0;}gb.addLayer(iB);if(ly!="0"){kW.addData(iB);kW._updateSummary();}}}}};zhomPathParser.prototype.ff=function(l,lp,il,jX,au,iz,jV,kC,js,jt,lj,kK,kc,ky,mk,ks,ee,dn,ki,lx){var mw=l;var ak=mw.map;var gA=mw.kM;var gb=il;var aG=ee;var cv=dn;var bi;var aV;var hV="";var iy="";var hZ=new Object();var hN={};var fD;var el;var dY="";var eS="";var kf="";var le="";var kP=1;var kD=0;var kx=0;var gD=lp.childNodes;for(var i=0;i<gD.length;i++){if(gD[i].nodeName=="name"){if(typeof gD[i].childNodes[0]!=='undefined'){hV=gD[i].childNodes[0].nodeValue;}}else if(gD[i].nodeName=="desc"){if(typeof gD[i].childNodes[0]!=='undefined'){iy=gD[i].childNodes[0].nodeValue;}}else if(gD[i].nodeName=="sym"){if(typeof gD[i].childNodes[0]!=='undefined'){le=gD[i].childNodes[0].nodeValue;}}}dY=lp.getAttribute("l"+"a"+"t");eS=lp.getAttribute("lon");dY=dY.trim();eS=eS.trim();if(dY!=""&&eS!=""){dY=Number(dY);eS=Number(eS);if(hV!=""){hZ.title=hV;}hN=JSON.parse(JSON.stringify(hZ));var bd=L.marker(L.latLng(dY,eS),hN);if(ki==1){le=au;kP=iz;kD=jV;kx=kC;}else{le=lx+le+".png";kP=1;kD=0;kx=0;}if(le!=""){var ev=new Image();ev.onload=function(){var dW;dW=this.width*kP/2;var fJ=dW+kD;var ef=this.height*kP+kx;fD=L.icon({iconUrl:le,iconSize:[this.width*kP,this.height*kP],iconAnchor:[fJ,ef]});bd.setIcon(fD);if(js!=""){bd.on('mouseout',function(event){bd.setIcon(fD);});}};ev.src=le;}if(js!=""){var ir=new Image();ir.onload=function(){var dW;dW=this.width*jt/2;var fJ=dW+lj;var ef=this.height*jt+kK;el=L.icon({iconUrl:js,iconSize:[this.width*jt,this.height*jt],iconAnchor:[fJ,ef]});bd.on('mouseover',function(event){bd.setIcon(el);});};ir.src=js;}if(kc=="0"){if(ky=="0"){}else if(ky=="1"){if(hV!=""){bd.bindPopup(hV);}}else if(ky=="2"){if(iy!=""){bd.bindPopup(iy);}}else if(ky=="3"){if(iy!=""){bd.bindPopup(iy);}else if(hV!=""){bd.bindPopup(hV);}}else if(ky=="5"){if(hV!=""){kf+="<div class=\"placemarkHead pathPlacemarkHead\">"+hV+"</div>";}if(iy!=""){kf+="<div class=\"placemarkBody pathPlacemarkBody\">"+iy+"</div>";}if(kf!=""){bd.bindPopup(kf);}}}if(mk=="0"){}else if(mk=="1"){if(hV!=""){if(mw.R=="10"){bd.bindTooltip(hV,{sticky:true});}else{bd.bindTooltip(hV);}}}else if(mk=="2"){if(iy!=""){if(mw.R=="10"){bd.bindTooltip(iy,{sticky:true});}else{bd.bindTooltip(iy);}}}else if(mk=="3"){if(iy!=""){if(mw.R=="10"){bd.bindTooltip(iy,{sticky:true});}else{bd.bindTooltip(iy);}}else if(hV!=""){if(mw.R=="10"){bd.bindTooltip(hV,{sticky:true});}else{bd.bindTooltip(hV);}}}aV=ks;if(aV!==""){gA.PlacemarkAdd(aV,-1,bd,null);if((typeof aG[aV]!=='undefined')&&(aG[aV]!=null)){aG[aV]+=1;bi=cv[aV];bi.push(bd);cv[aV]=bi;}else{aG[aV]=1;cv[aV]=[bd];}}else{bd.addTo(ak);}jX.push(bd.getLatLng());}}; 