(function(){var j=window,k=document,l=Math;function n(a,b){return a.width=b}function o(a,b){return a.position=b}function p(a,b){return a.height=b}function q(a,b){return a.zIndex=b}var r="appendChild",s="createElement",t="getCoordinates",v="getView",w="pushLatLngAlt",x="setTimeout",y="style",z="getFeatures",A="InfoWindow",B="maps",C="setStyleSelector",D="earth",E="prototype",G="setGeometry",H="substring",I="parentNode",J="event";
function K(a){if(!google||!google[D])throw"google.earth not loaded";if(!google[D].isSupported())throw"Google Earth API is not supported on this system";if(!google[D].isInstalled())throw"Google Earth API is not installed on this system";this.l="http://maps.google.com/mapfiles/kml/paddle/red-circle.png";this.b=a;this.k=a.getDiv();this.d=!1;this.e="GoogleEarthAPI";this.f="Earth";this.h={};this.j=null;this.i=0;aa(this);ba(this)}j.GoogleEarth=K;K[E].n=function(){return this.a};K[E].getInstance=K[E].n;
function aa(a){var b=a.b,c={tileSize:new google[B].Size(256,256),maxZoom:19,name:a.f,alt:a.f,getTile:function(a,b,c){return c[s]("DIV")}};b.mapTypes.set(a.e,c);b.setOptions({mapTypeControlOptions:{mapTypeIds:[google[B].MapTypeId.ROADMAP,google[B].MapTypeId.SATELLITE,a.e]}});google[B][J].addListener(b,"maptypeid_changed",function(){if(a.b.getMapTypeId()==a.e){var b;a:{for(var b='title="'+a.f+'"',c=a.c[I].childNodes,e=0,f;f=c[e];e++)if(f.innerHTML.indexOf(b)!=-1){b=f;break a}b=void 0}for(var c=b,e=
c[y].zIndex,f=a.c[I].childNodes,g=0,i;i=f[g];g++)i.__gme_ozi=i[y].zIndex,q(i[y],0);c.__gme_ozi=e;q(a.c[y],q(c[y],2E3));c=a.g=k[s]("IFRAME");c.src="javascript:false;";c.scrolling="no";c.frameBorder="0";e=c[y];q(e,-1E5);n(e,p(e,"100%"));o(e,"absolute");e.left=e.top=0;b[r](c);a.c[y].display="";a.d=!0;a.a?L(a):ca(a)}else da(a)})}
function L(a){a.h={};M(a,!0);for(var b=a.a[z]();b.getFirstChild();)b.removeChild(b.getFirstChild());a.i++;for(var b={},c=N,d=0,h;h=c[d];d++)b[h]=O(a,h);for(c=0;d=b.Marker[c];c++){var e=a;if(d.getPosition()){var h=e.a,f=Q(e,d);d.getTitle()&&f.setName(d.getTitle());var g=h.createIcon("");d.getIcon()?g.setHref(d.getIcon()):g.setHref(e.l);e=h.createStyle("");e.getIconStyle().setIcon(g);f[C](e);e=h.createPoint("");e.setLatitude(d.getPosition().lat());e.setLongitude(d.getPosition().lng());f[G](e);h[z]()[r](f)}}for(c=
0;d=b.Polygon[c];c++){g=a;f=d;d=g.a;h=Q(g,f);e=d.createPolygon("");h[G](e);g=R(g,f);h[C](g);g=d.createLinearRing("");e.setOuterBoundary(g);for(var e=g[t](),f=f.getPath().getArray(),g=0,i=void 0;i=f[g];g++)e[w](i.lat(),i.lng(),0);d[z]()[r](h)}for(c=0;d=b.Polyline[c];c++){e=a;f=d;d=e.a;h=Q(e,f);g=d.createLineString("");g.setTessellate(!0);h[G](g);e=R(e,f);h[C](e);e=g[t]();f=f.getPath().getArray();g=0;for(i=void 0;i=f[g];g++)e[w](i.lat(),i.lng(),0);d[z]()[r](h)}for(c=0;d=b.Rectangle[c];c++){var f=a,
m=d,d=f.a,e=m.getBounds(),h=e.getNorthEast(),e=e.getSouthWest(),g=Q(f,m);g[G](d.createPolygon(""));i=d.createLinearRing("");f=R(f,m);g[C](f);f=i[t]();f[w](h.lat(),h.lng(),0);f[w](h.lat(),e.lng(),0);f[w](e.lat(),e.lng(),0);f[w](e.lat(),h.lng(),0);f[w](h.lat(),h.lng(),0);g.getGeometry().setOuterBoundary(i);g.setName("placemark");d[z]()[r](g)}for(c=0;d=b.Circle[c];c++){i=a;m=d;d=i.a;h=m.getCenter();f=m.getRadius();e=Q(i,m);e[G](d.createPolygon(""));g=d.createLinearRing("");i=R(i,m);e[C](i);for(i=0;i<
25;i++){var P=h,u=f,m=14.4*i;u/=6378137;m*=l.PI/180;var F=P.lat()*(l.PI/180),P=P.lng()*(l.PI/180),V=l.cos(u),u=l.sin(u),W=l.sin(F),F=l.cos(F),X=V*W+u*F*l.cos(m),m=new google[B].LatLng(l.asin(X)/(l.PI/180),(P+l.atan2(u*F*l.sin(m),V-W*X))/(l.PI/180));g[t]()[w](m.lat(),m.lng(),0)}e.getGeometry().setOuterBoundary(g);e.setName("placemark");d[z]()[r](e)}for(c=0;d=b.KmlLayer[c];c++)ea(a,d.getUrl());for(c=0;d=b.GroundOverlay[c];c++)f=d.getBounds(),h=f.getNorthEast(),f=f.getSouthWest(),e=a.a,g=e.createGroundOverlay(""),
g.setLatLonBox(e.createLatLonBox("")),g.getLatLonBox().setBox(h.lat(),f.lat(),h.lng(),f.lng(),0),g.setIcon(e.createIcon("")),g.getIcon().setHref(d.getUrl()),e[z]()[r](g)}
function M(a,b){var c=a.b.getCenter(),d=a.a.createLookAt("");d.setRange(l.pow(2,27-a.b.getZoom()));d.setLatitude(c.lat());d.setLongitude(c.lng());d.setHeading(0);d.setAltitude(0);var h=a.a;b?(h.getOptions().setFlyToSpeed(5),h[v]().setAbstractView(d),d.setTilt(15),h.getOptions().setFlyToSpeed(0.75),j[x](function(){h[v]().setAbstractView(d)},200),j[x](function(){h.getOptions().setFlyToSpeed(1)},250)):h[v]().setAbstractView(d)}
function S(a,b){a[0]=="#"&&(a=a[H](1,9));typeof b=="undefined"?b="FF":(b=parseInt(parseFloat(b)*255,10).toString(16),b.length==1&&(b="0"+b));return[b,a[H](4,6),a[H](2,4),a[H](0,2)].join("")}function Q(a,b){var c=a.i+"GEV3_"+b.__gme_id;a.h[c]=b;return a.a.createPlacemark(c)}function ea(a,b){var c=a.a;google[D].fetchKml(c,b,function(a){a?c[z]()[r](a):j[x](function(){alert("Bad or null KML.")},0)})}
function R(a,b){var c=a.a.createStyle(""),d=c.getPolyStyle(),h=c.getLineStyle();h.setWidth(T(b,"strokeWeight",3));var e=T(b,"strokeOpacity",1),f=T(b,"fillOpacity",0.3),g=T(b,"strokeColor","#000000"),i=T(b,"fillColor","#000000");h.getColor().set(S(g,e));d.getColor().set(S(i,f));return c}function T(a,b,c){a=a.get(b);return typeof a=="undefined"?c:a}
function ca(a){google[D].createInstance(a.m,function(b){a.a=b;fa(a);L(a)},function(b){U(a);a.b.setMapTypeId(google[B].MapTypeId.ROADMAP);throw"Google Earth API failed to initialize: "+b;})}
function fa(a){var b=a.a;b.getWindow().setVisibility(!0);var c=b.getNavigationControl();c.setVisibility(b.VISIBILITY_AUTO);c=c.getScreenXY();c.setYUnits(b.UNITS_INSET_PIXELS);c.setXUnits(b.UNITS_PIXELS);c=b.getLayerRoot();c.enableLayerById(b.LAYER_BORDERS,!0);c.enableLayerById(b.LAYER_ROADS,!0);google[B][J].addListener(a.b,"GEInfoWindowOpened",function(b){if(a.d){var c=a.a.createHtmlStringBalloon("");c.setFeature(a.j);c.setContentString(b.getContent());a.a.setBalloon(c)}});google[D].addEventListener(b.getGlobe(),
"click",function(b){var c=b.getTarget(),e=a.h[c.getId()];if(e){b.preventDefault();for(var b=O(a,"InfoWindow"),f=0,g;g=b[f];f++)g.close();a.j=c;google[B][J].trigger(e,"click")}})}function ga(a){var b=a.a[v]().copyAsLookAt(a.a.ALTITUDE_RELATIVE_TO_GROUND),c=b.getRange(),c=l.round(27-l.log(c)/l.log(2));!a.b.getZoom()==c?a.b.setZoom(c-1):a.b.setZoom(c);a.b.panTo(new google[B].LatLng(b.getLatitude(),b.getLongitude()))}function da(a){a.d&&(ga(a),j[x](function(){M(a)},50),j[x](function(){U(a)},2200))}
function U(a){for(var b=a.c[I].childNodes,c=0,d;d=b[c];c++)d.__gme_ozi&&q(d[y],d.__gme_ozi);a.g[I].removeChild(a.g);a.g=null;a.c[y].display="none";a.d=!1}
function ba(a){var b=a.k,c=a.c=k[s]("DIV");o(c[y],"absolute");n(c[y],0);p(c[y],0);c.index=0;c[y].display="none";var d=a.o=k[s]("DIV");n(d[y],b.clientWidth+"px");p(d[y],b.clientHeight+"px");o(d[y],"absolute");c[r](d);b=a.m=k[s]("DIV");o(b[y],"absolute");n(b[y],"100%");p(b[y],"100%");d[r](b);a.b.controls[google[B].ControlPosition.TOP_LEFT].push(c);google[B][J].addListener(a.b,"resize",function(){var b=a.o[y],c=a.k;n(b,c.clientWidth+"px");p(b,c.clientHeight+"px")})}
function O(a,b){var c=[],d=Y[b],h;for(h in d)if(d.hasOwnProperty(h)){var e=d[h];e.get("map")==a.b&&c.push(e)}return c}var Y={};function ha(a){google[B][a][E].q=google[B][a][E].setMap;Y[a]={};google[B][a][E].setMap=function(b){if(b){if(!this.__gme_id)this.__gme_id=Z++,Y[a][this.__gme_id]=this}else delete Y[a][this.__gme_id],this.__gme_id=void 0;this.q(b)}}
for(var N=["Marker","Polyline","Polygon","Rectangle","Circle","KmlLayer","GroundOverlay","InfoWindow"],Z=0,ia=N,ja=0,$;$=ia[ja];ja++)if(ha($),$=="InfoWindow")google[B][A][E].p=google[B][A][E].open,Y.InfoWindow={},google[B][A][E].open=function(a,b){if(a){if(!this.__gme_id)this.__gme_id=Z++,Y[A][this.__gme_id]=this}else delete Y[A][this.__gme_id],this.__gme_id=void 0;google[B][J].trigger(a,"GEInfoWindowOpened",this);this.p(a,b)};})();

