
/*
* Map Channels, v3
*
* Copyright 2009 Map Channels (http://www.mapchannels.com)
* 
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 
*       http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Map Channels v3 incorporates the code from the LabeledMarker Class (see license below)
*
* References: http://www.mapchannels.com/MC3About.aspx 
*             http://www.mapchannels.com/MC3Tutorial.aspx
*
*/

/*
* LabeledMarker Class, v1.2
*
* Copyright 2007 Mike Purvis (http://uwmike.com)
* 
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 
*       http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This class extends the Maps API's standard GMarker class with the ability
* to support markers with textual labels. Please see articles here:
*
*       http://googlemapsbook.com/2007/01/22/extending-gmarker/
*       http://googlemapsbook.com/2007/03/06/clickable-labeledmarker/
*/

MC3.prototype.aboutClick = function () {
  map.closeInfoWindow();
  if (this.F == 5) {
    this.F = 1;
  } else {
    this.F = 5;
    this.dH();
  }
  e("sidebarBox").checked = true;
  this.ap();
};
MC3.prototype.aboutClose = function () {
  this.F = 1;
  this.ap();
};
MC3.prototype.iP = function () {
  var html = "<div style='float:right'><a href='javascript:mc3.aboutClose()' style='color:blue'>Close</a>&nbsp;</div>";
  if (e("aboutSrcDiv")) {
    html += e("aboutSrcDiv").innerHTML;
  }
  html += "<h2>" + this.hd + "</h2>" + "<p>&bull; <a id='googlemapsLink' target='_blank' style='color:green;text-decoration:underline' href='#' title='Google Maps'>Google Maps</a></p>" + "<p>&bull; <a id='virtualearthLink' target='_blank' style='color:green;text-decoration:underline' href='#' title='Microsoft Virtual Earth'>Microsoft Virtual Earth</a></p>" + "<p>&bull; <a id='yahoomapsLink' target='_blank' style='color:green;text-decoration:underline' href='#' title='Yahoo Maps'>Yahoo Maps</a></p>" + "<p>&bull; <a id='openstreetmapsLink' target='_blank' style='color:green;text-decoration:underline' href='#' title='OpenStreetMap'>OpenStreetMap</a></p>";
  e("aboutContent").innerHTML = html;
};
MC3.prototype.dH = function () {
  if (this.I) {
    var bp = map.getInfoWindow();
    var L = bp.getPoint();
  } else {
    var L = map.getCenter();
  }
  if (L) {
    var x = formatFloat(L.lng(), 6);
    var y = formatFloat(L.lat(), 6);
    var z = map.getZoom();
    var t = 0;
    switch (map.getCurrentMapType()) {
    case G_SATELLITE_MAP:
      t = 1;
      break;
    case G_HYBRID_MAP:
      t = 2;
      break;
    case G_PHYSICAL_MAP:
      t = 3;
      break;
    }
    var hE = e("fullpageLink");
    if (hE) {
      var gV = this.eB + "?v=3&x=" + x + "&y=" + y + "&z=" + z + "&t=" + t + "&f=1";
      if (this.I && this.I.id) {
        x = this.I.x;
        y = this.I.y;
        if (this.bA && z < this.bz) {
          z = this.bz;
        }
        gV = this.eB + "?v=3&x=" + x + "&y=" + y + "&z=" + z + "&t=" + t + "&id=" + this.I.id + "&f=1";
      }
      hE.href = gV;
    }
    if (this.F == 5 && map) {
      var jm = "http://maps.google.com/?ie=UTF8&ll=" + y + "," + x + "&z=" + z;
      var iZ = "http://maps.live.com/default.aspx?cp=" + y + "~" + x + "&lvl=" + z;
      var iK = "http://maps.yahoo.com/#mvt=m&lat=" + y + "&lon=" + x + "&zoom=" + z;
      var jU = "http://www.openstreetmap.org/?lat=" + y + "&lon=" + x + "&zoom=" + z;
      e("googlemapsLink").href = jm;
      e("virtualearthLink").href = iZ;
      e("yahoomapsLink").href = iK;
      e("openstreetmapsLink").href = jU;
    }
  }
};
function MC3Cluster(aC) {
  this.ad = "";
  this.D = null;
  this.name = "";
  this.T = [];
  this.aL = [];
  this.bD = 0;
  this.J = null;
  this.dx = aC;
  this.ef = null;
  this.dV = 16;
  this.hG = 0;
  this.ak = null;
};
MC3Cluster.prototype.ir = function () {
  var A = this.ak;
  mc3.aY();
  mc3.eA = null;
  mc3.I = null;
  map.closeInfoWindow();
  var L = this.J.getCenter();
  var ah = map.getBoundsZoomLevel(this.J);
  if (ah > 17) {
    ah = 17;
  }
  if (ah <= map.getZoom()) {
    ah = map.getZoom() + 1;
  }
  map.setCenter(L, ah);
};
MC3Cluster.prototype.cb = function () {
  var Q = this;
  if (mc3.cZ[this.ad]) {
    var A = this.ak;
    A.cluster = Q;
    A.place = null;
    A.ad = Q.ad;
    mc3.G.push(A);
    return;
  }
  if (this.ak) {
    mc3.G.push(this.ak);
    return;
  }
  if (this.bD == 0) {
    this.bD = this.T.length;
  }
  var bk = this.bD.toString();
  var cK = "";
  var x = -15;
  var y = -10;
  switch (bk.length) {
  default:
    cK = ";font-size:13px";
    y = -8;
    break;
  case 3:
    cK = ";font-size:10px";
    y = -6;
    break;
  case 4:
    cK = ";font-size:9px";
    y = -5;
    break;
  case 5:
    cK = ";font-size:8px";
    y = -4;
    break;
  }
  bk = "<div style='font-family:arial;width:29px" + cK + "' align='center'>" + bk + "</div>";
  var kK = {
    "icon": mc3.bc,
    "clickable": true,
    "labelText": bk,
    "labelOffset": new GSize(x, y)
  };
  var A = new LabeledMarker(this.D, kK);
  A.dB = false;
  A.cluster = this;
  A.place = null;
  A.ad = this.ad;
  if (this.bD == 0) {
    this.bD = this.T.length;
  }
  var g = this.T[0];
  A.name = "";
  if (g) {
    A.name = g.name;
  }
  A.name += " (" + this.bD + ")";
  this.ak = A;
  this.bU = "<b>" + A.name + "</b><br /><i>" + mc3.hz + "</i>";
  this.bW = mc3.eE(this.bU);
  GEvent.addListener(A, "click", function () {
    Q.ir();
  });
  GEvent.addListener(A, "mouseover", function () {
    mc3.dp(Q);
    A.mkHi(A.row);
  });
  GEvent.addListener(A, "mouseout", function () {
    mc3.aY();
    A.mkLo(A.row);
  });
  mc3.G.push(A);
};
MC3.prototype.aS = function () {
  if (!this.bA) {
    return;
  }
  if (this.ep) {
    return;
  }
  if (!this.aE) {
    return;
  }
  if (this.I) {
    if (!this.eG) {
      return;
    } else {
      this.eG = false;
    }
  }
  e("coordDiv").style.display = "none";
  e("loadingDiv").style.display = "block";
  this.ep = true;
  this.bs = this.G;
  this.G = [];
  this.au = 0;
  this.aD = 0;
  this.aZ = [];
  this.ei = map.getZoom();
  if (this.ao && this.ei <= this.ao.dx) {
    this.ei = this.ao.dx + 1;
  }
  this.cW = map.getBounds();
  this.cZ = [];
  for (var i = 0; i < this.bs.length; i++) {
    var A = this.bs[i];
    if (A) {
      this.cZ[A.ad] = A;
    }
  }
  if (this.ao) {
    for (var i = 0; i < this.ao.aL.length; i++) {
      var Q = this.ao.aL[i];
      if (this.cW.intersects(Q.J)) {
        Q.iy();
      }
    }
  }
  var dO = 0;
  for (var i = 0; i < this.aZ.length; i++) {
    var Q = this.aZ[i];
    dO += Q.T.length;
  }
  if (!this.cO && (dO >= this.dw)) {
    var j = 0;
    var fg = true;
    while (fg) {
      fg = false;
      for (var i = 0; i < this.aZ.length; i++) {
        var Q = this.aZ[i];
        if (j < Q.T.length) {
          var g = Q.T[j];
          if (g.ai && mc3.cW.contains(g.D)) {
            if (this.au < this.dw) {
              g.cb();
              this.au++;
            }
            this.aD++;
          }
          fg = true;
        }
      }
      j++;
    }
  } else if ((dO > 0) && (dO < this.dw)) {
    for (var i = 0; i < this.aZ.length; i++) {
      var Q = this.aZ[i];
      for (var j = 0; j < Q.T.length; j++) {
        var g = Q.T[j];
        if (g.ai && mc3.cW.contains(g.D)) {
          if (this.au < this.dw) {
            g.cb();
            this.au++;
          }
          this.aD++;
        }
      }
    }
  } else {
    for (var i = 0; i < this.aZ.length; i++) {
      var Q = this.aZ[i];
      Q.cb();
      this.au++;
      this.aD += Q.T.length;
    }
  }
  this.eH = [];
  for (var i = 0; i < this.G.length; i++) {
    var A = this.G[i];
    if (A) {
      this.eH[A.ad] = A;
    }
  }
  for (var i = 0; i < this.bs.length; i++) {
    var A = this.bs[i];
    if (! (this.eH[A.ad])) {
      A.hide();
    }
  }
  if (this.bg) {
    for (var i = 0; i < this.G.length; i++) {
      var A = this.G[i];
      if (! (this.cZ[A.ad])) {
        if (A.dB) {
          A.show();
        } else {
          map.addOverlay(A);
          A.dB = true;
        }
      }
    }
  }
  this.bs = [];
  this.bs = [];
  this.eH = [];
  this.dW();
  this.ep = false;
  setTimeout("restoreCoords()", 1);
};
function restoreCoords() {
  e("coordDiv").style.display = "block";
  e("loadingDiv").style.display = "none";
};
MC3Cluster.prototype.iy = function () {
  if (this.dx >= mc3.bz) {
    for (var i = 0; i < this.T.length; i++) {
      var g = this.T[i];
      if (g.ai && mc3.cW.contains(g.D)) {
        g.cb();
        mc3.aD++;
        mc3.au++;
      }
    }
    return;
  }
  if (this.dx == mc3.ei) {
    mc3.aZ.push(this);
  } else {
    for (var i = 0; i < this.aL.length; i++) {
      var Q = this.aL[i];
      if (mc3.cW.intersects(Q.J)) {
        Q.iy();
      }
    }
  }
};
var adjX = [0, -1, 1, 0, 0, -1, -1, 1, 1];
var adjY = [0, 0, 0, -1, 1, -1, 1, -1, 1];
MC3.prototype.iM = function (H, aC) {
  var bR = map.getCurrentMapType().getProjection().fromLatLngToPixel(H.D, aC);
  var bx = parseInt(bR.x / 32);
  var by = parseInt(bR.y / 32);
  var bO = false;
  for (var d = 0; d < 9 && !bO; d++) {
    var x = bx + adjX[d];
    var y = by + adjY[d];
    var ix = x + "_" + y + "_" + aC;
    var aW = mc3.cR[ix];
    if (aW) {
      bO = true;
      aW.T.push(H);
      aW.J.extend(H.D);
    }
  }
  if (!bO) {
    var ix = bx + "_" + by + "_" + aC;
    var aj = new MC3Cluster(aC);
    aj.T.push(H);
    aj.ad = "c" + ix;
    aj.D = H.D;
    aj.ef = bR;
    aj.J = new GLatLngBounds(H.D, H.D);
    aj.aL.push(aj);
    this.cR[ix] = aj;
    this.cd.push(aj);
  }
};
MC3.prototype.iR = function (an, aC) {
  if (an.T.length > 0) {
    var cI = [];
    var fo = [];
    for (var i = 0; i < an.T.length; i++) {
      var g = an.T[i];
      var av = g.name;
      if (cI[av]) {
        cI[av]++;
      } else {
        fo.push(av);
        cI[av] = 1;
      }
    }
    var fz = 0;
    var fI = "";
    for (var i = 0; i < fo.length; i++) {
      var av = fo[i];
      if (cI[av] > fz) {
        fz = cI[av];
        fI = av;
      }
    }
    an.name = fI;
  }
  var bR = map.getCurrentMapType().getProjection().fromLatLngToPixel(an.D, aC);
  var bx = parseInt(bR.x / (mc3.iC));
  var by = parseInt(bR.y / (mc3.iC));
  var bO = false;
  for (var d = 0; d < 9 && !bO; d++) {
    var x = bx + adjX[d];
    var y = by + adjY[d];
    var ix = x + "_" + y + "_" + aC;
    var aW = this.cR[ix];
    if (aW) {
      aW.aL.push(an);
      for (var i = 0; i < an.T.length; i++) {
        var g = an.T[i];
        aW.T.push(g);
      }
      aW.J.extend(an.J.getNorthEast());
      aW.J.extend(an.J.getSouthWest());
      bO = true;
    }
  }
  if (!bO) {
    var ix = bx + "_" + by + "_" + aC;
    var aj = new MC3Cluster(aC);
    for (var i = 0; i < an.T.length; i++) {
      var g = an.T[i];
      aj.T.push(g);
    }
    aj.ad = "c" + ix;
    aj.name = an.name;
    aj.D = an.D;
    aj.ef = an.ef;
    aj.J = new GLatLngBounds(an.J.getSouthWest(), an.J.getNorthEast());
    aj.aL.push(an);
    this.cR[ix] = aj;
    this.cd.push(aj);
  }
};
MC3.prototype.jM = function () {
  this.cd = [];
  this.cR = [];
  for (var f = 0; f < this.K.length; f++) {
    var o = this.K[f];
    for (var i = 0; i < o.R.length; i++) {
      var g = o.R[i];
      this.iM(g, this.bz);
    }
  }
  for (var z = this.bz - 1; z > 0; z--) {
    var ge = this.cd;
    this.cd = new Array();
    this.cR = new Array();
    for (var i = 0; i < ge.length; i++) {
      var Q = ge[i];
      this.iR(Q, z);
    }
  }
  this.ao = new MC3Cluster(0);
  for (var i = 0; i < this.cd.length; i++) {
    var Q = this.cd[i];
    for (var j = 0; j < Q.T.length; j++) {
      var g = Q.T[j];
      this.ao.T.push(g);
    }
    this.ao.bD = this.ao.T.length;
    this.ao.aL.push(Q);
  }
  var gd = this.ao;
  while (this.ao.aL.length == 1) {
    gd = this.ao;
    this.ao = this.ao.aL[0];
  }
  this.ao = gd;
};
MC3.prototype.kX = function (bL) {
  var cF = GXml.parse(bL);
  var l = cF.documentElement;
  this.gY = GXml.value(l.getElementsByTagName("txtMap")[0]);
  this.hC = GXml.value(l.getElementsByTagName("txtSidebar")[0]);
  this.gJ = GXml.value(l.getElementsByTagName("txtControls")[0]);
  this.eL = GXml.value(l.getElementsByTagName("txtReset")[0]);
  this.hp = GXml.value(l.getElementsByTagName("txtViewAll")[0]);
  this.gX = GXml.value(l.getElementsByTagName("txtMarker")[0]);
  this.ha = GXml.value(l.getElementsByTagName("txtMarkers")[0]);
  this.gR = GXml.value(l.getElementsByTagName("txtPlace")[0]);
  this.gQ = GXml.value(l.getElementsByTagName("txtPlaces")[0]);
  this.hi = GXml.value(l.getElementsByTagName("txtTraffic")[0]);
  this.eK = GXml.value(l.getElementsByTagName("txtPanoramio")[0]);
  this.fQ = GXml.value(l.getElementsByTagName("txtWikipedia")[0]);
  this.js = GXml.value(l.getElementsByTagName("txtYouTube")[0]);
  this.hb = GXml.value(l.getElementsByTagName("txtSearch")[0]);
  this.gD = GXml.value(l.getElementsByTagName("txtFullPage")[0]);
  this.gC = GXml.value(l.getElementsByTagName("txtFullPageMap")[0]);
  this.gT = GXml.value(l.getElementsByTagName("txtPrint")[0]);
  this.gW = GXml.value(l.getElementsByTagName("txtPrintThisMap")[0]);
  this.hy = GXml.value(l.getElementsByTagName("txtAbout")[0]);
  this.hB = GXml.value(l.getElementsByTagName("txtAboutThisMap")[0]);
  this.gF = GXml.value(l.getElementsByTagName("txtLat")[0]);
  this.gP = GXml.value(l.getElementsByTagName("txtLng")[0]);
  this.fU = GXml.value(l.getElementsByTagName("txtZoom")[0]);
  this.hz = GXml.value(l.getElementsByTagName("txtClickToZoom")[0]);
  this.gH = GXml.value(l.getElementsByTagName("txtGoogleMap")[0]);
  this.ev = GXml.value(l.getElementsByTagName("txtVirtualEarth")[0]);
  this.et = GXml.value(l.getElementsByTagName("txtStreetView")[0]);
  this.jw = GXml.value(l.getElementsByTagName("txtMoreViews")[0]);
  this.eO = GXml.value(l.getElementsByTagName("txtClose")[0]);
  this.jj = GXml.value(l.getElementsByTagName("txtProfile")[0]);
  this.eJ = GXml.value(l.getElementsByTagName("txtDirections")[0]);
  this.gZ = GXml.value(l.getElementsByTagName("txtMagnify")[0]);
  this.fF = GXml.value(l.getElementsByTagName("txtZoomIn")[0]);
  this.fY = GXml.value(l.getElementsByTagName("txtZoomOut")[0]);
  this.gB = GXml.value(l.getElementsByTagName("txtGetDirections")[0]);
  this.gM = GXml.value(l.getElementsByTagName("txtFrom")[0]);
  this.hu = GXml.value(l.getElementsByTagName("txtTo")[0]);
  this.gU = GXml.value(l.getElementsByTagName("txtReverse")[0]);
  this.hj = GXml.value(l.getElementsByTagName("txtTravelMode")[0]);
  this.gI = GXml.value(l.getElementsByTagName("txtDriving")[0]);
  this.fP = GXml.value(l.getElementsByTagName("txtWalking")[0]);
  this.hA = GXml.value(l.getElementsByTagName("txtAvoidHighways")[0]);
  this.fV = GXml.value(l.getElementsByTagName("txtYes")[0]);
  this.hc = GXml.value(l.getElementsByTagName("txtNo")[0]);
  this.gG = GXml.value(l.getElementsByTagName("txtLanguage")[0]);
  this.gN = GXml.value(l.getElementsByTagName("txtFindingDirections")[0]);
  this.gS = GXml.value(l.getElementsByTagName("txtRotate")[0]);
  this.hd = GXml.value(l.getElementsByTagName("txtMoreMapViews")[0]);
  this.jI = GXml.value(l.getElementsByTagName("txtMapResources")[0]);
  this.gE = GXml.value(l.getElementsByTagName("txtGo")[0]);
  this.hF = GXml.value(l.getElementsByTagName("txtSearchResults")[0]);
  this.iQ = GXml.value(l.getElementsByTagName("txtError")[0]);
  this.gO = GXml.value(l.getElementsByTagName("txtEnterStartLocation")[0]);
  this.gL = GXml.value(l.getElementsByTagName("txtEnterDestination")[0]);
};
MC3.prototype.kQ = function () {
  this.gY = "Map";
  this.hC = "導覽";
  this.gJ = "工具";
  this.eL = "Reset";
  this.hp = "完全顯示";
  this.gX = "個地標";
  this.ha = "個地標";
  this.gR = "Place";
  this.gQ = "Places";
  this.hi = "Traffic";
  this.eK = "Panoramio";
  this.fQ = "Wikipedia";
  this.js = "YouTube";
  this.hb = "搜尋";
  this.gD = "Full Page";
  this.gC = "Full Page Map";
  this.gT = "Print";
  this.gW = "Print This Map";
  this.hy = "About";
  this.hB = "About This Map";
  this.gF = "Lat";
  this.gP = "Lng";
  this.fU = "Zoom";
  this.hz = "Click To Zoom";
  this.gH = "Google Map";
  this.ev = "Virtual Earth";
  this.et = "Street View";
  this.jw = "More Views";
  this.eO = "Close";
  this.jj = "Profile";
  this.eJ = "Directions";
  this.gZ = "Magnify";
  this.fF = "Zoom In";
  this.fY = "Zoom Out";
  this.gB = "Get Directions";
  this.gM = "From";
  this.hu = "To";
  this.gU = "Reverse";
  this.hj = "Travel Mode";
  this.gI = "Driving";
  this.fP = "Walking";
  this.hA = "Avoid Highways";
  this.fV = "Yes";
  this.hc = "No";
  this.gG = "Language";
  this.gN = "Finding Directions";
  this.gS = "Rotate";
  this.hd = "More Map Views";
  this.jI = "Map Resources";
  this.gE = "Go";
  this.hF = "Search Results";
  this.iQ = "Error";
  this.gO = "Enter a Start Address";
  this.gL = "Enter a Destination Address";
  this.eL = "Reset";
};
function viewDirections() {
  if (mc3.aB) {
    mc3.aB.clear();
  }
  mc3.aB = null;
  mc3.F = 2;
  e("sidebarBox").checked = true;
  mc3.ap();
  e("directionsTitle").innerHTML = mc3.gB;
  e("directionsQueryPanel").style.display = "block";
  e("directionsResultPanel").style.display = "none";
  e("dirContent").innerHTML = "";
  var aa = mc3.I.D;
  e("fromText").value = "";
  e("toText").value = mc3.I.name + "@" + aa.lat() + "," + aa.lng();
};
function closeDirections() {
  if (mc3.aB) {
    mc3.aB.clear();
  }
  mc3.aB = null;
  if (e("directionsResultPanel").style.display == "block") {
    e("directionsResultPanel").style.display = "none";
    e("directionsQueryPanel").style.display = "block";
    e("dirContent").innerHTML = "";
  } else {
    mc3.F = 1;
    mc3.ap();
  }
  e("dirContent").innerHTML = "";
};
function findDirections() {
  if (mc3.aB) {
    mc3.aB.clear();
  }
  mc3.aB = null;
  var bQ = e("fromText").value;
  var ci = e("toText").value;
  if (!bQ) {
    alert(mc3.gO);
    return;
  }
  if (!ci) {
    alert(mc3.gL);
    return;
  }
  if (this.aB) {
    this.closeDirections();
  }
  e("directionsTitle").innerHTML = mc3.gN;
  e("directionsQueryPanel").style.display = "none";
  e("directionsResultPanel").style.display = "block";
  var eS = "from: " + bQ + " to: " + ci;
  var jD = e("dirContent");
  var aU = new GDirections(map, jD);
  mc3.aB = aU;
  GEvent.addListener(aU, "load", directionsLoaded);
  GEvent.addListener(aU, "error", directionsError);
  var aG = {};
  aG.travelMode = e("travelModeSelect").selectedIndex == 0 ? G_TRAVEL_MODE_DRIVING : G_TRAVEL_MODE_WALKING;
  aG.avoidHighways = e("avoidHighwaysSelect").selectedIndex == 0 ? false : true;
  aG.locale = e("languageSelect").value;
  aU.load(eS, aG);
};
function directionsLoaded() {
  e("directionsTitle").innerHTML = mc3.eJ;
};
function directionsError() {
  var fZ = "";
  var kh = mc3.aB.getStatus().code;
  fZ = "Directions Error " + kh;
  alert(fZ);
};
function reverseDirections() {
  var bQ = e("fromText").value;
  var ci = e("toText").value;
  e("fromText").value = ci;
  e("toText").value = bQ;
};
var PL_POINT = 1;
var PL_POLYLINE = 2;
var PL_POLYGON = 3;
var PL_GROUNDOVERLAY = 4;
function MC3Feed() {
  this.ar = "";
  this.bV = "";
  this.cx = "";
  this.ab = "";
  this.R = [];
  this.bF = [];
  this.dU = [];
  this.lN = 0;
  this.ai = false;
  this.J = null;
  this.P = new KMLStyle();
  this.ej = false;
  this.lC = "";
  this.eh = "";
  this.lJ = "";
  this.lL = "";
  this.ec = "";
  this.dS = "";
  this.cT = "";
  this.dh = [];
  this.ai = true;
};
MC3Feed.prototype.bv = function (place) {
  return place.description;
};
MC3Feed.prototype.di = function (place) {
  return place.description;
};
MC3Feed.prototype.hQ = function (place) {
  return place.description;
};
MC3Feed.prototype.eF = function (place) {
  return place.name;
};
MC3Feed.prototype.eI = function (place) {
  return place.bZ;
};
MC3.prototype.kY = function () {
  this.hT = 0;
  for (var i = 0; i < this.K.length; i++) {
    var o = this.K[i];
    switch (o.ab) {
    case "kml":
      o.dZ();
      break;
    case "rss":
      o.kf();
      break;
    case "txt":
      o.kd();
      break;
    case "gss":
      o.lc();
      break;
    }
  }
  if (this.K.length == 0) {
    this.initialize2();
  }
};
MC3.prototype.dr = function (U) {
  this.hT++;
  if (this.hT >= this.K.length) {
    this.initialize2();
  }
};
MC3.prototype.kO = function () {
  var B = "";
  var db = "blue";
  if (this.ed) {
    db = this.ed;
  }
  var be = " style='color:" + this.ed + ";text-decoration:underline'";
  for (var i = 0; i < this.K.length; i++) {
    var o = this.K[i];
    B += "<div>" + "<input id='fb" + o.ar + "' type='checkbox' checked='true' onclick='mc3.feedCheck(this)' /> " + "&nbsp;<a id='fl" + o.ar + "' href='javascript:mc3.feedClick(\"" + o.ar + "\")' " + be + ">" + o.bV + "</a></div>";
  }
  e("feedBarInnerDiv").innerHTML = B;
};
MC3Feed.prototype.lc = function () {
  var bl = "http://spreadsheets.google.com/feeds/cells/" + this.cx + "/od6/public/basic?alt=json-in-script&callback=cbLoadGSS";
  var gl = new JSON(bl);
  gl.jh();
  gl.jB();
};
function getGSSHF(a) {
  var b = "";
  for (var i = 0; i < a.length; i++) {
    var c = a.substr(i, 1);
    if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z") || (c >= "0" && c <= "9")) {
      b += c;
    } else {
      b += "_";
    }
  }
  while (b.length > 1 && b.substr(0, 1) == "_") {
    b = b.substr(1);
  }
  return b;
};
function cbLoadGSS(a) {
  var eR = [];
  var fl = eval(a);
  var hI = fl.feed.id.$t;
  var kD = hI.indexOf("cells/") + 6;
  var dX = hI.substr(kD);
  var kE = dX.indexOf("/");
  dX = dX.substr(0, kE);
  var fO = false;
  var o = null;
  for (var i = 0; i < mc3.K.length && !fO; i++) {
    o = mc3.K[i];
    if (o.cx == dX) {
      fO = true;
    }
  }
  var lv = fl.feed.category[0];
  var gf = fl.feed.entry;
  var hs = 1;
  var place = new MC3Place();
  var fh = 0;
  for (var i = 0; i < gf.length; i++) {
    var gb = gf[i];
    var ij = gb.title.$t;
    var item = gb.content.$t;
    if (item.indexOf("\"") > -1) {
      item = unQuote(item);
    }
    var hV = ij.substr(0, 1);
    var fj = parseInt(ij.substr(1));
    if (fj == 1) {
      o.dh[hV] = getGSSHF(item);
    } else {
      if (fj != fh) {
        if (fh > 1) {
          if (place.x != null && place.y != null) {
            if (o.bv) {
              place.cn = o.bv(place);
            }
            place.gq(o, hs++);
          }
          place = new MC3Place();
        }
        fh = fj;
      }
      var name = o.dh[hV];
      place.fields[name] = item;
      switch (name) {
      case "x":
        if (item.length) place.x = parseFloat(item);
        break;
      case "y":
        if (item.length) place.y = parseFloat(item);
        break;
      default:
        try {
          eval("place." + name + "=\"" + item + "\";");
        } catch(ex) {
          eval("place." + name + "=\"\";");
        }
      }
    }
  }
  if (place.x != null && place.y != null) {
    if (o.bv) {
      place.cn = o.bv(place);
    }
    place.gq(o, hs++);
  }
  o.ai = true;
  mc3.dr(o);
};
MC3Feed.prototype.iS = function (bL) {
  var cF = GXml.parse(bL);
  var l = cF.documentElement;
  var ii = l.getElementsByTagName("Style");
  var ia = l.getElementsByTagName("StyleMap");
  var hZ = l.getElementsByTagName("Placemark");
  var hY = l.getElementsByTagName("GroundOverlay");
  var hm = l.getElementsByTagName("name");
  if (hm.length > 0 && this.bV.length == 0) {
    this.bV = GXml.value(hm[0]);
  }
  var hl = l.getElementsByTagName("description");
  if (hl.length > 0) {
    this.iz = GXml.value(hl[0]);
  }
  for (var i = 0; i < ii.length; i++) {
    var dy = ii[i];
    var C = new KMLStyle();
    C.kc(dy);
    this.dU[C.dT] = C;
  }
  for (var i = 0; i < ia.length; i++) {
    var dy = ia[i];
    var C = new KMLStyle();
    C.dT = dy.getAttribute("id");
    var ld = dy.getElementsByTagName("styleUrl");
    var la = GXml.value(ld[0]).substr(1);
    var fR = this.dU[la];
    if (fR) {
      C.iconUrl = fR.iconUrl;
      this.dU[C.dT] = C;
    }
  }
  for (var i = 0; i < hZ.length; i++) {
    var ft = hZ[i];
    var g = new MC3Place();
    g.bo = this;
    g.dZ(ft, this, i);
    mc3.R.push(g);
    mc3.bF[g.ad] = g;
    this.R.push(g);
  }
  for (var i = 0; i < hY.length; i++) {
    var ft = hY[i];
    var g = new MC3Place();
    g.bo = this;
    g.dZ(ft, this, i);
    mc3.R.push(g);
    mc3.bF[g.ad] = g;
    this.R.push(g);
  }
};
MC3Feed.prototype.dZ = function () {
  var o = this;
  var dc = new Date();
  var bl = this.ar + ".kml?v=" + dc.getDate() + dc.getHours() + mc3.eq;
  GDownloadUrl(bl, function (bL) {
    o.ai = true;
    o.iS(bL);
    mc3.dr(o);
  });
};
MC3Feed.prototype.kf = function () {
  var o = this;
  var bK = new google.feeds.Feed(this.cx);
  bK.setResultFormat(google.feeds.Feed.MIXED_FORMAT);
  bK.setNumEntries(200);
  bK.load(function (result) {
    if (!result.error) {
      var eR = result.feed.entries;
      for (var i = 0; i < eR.length; i++) {
        var g = new MC3Place();
        var kU = eR[i].xmlNode;
        g.lg(kU, o, i);
        if (g.D) {
          mc3.R.push(g);
          mc3.bF[g.ad] = g;
          o.R.push(g);
        }
      }
      o.ai = true;
      mc3.dr(o);
    }
  });
};
MC3Feed.prototype.kd = function () {
  var o = this;
  var ix = 1;
  var dc = new Date();
  var bl = this.ar + ".txt?v=" + dc.getDate() + dc.getHours() + mc3.eq;
  GDownloadUrl(bl, function (a) {
    var cq = a.split("\r\n");
    if (cq.length > 0) {
      var hw = cq[0].split("\t");
      for (var i = 0; i < hw.length; i++) {
        var cf = hw[i].toLowerCase();
        var gs = "";
        for (var j = 0; j < cf.length; j++) {
          var c = cf.substr(j, 1);
          if (c == " ") c = "_";
          gs += c;
        }
        o.dh[i] = gs;
      }
      for (var i = 1; i < cq.length; i++) {
        var fK = cq[i];
        if (fK) {
          var aX = fK.split("\t");
          if (aX.length > 1) {
            var g = new MC3Place();
            g.lf(aX, o, ix);
            ix++;
            o.R.push(g);
            o.bF[g.id] = g;
            mc3.R.push(g);
            mc3.bF[g.ad] = g;
          }
        }
      }
    }
    o.ai = true;
    mc3.dr(o);
  });
};
MC3.prototype.nameFilterChange = function (a) {
  map.closeInfoWindow();
  mc3.I = null;
  mc3.eA = null;
  this.dN = a.value;
  if (this.cX) {
    var bP = e("clusterBox");
    if (this.dN && bP) {
      bP.checked = false;
    } else {
      bP.checked = true;
    }
    this.clusterCheck(bP);
  }
  this.ds();
};
MC3.prototype.clearNameFilter = function () {
  var gm = e("nameFilterText");
  gm.value = "";
  this.nameFilterChange(gm);
  this.unfocusNameFilter();
};
MC3.prototype.feedCheck = function (a) {
  map.closeInfoWindow();
  mc3.I = null;
  mc3.eA = null;
  var jy = a.id.substr(2);
  var o = this.dg[jy];
  if (o) {
    o.ai = a.checked;
  }
  this.ds();
  this.aS();
};
MC3.prototype.feedClick = function (gu) {
  map.closeInfoWindow();
  mc3.I = null;
  mc3.eA = null;
  var kA = this.dg[gu];
  if (kA) {
    for (var f = 0; f < this.K.length; f++) {
      var o = this.K[f];
      var df = e("fb" + o.ar);
      var ie = false;
      if (o.ar == gu) {
        df.checked = true;
        ie = true;
      } else {
        df.checked = false;
      }
      o.ai = ie;
    }
    if (this.cX) {
      var bP = e("clusterBox");
      bP.checked = false;
      this.clusterCheck(bP);
    }
    this.ds();
    this.aS();
    if (this.jp) {
      viewAllMarkers();
    }
  }
};
MC3.prototype.ds = function (a) {
  var fG = this.dN.toLowerCase();
  for (var f = 0; f < this.K.length; f++) {
    var o = this.K[f];
    for (var i = 0; i < o.R.length; i++) {
      var g = o.R[i];
      if (o.ai) {
        if (fG == "") {
          g.ai = true;
        } else {
          if (g.cN.indexOf(fG) > -1) {
            g.ai = true;
          } else {
            g.ai = false;
          }
        }
      } else {
        g.ai = false;
      }
    }
  }
  if (!this.bA) {
    this.G = [];
    for (var f = 0; f < this.K.length; f++) {
      var o = this.K[f];
      for (var i = 0; i < o.R.length; i++) {
        var g = o.R[i];
        if (g.ai) {
          if (this.bg) {
            g.ak.show();
          } else {
            g.ak.hide();
          }
          this.G.push(g.ak);
        } else {
          g.ak.hide();
        }
      }
    }
    this.au = this.G.length;
    this.aD = this.au;
    this.dW();
  }
  this.aS();
};
MC3.prototype.filtersReset = function (a) {
  for (var f = 0; f < this.K.length; f++) {
    var o = this.K[f];
    var df = e("fb" + o.ar);
    if (df) {
      df.checked = true;
    }
    o.ai = true;
  }
  if (this.bA) {
    this.cO = true;
    e("clusterBox").checked = true;
  }
  e("nameFilterText").value = "";
  this.unfocusNameFilter();
  this.dN = "";
  this.bg = true;
  e("markersBox").checked = true;
  map.closeInfoWindow();
  this.ds();
  this.aS();
};
MC3.prototype.clusterCheck = function (a) {
  this.cO = a.checked;
  this.aS();
};
MC3.prototype.focusNameFilter = function (a) {
  var ay = e("nameFilterText");
  if (ay.style.color == "gray") {
    ay.style.color = "black";
    ay.value = "";
  }
};
MC3.prototype.unfocusNameFilter = function (a) {
  var ay = e("nameFilterText");
  var bk = ay.value;
  if (bk == "") {
    ay.style.color = "gray";
    ay.value = this.hX;
  }
};
MC3.prototype.kM = function () {
  var jG = this.e("footerDiv");
  if (this.cp > 0) {
    jG.style.display = "none";
  }
  var B = "";
  if (this.dQ || this.cj) {
    B += "<input type='checkbox' id='mapBox' onclick='mc3.mapClick(this.checked)' checked='true' />" + "<a href='javascript:mc3.mapClick()' style='color:" + this.aA + "' >" + this.gH + "</a>";
  }
  if (this.cj) {
    var aQ = (this.cj == 2) ? "checked='true'" : "";
    B += "&nbsp; <input type='checkbox' id='streetviewBox' onclick='mc3.streetviewClick(this.checked)' " + aQ + " />" + "<a href='javascript:mc3.streetviewClick()' style='color:" + this.aA + "' >" + this.et + "</a>";
  }
  if (this.dQ) {
    B += "&nbsp; <input type='checkbox' id='veBox' onclick='mc3.veClick(this.checked)' />" + "<a href='javascript:mc3.veClick()' style='color:" + this.aA + "' >" + this.ev + "</a>";
  }
  e("footerMainDiv").innerHTML = B;
  var eV = "";
  if (this.ll) {
    eV += "<a onclick='javascript:mc3.printClick();return false' href='#' style='color:" + this.kL + "' title='" + this.gW + "'>" + this.gT + "</a>&nbsp; ";
  }
  if (this.lq) {
    eV += "&nbsp;<a href='javascript:mc3.aboutClick()' style='color:" + this.aA + "' title='" + this.hB + "'>" + this.hy + "</a>&nbsp;";
  }
  e("footerLinksDiv").innerHTML = eV;
};
MC3.prototype.dE = function () {
  if (this.cp > 0) {
    var B = "";
    if (this.I) {
      var L = this.I.D;
    } else {
      var L = map.getCenter();
    }
    if (L) {
      var ah = map.getZoom();
      if (this.ju) {
        B = " " + this.gF + ": <b>" + formatFloat(L.lat(), 6) + "</b> ";
        B += " " + this.gP + ": <b>" + formatFloat(L.lng(), 6) + "</b> ";
      }
      if (this.jt) {
        B += " " + this.fU + ": <b>" + ah + "</b> ";
      }
      this.e("coordDiv").innerHTML = B;
    }
  }
};
var map = null;
var mapTypes = [G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP, G_SATELLITE_3D_MAP];
var geIgnoreClose = false;
MC3.prototype.jb = function () {
  var lo = this.e("gmapDiv");
  var cc = {};
  cc.showOnLoad = true;
  cc.onSearchCompleteCallback = searchCallback;
  cc.style = "new";
  cc.adsOptions = {
    client: this.fa,
    channel: this.hJ
  };
  cc.onIdleCallback = searchClose;
  var eU = {};
  eU.googleBarOptions = cc;
  if (this.kl == 1) {
    eU.draggableCursor = "crosshair";
  }
  map = new GMap2(lo, eU);
  this.az = null;
  this.bm = null;
  this.bw = 0;
  switch (this.kj) {
  case 1:
    this.az = new GSmallMapControl();
    break;
  case 2:
    this.az = new GLargeMapControl();
    this.bm = new GSmallMapControl();
    this.bw = 2;
    break;
  case 3:
    this.az = new GSmallZoomControl3D();
    break;
  case 4:
    this.az = new GLargeMapControl3D();
    this.bm = new GSmallZoomControl3D();
    this.bw = 2;
    break;
  }
  if (this.az) {
    if (this.dD) {
      map.addControl(this.az);
    }
  }
  this.bS = null;
  if (this.kp && this.dm == 0) {
    this.bS = new GScaleControl();
    if (this.dD) {
      map.addControl(this.bS);
    }
  }
  this.aO = null;
  switch (this.iE) {
  case 1:
    this.aO = new GMapTypeControl();
    break;
  case 2:
    this.aO = new GHierarchicalMapTypeControl();
    break;
  case 3:
    this.aO = new GMenuMapTypeControl();
    break;
  }
  if (this.aO) {
    if (this.dD) {
      map.addControl(this.aO);
    }
  }
  if (this.kr) {
    map.addMapType(G_PHYSICAL_MAP);
  }
  if (this.kk) {
    map.addMapType(G_SATELLITE_3D_MAP);
  }
  if (this.km) {
    map.enableDoubleClickZoom();
  } else {
    map.disableDoubleClickZoom()
  }
  if (this.kw) {
    map.enableContinuousZoom();
  }
  if (this.kn) {
    map.enableScrollWheelZoom();
  }
  if (this.iG) {
    var cV = new GOverviewMapControl();
    map.addControl(cV);
    this.kq = cV;
    if (this.iG == 1) {
      setTimeout("hideOV()", 500);
    }
  }
  this.fN = new GStreetviewClient();
  this.map = map;
  var x = 0;
  var y = 0;
  var z = 1;
  if (this.bj != null && this.bq != null) {
    x = this.bj;
    y = this.bq;
    if (this.bT) {
      z = this.bT;
    }
    map.setCenter(new GLatLng(y, x), z);
  }
  if (!this.fS) {
    e("sidebarBox").checked = false;
  }
  if (!this.dD) {
    e("controlsBox").checked = false;
  }
  if (this.dY >= 0 && this.dY <= 4) {
    this.iA = this.dY;
  }
  map.setMapType(mapTypes[this.iA]);
  this.bH = document.createElement("toolDiv");
  map.getPane(G_MAP_FLOAT_PANE).appendChild(this.bH);
  this.bH.style.visibility = "hidden";
  this.co = document.createElement("span");
  document.body.appendChild(this.co);
  this.bh = document.createElement("span");
  this.bh.style.width = "250px";
  document.body.appendChild(this.bh);
  this.du = this.du;
  this.bc = new GIcon();
  this.bc.image = this.du;
  this.bc.iconSize = new GSize(this.jl, this.jn);
  this.bc.iconAnchor = new GPoint(this.it, this.jk);
  this.bc.infoWindowAnchor = new GPoint(this.it, 0);
  this.bc.printImage = this.bc.image;
  this.bc.mozPrintImage = this.bc.image;
  this.gy = "http://maps.google.com/mapfiles/ms/micons/green-dot.png";
  this.bn = new GIcon();
  this.bn.image = this.gy;
  this.bn.iconSize = new GSize(32, 32);
  this.bn.iconAnchor = new GPoint(15, 31);
  this.bn.infoWindowAnchor = new GPoint(15, 0);
  this.bn.printImage = this.bn.image;
  this.bn.mozPrintImage = this.bn.image;
  if (this.cj == 2) {
    this.streetviewClick(true);
  }
  if (this.ez == 2) {
    this.trafficClick(true);
  }
  if (this.ew == 2) {
    this.panoramioClick(true);
  }
  if (this.eC == 2) {
    this.wikipediaClick(true);
  }
  if (this.dm == 2) {
    this.googlebarClick(true);
  }
  GEvent.addListener(map, "zoomend", function () {
    mc3.dE();
    if (mc3.M == 4) {
      if (mc3.I) {
        var L = mc3.I.D;
        mc3.dk(L.lng(), L.lat(), map.getZoom(), 1);
      }
    }
  });
  GEvent.addListener(map, "moveend", function () {
    var bp = map.getInfoWindow();
    var kP = (bp && !bp.isHidden());
    if (mc3.M == 4) {
      var bp = map.getInfoWindow();
      if (!kP) {
        var L = map.getCenter();
        mc3.dk(L.lng(), L.lat(), map.getZoom(), 0);
      }
    }
    mc3.dH();
    mc3.aS();
    mc3.dE();
  });
  GEvent.addListener(map, "infowindowclose", function () {
    var as = mc3.af;
    mc3.af = null;
    mc3.I = null;
    if (as) {
      as.mkLo(as.row);
    }
    if (mc3.F == 4) {
      setTimeout("closeProfile()", 10);
    }
    mc3.jq();
    mc3.aS();
    mc3.dE();
  });
  this.dH();
  this.dE();
  if (this.kW) {
    var publisherID = this.jJ;
    var adsManagerOptions = {
      maxAdsOnMap: (this.jz ? 10 : 1),
      style: 'adunit',
      channel: this.jA
    };
    this.ba = new GAdsManager(map, publisherID, adsManagerOptions);
    this.ba.enable();
  }
  setTimeout("rssDivMonitor()", 500);
};
function hideOV() {
  var cV = mc3.kq;
  if (cV) {
    cV.hide(true);
  }
};
function closeProfile() {
  if (!mc3.I) {
    mc3.F = 1;
    mc3.ap();
  }
};
MC3.prototype.jg = function () {
  if (this.bj != null && this.bq != null && this.bT != null && this.er != null) {
    var g = new MC3Place();
    g.ab = PL_POINT;
    g.name = this.er;
    g.id = 1;
    g.D = new GLatLng(this.bq, this.bj);
    g.bU = g.name;
    g.bW = mc3.eE(g.bU);
    g.eu = "";
    g.fC = "";
    g.P = null;
    var A = new GMarker(g.D);
    map.addOverlay(A);
    A.place = g;
    g.ak = A;
    A.row = 0;
    this.dP = g;
    GEvent.addListener(A, 'click', function (am) {
      mc3.bu(g, false, g.D);
    });
    GEvent.addListener(A, "mouseover", function () {
      mc3.dp(g);
      A.mkHi(A.row);
    });
    GEvent.addListener(A, "mouseout", function () {
      mc3.aY();
      A.mkLo(A.row);
    });
    this.G.push(A);
    this.R.push(g);
    this.au = this.G.length;
    this.aD = this.R.length;
    this.dW();
  }
};
MC3.prototype.kN = function () {
  //this.e("headerSideDiv").innerHTML = "&nbsp;<input type='checkbox' id='sidebarBox' onclick='mc3.sidebarClick(this.checked)' checked='true' />" + "<a href='javascript:mc3.sidebarClick()' style='color:" + this.aA + "' >" + this.hC + "</a>" + "&nbsp;<input type='checkbox' id='controlsBox' onclick='mc3.controlsClick(this.checked)' checked='true' />" + "<a href='javascript:mc3.controlsClick()' style='color:" + this.aA + "' >" + this.gJ + "</a>";
  this.e("headerSideDiv").innerHTML = "&nbsp;<input type='checkbox' id='sidebarBox' onclick='mc3.sidebarClick(this.checked)' checked='true' />" + "<a href='javascript:mc3.sidebarClick()' class='headerTool' >" + this.hC + "</a>" + "&nbsp;<input type='checkbox' id='controlsBox' onclick='mc3.controlsClick(this.checked)' checked='true' />" + "<a href='javascript:mc3.controlsClick()' class='headerTool' >" + this.gJ + "</a>";
  var gK = this.e("headerDiv");
  var B = "";
  if (this.ez) {
    var aQ = (this.ez == 2) ? "checked='true'" : "";
    B += "&nbsp; <input type='checkbox' id='trafficBox' onclick='mc3.trafficClick(this.checked)' " + aQ + " />" + "<a href='javascript:mc3.trafficClick()' style='color:" + this.aA + "' >" + this.hi + "</a>";
  }
  if (this.ew) {
    var aQ = (this.ew == 2) ? "checked='true'" : "";
    B += "&nbsp; <input type='checkbox' id='panoramioBox' onclick='mc3.panoramioClick(this.checked)' " + aQ + " />" + "<a href='javascript:mc3.panoramioClick()' style='color:" + this.aA + "' >" + this.eK + "</a>";
    this.eK;
  }
  if (this.eC) {
    var aQ = (this.eC == 2) ? "checked='true'" : "";
    B += "&nbsp; <input type='checkbox' id='wikipediaBox' onclick='mc3.wikipediaClick(this.checked)' " + aQ + " />" + "<a href='javascript:mc3.wikipediaClick()' style='color:" + this.aA + "' >" + this.fQ + "</a>";
  }
  if (this.dm) {
    var aQ = (this.dm == 2) ? "checked='true'" : "";
    B += "&nbsp; <input type='checkbox' id='googlebarBox' onclick='mc3.googlebarClick(this.checked)' " + aQ + " />" + "<a href='javascript:mc3.googlebarClick()' style='color:" + this.aA + "' >" + this.hb + "</a>";
  }
  gK.innerHTML = B;
  if (this.cS == 0) {
    gK.style.display = "none";
  }
  if (this.kH) {
    if (this.eB) {
      e("headerLinksDiv").innerHTML = "<a id='fullpageLink' target='_blank' href='' title='" + this.gC + "' style='color:" + this.aA + "'>" + this.gD + "</a>&nbsp; ";
    } else {
      e("headerLinksDiv").innerHTML = "<a target='_blank' href='http://www.mapchannels.com' style='color:" + this.aA + "' title='Map Channels - free mapping tools'>Map Channels</a>";
    }
  }
};
function getRSSListing(ax) {
  this.title = "";
  this.description = "";
  this.link = "";
  var im = ax.getElementsByTagName("title")[0];
  if (im) {
    this.title = im.firstChild.nodeValue;
  }
  var cw = ax.getElementsByTagName("description")[0];
  if (cw) {
    this.description = cw.firstChild.nodeValue;
  }
  var cQ = ax.getElementsByTagName("link")[0];
  if (cQ) {
    this.link = cQ.firstChild.nodeValue;
  }
  var html = "<div>";
  if (this.link != "") {
    html += "<a target='_blank' href='" + this.link + "'>" + this.title + "</a> ";
  } else {
    html += "<b>" + this.title + "</b>";
  }
  if (this.description != "") {
    html += " : " + this.description;
  }
  html += "</div>";
  return html;
};
function rssDivMonitor() {
  var aI = e("rssDiv");
  if (aI) {
    var ca = aI.innerHTML;
    if (ca.length > 2 && ca.length < 30 && ca.substr(0, 3) == "...") {
      aI.innerHTML += ".";
    }
  }
  setTimeout("rssDivMonitor()", 100);
};
function infoMaximize() {
  var w = map.getInfoWindow();
  if (w) w.maximize();
};
function infoRestore() {
  var w = map.getInfoWindow();
  if (w) w.restore();
};
MC3.prototype.lF = function (ee) {
  var hx = 0;
  if (this.bh) {
    this.bh.style.display = "block";
    this.bh.style.width = this.cH + "px";
    this.bh.innerHTML = ee;
    hx = this.bh.offsetHeight;
    this.bh.style.display = "none";
  }
  return hx;
};
MC3.prototype.infoClose = function () {
  map.closeInfoWindow();
};
MC3.prototype.infoPrev = function () {
  var cC = true;
  for (var i = 0;
  (i < this.G.length) && cC; i++) {
    if (this.G[i].place == this.I) {
      cC = false;
      i--;
    }
  }
  var g = null;
  if (i > 0) {
    g = this.G[i - 1].place;
  } else {
    i = this.G.length - 1;
    g = this.G[i].place;
  }
  if (g) {
    this.bu(g, false, g.D);
  }
};
MC3.prototype.infoNext = function () {
  var cC = true;
  for (var i = 0;
  (i < this.G.length) && cC; i++) {
    if (this.G[i].place == this.I) {
      cC = false;
      i--;
    }
  }
  var g = null;
  if (i < this.G.length - 1) {
    g = this.G[i + 1].place;
  } else {
    g = this.G[0].place;
  }
  if (g) {
    this.bu(g, false, g.D);
  }
};
function JSON(ki, je) {
  this.jo = ki;
  this.hN = document.getElementsByTagName("head").item(0);
  this.kz = je == true ? true : false;
  this.kB = '&noCacheIE=' + (new Date()).getTime();
};
JSON.prototype.jh = function () {
  this.cJ = document.createElement("script");
  this.cJ.setAttribute("type", "text/javascript");
  this.cJ.setAttribute("charset", "utf-8");
  var bl = this.jo;
  if (this.kz) {
    bl += this.kB;
  }
  this.cJ.setAttribute("src", bl);
};
JSON.prototype.lI = function () {
  this.hN.removeChild(this.cJ);
};
JSON.prototype.jB = function () {
  this.hN.appendChild(this.cJ);
};
function KMLStyle() {
  this.dT = "0";
  this.iconUrl = "http://maps.google.com/mapfiles/ms/icons/red-dot.png";
  this.shadowUrl = "";
  this.iconSize = new GSize(32, 32);
  this.iconAnchor = new GPoint(15, 31);
  this.infoAnchor = new GPoint(15, 0);
  this.shadowAnchor = new GPoint(0, 31);
  this.shadowSize = new GSize(59, 32);
  this.lineWidth = "2";
  this.lineOpacity = 0.7;
  this.lineCol = "#00FF00";
  this.polyOutline = "1";
  this.polyOpacity = 0.4;
  this.polyCol = "#80FF80";
  this.de = "FF000080";
  this.cr = "80FF8055";
};
KMLStyle.prototype.kc = function (a) {
  this.dT = a.getAttribute("id");
  var bX = a.getElementsByTagName("Icon");
  if (bX.length > 0) {
    this.iconUrl = GXml.value(bX[0].getElementsByTagName("href")[0]);
    mc3.jZ(this);
  }
  var fM = a.getElementsByTagName("LineStyle");
  if (fM.length > 0) {
    var fL = fM[0];
    this.lineWidth = parseInt(GXml.value(fL.getElementsByTagName("width")[0]));
    this.de = GXml.value(fL.getElementsByTagName("color")[0]);
    this.lineCol = "#" + this.de.substr(6, 2) + this.de.substr(4, 2) + this.de.substr(2, 2);
    var da = this.de.substr(0, 2);
    var c0 = da.substr(0, 1);
    var c1 = da.substr(1, 1);
    var lm = mc3.aq[c0] * 16 + mc3.aq[c1];
    this.lineOpacity = parseFloat(lm / 255);
  }
  var gc = a.getElementsByTagName("PolyStyle");
  if (gc.length > 0) {
    var gx = gc[0];
    this.polyOutline = parseInt(GXml.value(gx.getElementsByTagName("outline")[0]));
    this.cr = GXml.value(gx.getElementsByTagName("color")[0]);
    this.polyCol = "#" + this.cr.substr(6, 2) + this.cr.substr(4, 2) + this.cr.substr(2, 2);
    var da = this.cr.substr(0, 2);
    var c0 = da.substr(0, 1);
    var c1 = da.substr(1, 1);
    var kt = mc3.aq[c0] * 16 + mc3.aq[c1];
    this.polyOpacity = parseFloat(kt / 255);
  }
};
function LabeledMarker(latlng, opt_opts) {
  this.latlng_ = latlng;
  this.opts_ = opt_opts;
  this.labelText_ = opt_opts.labelText || "";
  this.labelClass_ = opt_opts.labelClass || "LabeledMarker_markerLabel";
  this.labelOffset_ = opt_opts.labelOffset || new GSize(0, 0);
  this.clickable_ = opt_opts.clickable || true;
  this.title_ = opt_opts.title || "";
  this.labelVisibility_ = true;
  if (opt_opts.draggable) {
    opt_opts.draggable = false;
  }
  GMarker.apply(this, arguments);
};
LabeledMarker.prototype = new GMarker(new GLatLng(0, 0));
LabeledMarker.prototype.initialize = function (map) {
  GMarker.prototype.initialize.apply(this, arguments);
  this.map_ = map;
  this.div_ = document.createElement("div");
  this.div_.className = this.labelClass_;
  this.div_.innerHTML = this.labelText_;
  this.div_.style.position = "absolute";
  this.div_.style.cursor = "pointer";
  this.div_.title = this.title_;
  map.getPane(G_MAP_MARKER_PANE).appendChild(this.div_);
  if (this.clickable_) {
    function newEventPassthru(obj, event) {
      return function () {
        GEvent.trigger(obj, event);
      };
    };
    var eventPassthrus = ['click', 'dblclick', 'mousedown', 'mouseup', 'mouseover', 'mouseout'];
    for (var i = 0; i < eventPassthrus.length; i++) {
      var name = eventPassthrus[i];
      GEvent.addDomListener(this.div_, name, newEventPassthru(this, name));
    }
  }
};
LabeledMarker.prototype.redraw = function (force) {
  GMarker.prototype.redraw.apply(this, arguments);
  this.redrawLabel_();
};
LabeledMarker.prototype.redrawLabel_ = function () {
  var p = this.map_.fromLatLngToDivPixel(this.latlng_);
  var z = GOverlay.getZIndex(this.latlng_.lat());
  this.div_.style.left = (p.x + this.labelOffset_.width) + "px";
  this.div_.style.top = (p.y + this.labelOffset_.height) + "px";
  this.div_.style.zIndex = z;
};
LabeledMarker.prototype.remove = function () {
  GEvent.clearInstanceListeners(this.div_);
  if (this.div_.outerHTML) {
    this.div_.outerHTML = "";
  }
  if (this.div_.parentNode) {
    this.div_.parentNode.removeChild(this.div_);
  }
  this.div_ = null;
  GMarker.prototype.remove.apply(this, arguments);
};
LabeledMarker.prototype.copy = function () {
  return new LabeledMarker(this.latlng_, this.opts_);
};
LabeledMarker.prototype.show = function () {
  GMarker.prototype.show.apply(this, arguments);
  if (this.labelVisibility_) {
    this.showLabel();
  } else {
    this.hideLabel();
  }
};
LabeledMarker.prototype.hide = function () {
  GMarker.prototype.hide.apply(this, arguments);
  this.hideLabel();
};
LabeledMarker.prototype.setLatLng = function (latlng) {
  this.latlng_ = latlng;
  GMarker.prototype.setLatLng.apply(this, arguments);
  this.redrawLabel_();
};
LabeledMarker.prototype.setLabelVisibility = function (visibility) {
  this.labelVisibility_ = visibility;
  if (!this.isHidden()) {
    if (this.labelVisibility_) {
      this.showLabel();
    } else {
      this.hideLabel();
    }
  }
};
LabeledMarker.prototype.getLabelVisibility = function () {
  return this.labelVisibility_;
};
LabeledMarker.prototype.hideLabel = function () {
  if (this.div_) {
    this.div_.style.visibility = 'hidden';
  }
};
LabeledMarker.prototype.showLabel = function () {
  if (this.div_) {
    this.div_.style.visibility = 'visible';
  }
};
MC3.prototype.trafficClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("trafficBox").checked);
  }
  if (!this.dL) {
    this.dL = new GTrafficOverlay();
  }
  if (a) {
    this.hv = true;
    map.addOverlay(this.dL);
  } else {
    this.hv = false;
    map.removeOverlay(this.dL);
  }
  e("trafficBox").checked = a;
};
MC3.prototype.panoramioClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("panoramioBox").checked);
  }
  if (!this.ea) {
    this.ea = new GLayer("com.panoramio.all");
  }
  if (a) {
    this.gw = true;
    map.addOverlay(this.ea);
  } else {
    this.gw = false;
    map.removeOverlay(this.ea);
  }
  e("panoramioBox").checked = a;
};
MC3.prototype.wikipediaClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("wikipediaBox").checked);
  }
  if (!this.dz) {
    this.dz = new GLayer("org.wikipedia.en");
  }
  if (a) {
    this.gg = true;
    map.addOverlay(this.dz);
  } else {
    this.gg = false;
    map.removeOverlay(this.dz);
  }
  e("wikipediaBox").checked = a;
};
MC3.prototype.googlebarClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("googlebarBox").checked);
  }
  if (a) {
    map.enableGoogleBar();
  } else {
    map.disableGoogleBar();
  }
  e("googlebarBox").checked = a;
};
MC3.prototype.hL = function () {
  if (mc3.eg) {
    if (this.bY) {
      this.ct = parseInt(document.documentElement.clientWidth);
      this.cB = parseInt(document.documentElement.clientHeight);
    } else {
      this.ct = parseInt(window.innerWidth);
      this.cB = parseInt(window.innerHeight);
    }
    e("mainDiv").style.width = this.ct + "px";
    e("mainDiv").style.height = this.cB + "px";
  } else {
    e("mainDiv").style.display = "block";
    this.ct = e("mainDiv").offsetWidth;
    this.cB = e("mainDiv").offsetHeight;
  }
  this.cE = this.cB - this.cS - this.cp;
  this.bi = this.cE;
  this.cu = this.bi - this.cP;
  if (this.hU) {
    this.cu -= 32;
  }
  if (this.hR) {
    this.cu -= 32;
  }
  if (this.cX) {
    this.cu -= 24;
  }
  if (this.F > 0) {
    this.bB = this.ct - this.ac;
  } else {
    this.bB = this.ct;
  }
  if (this.aE) {
    if (this.M > 0) {
      this.cg = parseInt(this.cE / 2);
      this.ck = this.cE - this.cg;
    } else {
      this.cg = this.cE;
      this.ck = 0;
    }
  } else {
    this.cg = 0;
    this.ck = this.cE;
  }
};
function createLayout() {
  if (!mc3.fS) {
    mc3.F = -1;
  }
  mc3.hL();
  if (mc3.cB > 0) {
    mc3.ja();
  } else {
    setTimeout("createLayout()", 100);
  }
};
MC3.prototype.ja = function () {
  e("mainDiv").style.backgroundColor = "white";
  var lu = mc3.e("mainDiv");
  lu.innerHTML = "<table cellspacing=0 cellpadding=0 style=\"" + this.kS + ";width:100%\"><tr valign=top style='height:" + this.cS + "px'><td style='width:" + this.ac + "px'>" + "<div id='headerSideDiv'></div>" + "</td><td>" + "<div id='headerDiv'></div>" + "</td><td style='padding-right:4px;padding-top:2px' align='right'>" + "<div id='headerLinksDiv'></div>" + "</td></tr></table>" + "<table cellspacing=0 cellpadding=0 style='width:100%'><tr valign=top><td id='sidebarCol' style='width:" + this.ac + "px'>" + "<div id='sidebarDiv' style=\"" + this.hg + "\">" + "<div id='localityDiv' style='display:none' style='height:32px;width:" + this.ac + "px'>" + "<table cellpadding=0 cellspacing=0 style='width:100%'><tr style='height:32px' valign='middle'><td style='width:100%' align='center'>" + "<select id='localitySelect' style='width:" + (this.ac - 8) + "px' onchange='mc3.localityClick(this)'></select>" + "</td></tr></table>" + "</div>" + "<div id='feedBar' style='width:" + (this.ac - 20) + "px;height:" + this.cP + "px;" + (this.cP ? "" : "display:none") + "'>" + "<div id='feedBarHeaderDiv' style='" + this.hf + ";width:" + this.ac + "px;height:20px'>" + "<div style='float:right'><a href='javascript:mc3.filtersReset()' style='color:" + this.ho + "'>" + this.eL + "</a>&nbsp;</div>" + "&nbsp;" + this.jv + "</div>" + "<div id='feedBarOuterDiv' style='width:" + this.ac + "px;height:" + (this.cP - 20) + "px;overflow:auto'>" + "<div id='feedBarInnerDiv' style='width:" + (this.ac - 20) + "px'></div>" + "</div></div>" + "<div id='nameFilterDiv' style='display:none' style='height:32px;width:" + this.ac + "px'>" + "<table cellpadding=0 cellspacing=0 style='width:100%'><tr style='height:32px' valign='middle'><td style='padding-left:4px'>" + "<input type='text' id='nameFilterText' onFocus='mc3.focusNameFilter()' onBlur='mc3.unfocusNameFilter()' style='color:gray;width:" + (this.ac - 32) + "px' onkeyup='mc3.nameFilterChange(this)' value='" + this.hX + "'>" + "</td><td style='width:20px;padding-right:2px' align='right'>" + "<a href='javascript:mc3.clearNameFilter()' style='background-color:gainsboro;color:black;text-decoration:none;padding:4px;padding-left:6px;padding-right:6px'>x</a>" + "</td></tr></table>" + "</div>" + "<div id='clusterFilterDiv' style='display:none' style='height:24px;width:" + this.ac + "px'>" + "<table cellpadding=0 cellspacing=0 style='width:100%'><tr style='height:24px' valign='middle'><td style='width:100%'>" + "<input type='Checkbox' id='clusterBox' onclick='mc3.clusterCheck(this)' checked='true' /> Enable Clustering" + "</td></tr></table>" + "</div>" + "<div id='indexHeaderDiv' style=\"" + this.hf + ";width:" + this.ac + "px;height:24px\">" + "<div style='float:right'><a href='javascript:viewAllMarkers()' style='color:" + this.ho + "'>" + this.hp + "</a>&nbsp;</div>" + "<input type='checkbox' id='markersBox' onclick='mc3.markersClick(this.checked)' checked='true' />" + "<span id='indexHeaderSpan'></span>" + "</div>" + "<div id='indexOuterDiv' style='width:" + this.ac + "px;height:" + (this.cu - 24) + "px;overflow:auto'>" + "<div id='indexDiv' style='width:" + (this.ac - 20) + "px'></div>" + "</div>" + "</div>" + "<div id='directionsDiv' style=\"" + this.hg + ";display:none;padding:2px;height:" + this.bi + "px\">" + "<div id='directionsHeader' style='display:block;width:" + (this.ac - 4) + "px;height:25px'>" + "<div style='float:right'><a href='javascript:closeDirections()'>" + this.eO + "</a>&nbsp;</div>" + "<span id='directionsTitle' style='font-weight:bold'></span>" + "</div>" + "<div id='directionsQueryPanel'>" + "<table cellspacing='4' style='width:100%'><tr><td style='width:50%'>" + this.gM + "</td><td align='right'>" + "<a href='javascript:reverseDirections()' style='color:green'>" + this.gU + "</a>" + "</td></tr><tr><td colspan=2>" + "<input id='fromText' type='text' style='width:220px' />" + "</td></tr><tr><td colspan=2>" + this.hu + "</td></tr><tr><td colspan=2>" + "<input id='toText' type='text' style='width:220px' />" + "</td></tr><tr><td>" + this.hj + "</td><td>" + "<select id='travelModeSelect' style='width:100px'>" + "<option selected='selected'>" + this.gI + "</option>" + "<option>" + this.fP + "</option>" + "</select>" + "</td></tr><tr><td>" + this.hA + "</td><td>" + "<select id='avoidHighwaysSelect' style='width:100px'>" + "<option selected='selected'>" + this.hc + "</option>" + "<option>" + this.fV + "</option>" + "</select>" + "</td></tr><tr><td>" + this.gG + "</td><td>" + "<select id='languageSelect' style='width:100px'>" + "<option value='en_US' selected>English (en)</option>" + "<option value='zh-CN'>Chinese (zh-CN)</option>" + "<option value='cs'>Czech (cs)</option>" + "<option value='da'>Danish (da)</option>" + "<option value='nl'>Dutch (nl)</option>" + "<option value='fr'>French (fr)</option>" + "<option value='de'>German (de)</option>" + "<option value='el'>Greece (el)</option>" + "<option value='fi'>Finnish (fi)</option>" + "<option value='it'>Italian (it)</option>" + "<option value='ja'>Japanese (ja)</option>" + "<option value='ko'>Korean (ko)</option>" + "<option value='no'>Norwegian (no)</option>" + "<option value='pl'>Polish (pl)</option>" + "<option value='pt'>Portuguese (pt)</option>" + "<option value='ru'>Russian (ru)</option>" + "<option value='es'>Spanish (es)</option>" + "<option value='sv'>Swedish (sv)</option>" + "<option value='th'>Thai (th)</option>" + "</select>" + "</td></tr><tr><td>" + "<input type='button' value='" + this.gE + "' onclick='findDirections()' style='width:50px' />" + "</td></tr></table>" + "</div>" + "<div id='directionsResultPanel' style='display:none;overflow:auto;width:" + (this.ac - 4) + "px;height:" + (this.bi - 36) + "px'>" + "<div id='dirContent' style='width:" + (this.ac - 32) + "px'></div></div>" + "</div>" + "<div id='searchDiv' style='display:none'>" + "<div id='searchHeader' style='width:100%;height:25px'>" + "<b>" + this.hF + "</b>" + "</div>" + "<div id='searchContent' style='padding:4px'></div>" + "</div>" + "<div id='sideInfoDiv' style='width:" + (this.ac) + "px;display:none;overflow:auto'>" + "<div id='sideInfoContent' style='padding:4px'></div>" + "</div>" + "<div id='aboutDiv' style='display:none;overflow:auto'>" + "<div id='aboutContent' style='padding:4px'></div>" + "</div>" + "</td><td>" + "<div id='gmapDiv' style='width:" + this.bB + "px;height:" + this.cg + "px'></div>" + "<div id='panHeaderDiv' style='width:200px;height:22px;display:none'>" + "<table style='width:100%;text-align:left'><tr><td>" + "<span id='panTitle' style='font-weight:bold'></span>" + "</td><td align='right'>" + "<a id='panRotateLink' href='javascript:panRotate()' style='color:green'>" + this.gS + "</a> " + "<a href='javascript:panClose()' style='color:blue'>" + this.eO + "</a>" + "</td></tr></table></div>" + "<div id='panOuterDiv' style='width:200px;height:200px;display:none'>" + "<div id='panDiv' style='width:200px;height:200px'></div>" + "</div>" + "<div id='veDiv' style='width:200px;height:200px;display:none'></div>" + "</td></tr></table>" + "<div id='footerDiv' style=\"" + this.kF + ";display:none;v\">" + "<table cellspacing=0 cellpadding=0 style='width:100%'><tr valign=top style='height:" + this.cp + "px'><td style='width:" + this.ac + "px;padding-top:2px' align='center'>" + "<div id='coordDiv' style='padding-left:4px;padding-top:2px;display:none'></div>" + "<div id='loadingDiv' style='padding-left:4px;padding-top:2px'>&lt; Loading Map &gt;</div>" + "</td><td style='padding-left:2px;padding-top:2px'>" + "<div id='footerMainDiv'></div>" + "</td><td style='padding-left:2px;padding-top:2px' align='right'>" + "<div id='footerLinksDiv'></div>" + "</td></tr></table>" + "</div>";
  this.kN();
  this.kM();
  this.kO();
  this.kT();
  this.iP();
  this.ap();
  this.initialize3();
};
var currentInfoMode = false;
var currentMapMode = false;
var currentSidebarMode = false;
MC3.prototype.ap = function () {
  if (typeof(map) == "undefined") {
    return;
  }
  if (map) {
    var L = map.getCenter();
  }
  this.hL();
  e("gmapDiv").style.width = this.bB + "px";
  e("gmapDiv").style.height = this.cg + "px";
  e("panHeaderDiv").style.width = this.bB + "px";
  e("panHeaderDiv").style.height = "22px";
  e("panDiv").style.width = this.bB + "px";
  e("panOuterDiv").style.width = this.bB + "px";
  if (this.ck >= 22) {
    e("panDiv").style.height = (this.ck - 22) + "px";
    e("panOuterDiv").style.height = (this.ck - 22) + "px";
  }
  e("veDiv").style.width = this.bB + "px";
  e("veDiv").style.height = this.ck + "px";
  if (this.F > 0) {
    e("sidebarCol").style.width = this.ac + "px";
  } else {
    e("sidebarCol").style.width = "0px";
  }
  e("sideInfoDiv").style.width = this.ac + "px";
  e("sideInfoDiv").style.height = this.bi + "px";
  e("sideInfoContent").style.width = (this.ac - 32) + "px";
  e("directionsDiv").style.height = (this.bi - 4) + "px";
  if (this.cg >= 40) {
    e("directionsResultPanel").style.height = (this.bi - 36) + "px";
  }
  e("searchDiv").style.width = this.ac + "px";
  e("searchDiv").style.height = this.bi + "px";
  e("aboutDiv").style.width = this.ac + "px";
  e("aboutDiv").style.height = this.bi + "px";
  if (this.F != 1) e("sidebarDiv").style.display = "none";
  if (this.F != 2) e("directionsDiv").style.display = "none";
  if (this.F != 3) e("searchDiv").style.display = "none";
  if (this.F != 4) e("sideInfoDiv").style.display = "none";
  if (this.F != 5) e("aboutDiv").style.display = "none";
  e("localityDiv").style.display = this.hU ? "block" : "none";
  e("nameFilterDiv").style.display = this.hR ? "block" : "none";
  e("clusterFilterDiv").style.display = (this.cX) ? "block" : "none";
  e("sidebarDiv").style.display = this.F == 1 ? "block" : "none";
  e("directionsDiv").style.display = this.F == 2 ? "block" : "none";
  e("searchDiv").style.display = this.F == 3 ? "block" : "none";
  e("sideInfoDiv").style.display = this.F == 4 ? "block" : "none";
  e("aboutDiv").style.display = this.F == 5 ? "block" : "none";
  e("panHeaderDiv").style.display = this.M == 3 ? "block" : "none";
  e("panOuterDiv").style.display = this.M == 3 ? "block" : "none";
  e("veDiv").style.display = this.M == 4 ? "block" : "none";
  var cy = false;
  if ((this.F > 0) != currentSidebarMode) {
    cy = true;
    currentSidebarMode = (this.F > 0);
  }
  if ((this.M > 0) != currentInfoMode) {
    cy = true;
    currentInfoMode = (this.M > 0);
  }
  if (this.aE != currentMapMode) {
    cy = true;
    currentMapMode = this.aE;
  }
  if (cy) {
    e("gmapDiv").style.display = this.aE ? "block" : "none";
  }
  if (e("mapBox")) {
    e("mapBox").checked = this.aE;
  }
  if (e("streetviewBox")) {
    e("streetviewBox").checked = this.M == 3;
  }
  if (e("veBox")) {
    e("veBox").checked = this.M == 4;
  }
  if (this.aK) {
    if (this.M == 3) {
      this.aK.show();
    } else {
      this.aK.hide();
    }
  }
  if (map) {
    if (this.M != 3) {
      this.io(false);
    }
    if (cy) {
      map.checkResize();
    }
    if (this.M != this.cz) {
      this.cz = this.M;
      map.setCenter(L);
    }
  }
  if (mc3.bt && this.M == 3) {
    mc3.bt.checkResize();
  }
  if (this.M > 0 && this.bw == 2) {
    map.removeControl(this.az);
    map.addControl(this.bm);
    this.bw = 1;
  }
  if (this.M == 0 && this.bw == 1) {
    map.removeControl(this.bm);
    map.addControl(this.az);
    this.bw = 2;
  }
  if (this.ba) {
    if (this.bw == 2 && e("controlsBox").checked) {
      this.ba.enable();
    } else {
      this.ba.disable();
    }
  }
};
function MC3Locality() {
  this.eD = "";
  this.x = null;
  this.y = null;
  this.z = null;
};
MC3Locality.prototype.kZ = function (a) {
  var b = "";
  for (var i = 0; i < a.length; i++) {
    var c = a.substr(i, 1);
    if (c >= ' ') {
      b += c;
    }
  }
  var aX = b.split(" ");
  if (aX.length > 3) {
    this.y = parseFloat(aX[0]);
    this.x = parseFloat(aX[1]);
    this.z = parseInt(aX[2]);
    for (var i = 3; i < aX.length; i++) {
      if (i > 3) {
        this.eD += " ";
      }
      this.eD += aX[i];
    }
  }
};
MC3.prototype.kT = function (a) {
  var ay = e("localitySelect");
  if (ay) {
    var fs = new Option(this.jW, 0, true, true);
    ay.options[0] = fs;
    for (var i = 0; i < this.eb.length; i++) {
      var bf = this.eb[i];
      fs = new Option(bf.eD, (i + 1), false, false);
      ay.options[i + 1] = fs;
    }
  }
};
MC3.prototype.localityClick = function (a) {
  var ix = parseInt(a.value);
  if (ix > 0) {
    var bf = this.eb[ix - 1];
    var aa = new GLatLng(bf.y, bf.x);
    map.setCenter(aa, bf.z);
    setTimeout("localityReset()", 2500);
  }
};
function localityReset() {
  var ay = e("localitySelect");
  ay.value = "0";
};
var mc3 = new MC3();
function MC3() {
  this.gmap = null;
  this.vemap = null;
  this.streetview = null;
  this.lB = true;
  this.lK = false;
  this.lH = false;
  this.lE = [];
  this.ao = null;
  this.au = 0;
  this.aD = 0;
  this.G = [];
  this.bs = [];
  this.ep = false;
  this.bg = true;
  this.af = null;
  this.I = null;
  this.lD = 0;
  this.lw = false;
  this.es = "_blank";
  this.M = 0;
  this.cz = 0;
  this.bj = null;
  this.bq = null;
  this.bT = null;
  this.er = null;
  this.eq = "";
  this.cv = null;
  this.dF = false;
  this.dL = null;
  this.hv = false;
  this.ea = null;
  this.gw = false;
  this.dz = null;
  this.gg = false;
  this.bt = null;
  this.fN = null;
  this.aM = null;
  this.dM = null;
  this.aK = null;
  this.aP = 0;
  this.dJ = true;
  this.eo = 0;
  this.lz = 0;
  this.aE = true;
  this.lO = true;
  this.R = [];
  this.bF = [];
  this.aJ = 0;
  this.F = 1;
  this.lQ = 0;
  this.aB = null;
  this.K = [];
  this.dg = [];
  this.cD = [];
  this.dN = "";
  this.cO = false;
  this.eG = false;
  this.dY = null;
  this.iD = null;
  this.ba = null;
  this.lG = false;
};
MC3.prototype.ke = function (bL) {
  var iu = false;
  var cF = GXml.parse(bL);
  var l = cF.documentElement;
  this.lP = GXml.value(l.getElementsByTagName("mapID")[0]);
  this.bV = GXml.value(l.getElementsByTagName("title")[0]);
  this.iz = GXml.value(l.getElementsByTagName("description")[0]);
  this.lA = GXml.value(l.getElementsByTagName("language")[0]);
  this.ac = parseInt(GXml.value(l.getElementsByTagName("sizeSidebarWidth")[0]));
  this.cS = parseInt(GXml.value(l.getElementsByTagName("sizeHeaderHeight")[0]));
  this.cp = parseInt(GXml.value(l.getElementsByTagName("sizeFooterHeight")[0]));
  this.cP = parseInt(GXml.value(l.getElementsByTagName("sizeFeedsHeight")[0]));
  this.eg = parseInt(GXml.value(l.getElementsByTagName("sizeAutoResize")[0]));
  this.iA = parseInt(GXml.value(l.getElementsByTagName("mapType")[0]));
  this.kr = parseInt(GXml.value(l.getElementsByTagName("mapPhysical")[0]));
  this.kk = parseInt(GXml.value(l.getElementsByTagName("mapGE")[0]));
  this.iG = parseInt(GXml.value(l.getElementsByTagName("mapOverview")[0]));
  this.kn = parseInt(GXml.value(l.getElementsByTagName("mapScrollWheelZoom")[0]));
  this.km = parseInt(GXml.value(l.getElementsByTagName("mapDoubleClickZoom")[0]));
  this.kw = parseInt(GXml.value(l.getElementsByTagName("mapContinuousZoom")[0]));
  this.kj = parseInt(GXml.value(l.getElementsByTagName("mapNavControl")[0]));
  this.iE = parseInt(GXml.value(l.getElementsByTagName("mapTypeControl")[0]));
  this.kp = parseInt(GXml.value(l.getElementsByTagName("mapScaleControl")[0]));
  this.dD = parseInt(GXml.value(l.getElementsByTagName("mapControlsVisible")[0]));
  this.is = GXml.value(l.getElementsByTagName("mapDictionary")[0]);
  this.kl = parseInt(GXml.value(l.getElementsByTagName("mapCursor")[0]));
  this.kS = GXml.value(l.getElementsByTagName("styleHeader")[0]);
  this.kF = GXml.value(l.getElementsByTagName("styleFooter")[0]);
  this.hf = GXml.value(l.getElementsByTagName("styleSubHeader")[0]);
  this.hg = GXml.value(l.getElementsByTagName("styleSidebar")[0]);
  this.hq = GXml.value(l.getElementsByTagName("styleInfoWindow")[0]);
  this.dG = GXml.value(l.getElementsByTagName("styleColourHighlight")[0]);
  this.aR = GXml.value(l.getElementsByTagName("styleColourSelect")[0]);
  this.aA = GXml.value(l.getElementsByTagName("styleColourHeaderLink")[0]);
  this.kL = GXml.value(l.getElementsByTagName("styleColourFooterLink")[0]);
  this.ho = GXml.value(l.getElementsByTagName("styleColourSubHeaderLink")[0]);
  this.ed = GXml.value(l.getElementsByTagName("styleColourFilterLink")[0]);
  this.kC = GXml.value(l.getElementsByTagName("styleColourInfoWindowLink")[0]);
  this.ew = parseInt(GXml.value(l.getElementsByTagName("layerPanoramio")[0]));
  this.eC = parseInt(GXml.value(l.getElementsByTagName("layerWikipedia")[0]));
  this.dQ = parseInt(GXml.value(l.getElementsByTagName("layerVE")[0]));
  this.cj = parseInt(GXml.value(l.getElementsByTagName("layerStreetview")[0]));
  this.ez = parseInt(GXml.value(l.getElementsByTagName("layerTraffic")[0]));
  this.dm = parseInt(GXml.value(l.getElementsByTagName("layerGoogleBar")[0]));
  this.ll = parseInt(GXml.value(l.getElementsByTagName("layerPrint")[0]));
  this.kH = parseInt(GXml.value(l.getElementsByTagName("layerFullPage")[0]));
  this.iV = parseInt(GXml.value(l.getElementsByTagName("infoName")[0]));
  this.cH = parseInt(GXml.value(l.getElementsByTagName("infoWidth")[0]));
  this.dC = parseInt(GXml.value(l.getElementsByTagName("infoHeight")[0]));
  this.iq = parseInt(GXml.value(l.getElementsByTagName("infoBlowup")[0]));
  this.ip = parseInt(GXml.value(l.getElementsByTagName("infoDirections")[0]));
  this.ic = parseInt(GXml.value(l.getElementsByTagName("infoZoom")[0]));
  this.jd = parseInt(GXml.value(l.getElementsByTagName("infoLineDetail")[0]));
  this.ib = parseInt(GXml.value(l.getElementsByTagName("infoMaximizable")[0]));
  this.dq = parseInt(GXml.value(l.getElementsByTagName("infoSidebar")[0]));
  this.dA = parseInt(GXml.value(l.getElementsByTagName("infoIconWidth")[0]));
  this.jc = parseInt(GXml.value(l.getElementsByTagName("infoIconHeight")[0]));
  this.cG = GXml.value(l.getElementsByTagName("infoInitial")[0]);
  var ik = GXml.value(l.getElementsByTagName("infoTargetFrame")[0]);
  if (ik) {
    this.es = ik;
  }
  this.fS = parseInt(GXml.value(l.getElementsByTagName("sidebarVisible")[0]));
  this.fA = parseInt(GXml.value(l.getElementsByTagName("sidebarSnippetLength")[0]));
  this.fT = parseInt(GXml.value(l.getElementsByTagName("sidebarSortOrder")[0]));
  this.eP = parseInt(GXml.value(l.getElementsByTagName("sidebarIconWidth")[0]));
  this.fH = parseInt(GXml.value(l.getElementsByTagName("sidebarIconHeight")[0]));
  this.ju = parseInt(GXml.value(l.getElementsByTagName("footerLatLong")[0]));
  this.jt = parseInt(GXml.value(l.getElementsByTagName("footerZoom")[0]));
  this.bA = parseInt(GXml.value(l.getElementsByTagName("clusterEnable")[0]));
  this.iC = parseInt(GXml.value(l.getElementsByTagName("clusterGap")[0]));
  this.bz = parseInt(GXml.value(l.getElementsByTagName("clusterMaxZoom")[0]));
  this.dw = parseInt(GXml.value(l.getElementsByTagName("clusterMinMarkers")[0]));
  this.du = GXml.value(l.getElementsByTagName("clusterIconUrl")[0]);
  this.jl = parseInt(GXml.value(l.getElementsByTagName("clusterIconWidth")[0]));
  this.jn = parseInt(GXml.value(l.getElementsByTagName("clusterIconHeight")[0]));
  this.it = parseInt(GXml.value(l.getElementsByTagName("clusterIconAnchorX")[0]));
  this.jk = parseInt(GXml.value(l.getElementsByTagName("clusterIconAnchorY")[0]));
  this.cX = parseInt(GXml.value(l.getElementsByTagName("clusterOption")[0]));
  this.hU = parseInt(GXml.value(l.getElementsByTagName("localityEnable")[0]));
  this.jW = GXml.value(l.getElementsByTagName("localityTitle")[0]);
  this.jO = GXml.value(l.getElementsByTagName("localityList")[0]);
  this.jv = GXml.value(l.getElementsByTagName("filterTitle")[0]);
  this.jp = parseInt(GXml.value(l.getElementsByTagName("filterFeedsZoomFit")[0]));
  this.hX = GXml.value(l.getElementsByTagName("filterNameTitle")[0]);
  this.hR = parseInt(GXml.value(l.getElementsByTagName("filterNameEnable")[0]));
  this.eb = [];
  var fX = this.jO.split("\n");
  for (var i = 0; i < fX.length; i++) {
    var bf = new MC3Locality();
    bf.kZ(fX[i]);
    this.eb[i] = bf;
  }
  this.lq = GXml.value(l.getElementsByTagName("linkAbout")[0]);
  this.eB = GXml.value(l.getElementsByTagName("linkFullPage")[0]);
  this.lb = GXml.value(l.getElementsByTagName("linkVEMap")[0]);
  this.kW = parseInt(GXml.value(l.getElementsByTagName("layerGoogleMapAds")[0]));
  this.fa = GXml.value(l.getElementsByTagName("adsenseSearchID")[0]);
  this.hJ = GXml.value(l.getElementsByTagName("adsenseSearchChannel")[0]);
  if (this.fa.length > 10) {} else {
    //this.fa = "partner-pub-5408854154696215";
    //this.hJ = "1242653575";
    this.fa = "";
    this.hJ = "";
  }
  this.jJ = GXml.value(l.getElementsByTagName("adsenseMapAdID")[0]);
  this.jA = GXml.value(l.getElementsByTagName("adsenseMapAdChannel")[0]);
  this.jz = parseInt(GXml.value(l.getElementsByTagName("adsenseMapAdFormat")[0]));
  var gp = l.getElementsByTagName("feed");
  for (var i = 0; i < gp.length; i++) {
    var ae = gp[i];
    var o = new MC3Feed();
    o.ar = ae.getAttribute("feedID");
    o.bV = ae.getAttribute("title");
    o.cx = ae.getAttribute("url");
    o.ab = ae.getAttribute("type");
    var ks = ae.getAttribute("customStyle");
    if (ks) {
      o.ej = true;
      if (!o.P) {
        o.P = new KMLStyle();
      }
      var C = o.P;
      C.iconUrl = GXml.value(ae.getElementsByTagName("iconUrl")[0]);
      var wd = GXml.value(ae.getElementsByTagName("iconWidth")[0]);
      var ht = GXml.value(ae.getElementsByTagName("iconHeight")[0]);
      C.iconSize = new GSize(wd, ht);
      var x = parseInt(GXml.value(ae.getElementsByTagName("iconAnchorX")[0]));
      var y = parseInt(GXml.value(ae.getElementsByTagName("iconAnchorY")[0]));
      C.iconAnchor = new GPoint(x, y);
      var x = parseInt(GXml.value(ae.getElementsByTagName("infoAnchorX")[0]));
      var y = parseInt(GXml.value(ae.getElementsByTagName("infoAnchorY")[0]));
      C.infoAnchor = new GPoint(x, y);
      C.lineWidth = parseInt(GXml.value(ae.getElementsByTagName("lineWidth")[0]));
      C.lineOpacity = parseFloat(GXml.value(ae.getElementsByTagName("lineOpacity")[0]));
      C.lineCol = "#" + GXml.value(ae.getElementsByTagName("lineColour")[0]);
      C.polyOutline = GXml.value(ae.getElementsByTagName("polyOutline")[0]);
      C.polyOpacity = parseFloat(GXml.value(ae.getElementsByTagName("polyOpacity")[0]));
      C.polyCol = "#" + GXml.value(ae.getElementsByTagName("polyColour")[0]);
    }
    if (o.ab == "txt" || o.ab == "gss") {
      o.eh = GXml.value(ae.getElementsByTagName("templateSidebar")[0]);
      o.he = GXml.value(ae.getElementsByTagName("templateDescription")[0]);
      o.hh = GXml.value(ae.getElementsByTagName("templateDescriptionMax")[0]);
      o.ec = GXml.value(ae.getElementsByTagName("templateTooltip")[0]);
      o.dS = GXml.value(ae.getElementsByTagName("templateIcon")[0]);
      o.cT = GXml.value(ae.getElementsByTagName("templateRSS")[0]);
      if (o.cT) {
        iu = true;
      }
      var feed = o;
      if (o.eh != "") {
        eval("feed.bv = function(place) { " + o.eh + ";};");
      }
      if (o.he != "") {
        eval("feed.di = function(place) { " + o.he + ";};");
      }
      if (o.hh != "") {
        eval("feed.hQ = function(place) { " + o.hh + ";};");
      }
      if (o.ec != "") {
        eval("feed.eF = function(place) { " + o.ec + ";};");
      }
      if (o.dS != "") {
        eval("feed.eI = function(place) { " + o.dS + ";};");
      }
      if (o.cT != "") {
        eval("feed.jK = function(place) { " + o.cT + ";};");
      }
    }
    this.K.push(o);
    this.dg[o.ar] = o;
  }
  /*
  if (this.cp < 24) {
    this.cp = 24;
  }
  */
  if (this.cS < 24) {
    this.cS = 24;
  }
  if (iu) {
    this.dq = 1;
  }
  if (this.dq) {
    this.dC = 0;
    this.ib = 0;
  }
  if (!this.bA) {
    this.cX = 0;
  }
};
MC3.prototype.initialize = function () {
  if (typeof(createLayout) != "undefined") {
    this.jC();
    this.iJ();
    this.kV();
    this.kR();
    this.initialize1();
  }
};
MC3.prototype.initialize1 = function () {
  this.kY();
};
MC3.prototype.initialize2 = function () {
  createLayout();
};
MC3.prototype.initialize3 = function () {
  this.jb();
  if (this.bj == null || this.bq == null) {
    if (this.K.length == 0 || this.R.length == 0) {
      map.setCenter(new GLatLng(0, 0), 1);
    } else {
      for (var i = 0; i < this.K.length; i++) {
        var o = this.K[i];
        for (var j = 0; j < o.R.length; j++) {
          var g = o.R;
          if (!g.D && g.J) {
            g.D = g.J.getCenter();
          }
        }
      }
      viewAllMarkers();
    }
  }
  var aT = null;
  if (this.cG) {
    for (var f = 0; f < this.K.length && !aT; f++) {
      var o = this.K[f];
      for (var i = 0; i < o.R.length && !aT; i++) {
        var g = o.R[i];
        if (g.name == this.cG) {
          aT = g;
        }
        if (g.id == this.cG) {
          aT = g;
        }
      }
    }
  }
  if (aT) {
    var ah = map.getZoom();
    if (mc3.bA && ah < mc3.bz) {
      ah = mc3.bz;
    }
    map.setCenter(aT.D, ah);
  }
  if (mc3.bA) {
    this.cO = true;
    this.jM();
    this.aS();
  } else {
    this.kG();
  }
  this.jg();
  if (this.dP) {
    aT = this.dP;
  }
  if (aT) {
    this.I = aT;
    this.bu(this.I);
  }
  setTimeout("panRotateTimer()", 1000);
  e("coordDiv").style.display = "block";
  e("loadingDiv").style.display = "none";
  if (this.dP) {
    viewDirections();
    map.setCenter(this.dP.D);
  }
  if (typeof(customMapInit) != "undefined") {
    customMapInit();
  }
};
function initDictionary() {
  function processDictionary(a) {
    mc3.kX(a);
    mc3.initialize();
  };
  if (mc3.is) {
    var url = mc3.is + ".dictionary.xml?v=" + (new Date()).getDate();
    GDownloadUrl(url, processDictionary);
  } else {
    mc3.kQ();
    mc3.initialize();
  }
};
function initPage() {
  function processLoad(a) {
    mc3.ke(a);
    initDictionary();
  };
  var url = mapID + ".xml?v=" + (new Date()).getTime();
  GDownloadUrl(url, processLoad);
};
function closePage() {
  for (var f = 0; f < mc3.K.length; f++) {
    var o = mc3.K[f];
    for (var i = 0; i < o.R.length; i++) {
      var g = o.R[i];
      delete g;
    }
    delete o;
  }
  delete mc3;
  GUnload();
};
function resizePage() {
  if (mc3.eg) {
    mc3.ap();
  }
};
MC3.prototype.kR = function () {
  this.gk = [['blue-dot', 'msmarker.shadow.png', 16, 31], ['red-dot', 'msmarker.shadow.png', 16, 31], ['green-dot', 'msmarker.shadow.png', 16, 31], ['ltblue-dot', 'msmarker.shadow.png', 16, 31], ['yellow-dot', 'msmarker.shadow.png', 16, 31], ['purple-dot', 'msmarker.shadow.png', 16, 31], ['pink-dot', 'msmarker.shadow.png', 16, 31], ['blue', 'msmarker.shadow.png', 16, 31], ['red', 'msmarker.shadow.png', 16, 31], ['green', 'msmarker.shadow.png', 16, 31], ['lightblue', 'msmarker.shadow.png', 16, 31], ['yellow', 'msmarker.shadow.png', 16, 31], ['purple', 'msmarker.shadow.png', 16, 31], ['pink', 'msmarker.shadow.png', 16, 31], ['ylw-circle_maps', 'msmarker.shadow.png', 16, 31], ['grn-circle_maps', 'msmarker.shadow.png', 16, 31], ['ltblu-circle_maps', 'msmarker.shadow.png', 16, 31], ['red-circle_maps', 'msmarker.shadow.png', 16, 31], ['pink-circle_maps', 'msmarker.shadow.png', 16, 31], ['blue-pushpin', 'msmarker.shadow.png', 10, 30], ['red-pushpin', 'msmarker.shadow.png', 10, 30], ['grn-pushpin', 'msmarker.shadow.png', 10, 30], ['ltblu-pushpin', 'msmarker.shadow.png', 10, 30], ['ylw-pushpin', 'msmarker.shadow.png', 10, 30], ['purple-pushpin', 'msmarker.shadow.png', 10, 30], ['pink-pushpin', 'msmarker.shadow.png', 10, 30], ['restaurant', 'restaurant.shadow.png', 16, 16], ['coffeehouse', 'coffeehouse.shadow.png', 16, 16], ['bar', 'bar.shadow.png', 16, 16], ['snack_bar', 'snack_bar.shadow.png', 16, 16], ['man', 'man.shadow.png', 16, 16], ['woman', 'woman.shadow.png', 16, 16], ['wheel_chair_accessible', 'wheel_chair_accessible.shadow.png', 16, 16], ['parkinglot', 'parkinglot.shadow.png', 16, 16], ['cabs', 'cabs.shadow.png', 16, 16], ['bus', 'bus.shadow.png', 16, 16], ['truck', 'truck.shadow.png', 16, 16], ['rail', 'rail.shadow.png', 16, 16], ['plane', 'plane.shadow.png', 16, 16], ['ferry', 'ferry.shadow.png', 16, 16], ['helicopter', 'helicopter.shadow.png', 16, 16], ['subway', 'subway.shadow.png', 16, 16], ['tram', 'tram.shadow.png', 16, 16], ['info', 'info.shadow.png', 16, 16], ['info_circle', 'info_circle.shadow.png', 16, 16], ['flag', 'flag.shadow.png', 11, 29], ['rainy', 'rainy.shadow.png', 16, 16], ['water', 'water.shadow.png', 16, 16], ['snowflake_simple', 'snowflake_simple.shadow.png', 16, 16], ['marina', 'marina.shadow.png', 16, 16], ['fishing', 'fishing.shadow.png', 16, 16], ['sailing', 'sailing.shadow.png', 16, 16], ['swimming', 'swimming.shadow.png', 16, 16], ['ski', 'ski.shadow.png', 16, 16], ['tree', 'tree.shadow.png', 16, 16], ['campfire', 'campfire.shadow.png', 16, 16], ['picnic', 'picnic.shadow.png', 16, 16], ['campground', 'campground.shadow.png', 16, 16], ['rangerstation', 'rangerstation.shadow.png', 16, 16], ['toilets', 'toilets.shadow.png', 16, 16], ['poi', 'POI.shadow.png', 25, 24], ['hiker', 'hiker.shadow.png', 16, 16], ['cycling', 'cycling.shadow.png', 16, 16], ['motorcycling', 'motorcycling.shadow.png', 16, 16], ['horsebackriding', 'horsebackriding.shadow.png', 16, 16], ['sportvenue', 'sportvenue.shadow.png', 16, 16], ['golfer', 'golfer.shadow.png', 16, 16], ['trail', 'trail.shadow.png', 16, 16], ['shopping', 'shopping.shadow.png', 16, 16], ['movies', 'movies.shadow.png', 16, 16], ['grocerystore', 'grocerystore.shadow.png', 16, 16], ['convienancestore', 'convienancestore.shadow.png', 16, 16], ['arts', 'arts.shadow.png', 16, 16], ['homegardenbusiness', 'homegardenbusiness.shadow.png', 16, 31], ['electronics', 'electronics.shadow.png', 16, 16], ['mechanic', 'mechanic.shadow.png', 16, 16], ['gas', 'gas.shadow.png', 16, 16], ['realestate', 'realestate.shadow.png', 16, 16], ['salon', 'salon.shadow.png', 16, 16], ['dollar', 'dollar.shadow.png', 16, 16], ['euro', 'euro.shadow.png', 16, 16], ['yen', 'yen.shadow.png', 16, 16], ['firedept', 'firedept.shadow.png', 16, 16], ['hospitals', 'hospitals.shadow.png', 16, 16], ['lodging', 'lodging.shadow.png', 16, 16], ['phone', 'phone.shadow.png', 16, 16], ['caution', 'caution.shadow.png', 16, 16], ['earthquake', 'earthquake.shadow.png', 16, 16], ['fallingrocks', 'fallingrocks.shadow.png', 16, 16], ['postoffice-us', 'postoffice-us.shadow.png', 16, 16], ['police', 'police.shadow.png', 16, 16], ['sunny', 'sunny.shadow.png', 16, 16], ['partly_cloudy', 'partly_cloudy.shadow.png', 16, 16], ['volcano', 'volcano.shadow.png', 16, 16], ['camera', 'camera.shadow.png', 16, 16], ['webcam', 'webcam.shadow.png', 16, 16]];
  this.gj = [];
  for (var i = 0; i < this.gk.length; i++) {
    var fB = this.gk[i];
    var av = fB[0];
    this.gj[av] = fB;
  }
};
MC3.prototype.jZ = function (en) {
  var iB = en.iconUrl.toLowerCase();
  var cl = "";
  for (var i = 0; i < iB.length; i++) {
    var c = iB.substr(i, 1);
    if (c == "/") {
      cl = "";
    } else {
      cl += c;
    }
  }
  var gv = cl.indexOf(".png");
  if (gv > -1) {
    cl = cl.substr(0, gv);
  }
  var V = this.gj[cl];
  if (V) {
    en.shadowUrl = "http://maps.google.com/mapfiles/ms/micons/" + V[1];
    en.iconAnchor = new GPoint(V[2], V[3]);
  } else {}
};
MC3.prototype.kG = function () {
  this.G = [];
  this.lS = [];
  this.bs = [];
  this.cZ = [];
  for (var f = 0; f < this.K.length; f++) {
    var o = this.K[f];
    for (var i = 0; i < o.R.length; i++) {
      var g = o.R[i];
      g.cb();
      var A = g.ak;
      if (g.ey) {
        A.jx = true;
      }
      this.au++;
    }
  }
  this.aD = this.au;
  for (var i = 0; i < this.G.length; i++) {
    var A = this.G[i];
    if (A.jx != true) {
      map.addOverlay(A);
    }
    A.dB = true;
  }
  this.dW();
};
function MC3Place() {
  this.id = 0;
  this.name = "";
  this.description = "";
  this.link = "";
  this.rss = "";
  this.x = 0;
  this.y = 0;
  this.D = null;
  this.ag = [];
  this.J = null;
  this.P = null;
  this.bo = null;
  this.dV = 14;
  this.hG = -22;
  this.ly = "";
  this.cn = "";
  this.dC = 0;
  this.fields = [];
  this.ai = true;
  this.ey = false;
};
MC3Place.prototype.cb = function () {
  var g = this;
  if (g == mc3.I) {
    mc3.G.push(g.ak);
    mc3.af = g.ak;
    return;
  }
  if (mc3.cZ[g.ad]) {
    var A = this.ak;
    A.cluster = null;
    A.place = g;
    A.ad = g.ad;
    mc3.G.push(A);
    return;
  }
  this.bW = mc3.eE(this.bU);
  var A = this.ak;
  if (!A) {
    var A = null;
    var C = this.P;
    switch (this.ab) {
    case PL_POINT:
      var V = new GIcon();
      V.image = this.bZ;
      V.iconSize = C.iconSize;
      V.iconAnchor = C.iconAnchor;
      V.infoWindowAnchor = C.infoAnchor;
      V.printImage = V.image;
      V.mozPrintImage = V.image;
      A = new GMarker(this.D, {
        icon: V
      });
      break;
    case PL_POLYLINE:
      if (this.ey && this.ag.length > 1) {
        var bQ = this.ag[0].lat() + "," + this.ag[0].lng();
        var ci = this.ag[1].lat() + "," + this.ag[1].lng();
        var eS = "from: " + bQ + " to: " + ci;
        var aU = new GDirections(map);
        function snapRouteLoaded() {
          var ko = aU.getRoute(0);
          g.hO = ko.getDistance().meters;
          g.description = "";
          A = aU.getPolyline();
          GEvent.addListener(A, 'click', function (am) {
            var as = mc3.af;
            mc3.I = g;
            mc3.af = A;
            if (as) {
              as.mkLo(as.row);
            }
            mc3.bu(g, true, am, g.D);
          });
          g.ak = A;
          g.cL();
        };
        GEvent.addListener(aU, "load", snapRouteLoaded);
        aU.load(eS, {
          "preserveViewport": true
        });
        A = new GPolyline(this.ag, C.lineCol, C.lineWidth, C.lineOpacity);
      } else {
        A = new GPolyline(this.ag, C.lineCol, C.lineWidth, C.lineOpacity);
      }
      break;
    case PL_POLYGON:
      A = new GPolygon(this.ag, C.lineCol, C.polyOutline, C.lineOpacity, C.polyCol, C.polyOpacity);
      break;
    case PL_GROUNDOVERLAY:
      A = new GGroundOverlay(this.bZ, this.J);
      break;
    }
    if (A) {
      A.dB = false;
      A.place = g;
      A.cluster = null;
      A.name = g.name;
      A.ad = g.ad;
      this.ak = A;
      GEvent.addListener(A, 'click', function (am) {
        var as = mc3.af;
        mc3.I = g;
        mc3.af = A;
        if (as) {
          as.mkLo(as.row);
        }
        mc3.bu(g, true, am, g.D);
      });
      if (this.ab == PL_POINT) {
        GEvent.addListener(A, "mouseover", function () {
          mc3.dp(g);
          A.mkHi(A.row);
        });
        GEvent.addListener(A, "mouseout", function () {
          mc3.aY();
          A.mkLo(A.row);
        });
      }
    }
  }
  if (A) {
    mc3.G.push(A);
  }
};
MC3Place.prototype.cL = function () {
  var o = this.bo;
  this.cN = this.name.toLowerCase();
  try {
    this.iO = this.description.toLowerCase();
  } catch(ex) {
    bC = "";
    this.iz = "";
    this.iO = "";
  }
  if ((o && o.ej) || !this.P) {
    this.P = o.P;
  }
  if (o && o.dS && o.eI) {
    this.bZ = o.eI(this);
  } else {
    this.bZ = this.P.iconUrl;
  }
  var bC = this.description;
  var fp = "";
  var bN = 0;
  while (bN >= 0) {
    var bN = bC.indexOf("<a");
    var iY = bC.indexOf("<A");
    if (bN < 0) {
      bN = iY;
    }
    if (bN >= 0) {
      fp += bC.substr(0, bN + 2) + " target='" + mc3.es + "' ";
      bC = bC.substr(bN + 2);
    } else {
      fp += bC;
    }
  }
  this.description = fp;
  if (o && o.eF) {
    this.bU = o.eF(this);
  }
  if (o.J == null) {
    o.J = new GLatLngBounds(this.D);
  } else {
    o.J.extend(this.D);
  }
  if (this.J) {
    o.J.extend(this.J.getSouthWest());
    o.J.extend(this.J.getNorthEast());
  }
  if (mc3.fA && this.cn == "") {
    this.cn = this.jE(mc3.fA);
  }
  if (this.ab == PL_POLYLINE) {
    var dR = 0.0;
    if (this.hO > 0.0) {
      dR = this.hO;
    } else {
      for (var i = 1; i < this.ag.length; i++) {
        var kx = this.ag[i - 1].distanceFrom(this.ag[i]);
        dR += kx;
      }
    }
    var eT = parseInt(dR / 10 + 0.5);
    eT = parseFloat(eT) / 100;
    var eW = parseInt(dR / 16.09 + 0.5);
    eW = parseFloat(eW) / 100;
    if (mc3.jd) {
      var bk = "<p>Distance : " + eW + " miles (" + eT + " km)</p>";
      this.description += bk;
    }
  }
  this.ka();
  this.kg();
};
MC3Place.prototype.jE = function (kJ) {
  var ce = "";
  var fr = false;
  var eZ = false;
  var ix = 0;
  while (!eZ) {
    if (ix >= this.description.length) {
      eZ = true;
    } else if (ce.length >= kJ) {
      eZ = true;
    } else {
      var c = this.description.substr(ix, 1);
      if (c == '<') {
        fr = true;
      } else if (c == '>') {
        fr = false;
        if (ce.length) {
          ce += " ";
        }
      } else if (!fr) {
        ce += c;
      }
    }
    ix++;
  }
  if (ix < this.description.length) {
    ce += "...";
  }
  return ce;
};
MC3Place.prototype.fD = function () {
  var al = new GLatLngBounds();
  for (var i = 0; i < this.ag.length; i++) {
    al.extend(this.ag[i]);
  }
  this.J = al;
  this.D = al.getCenter();
};
MC3Place.prototype.fE = function () {
  var al = new GLatLngBounds();
  this.D = this.ag[0];
  for (var i = 0; i < this.ag.length; i++) {
    al.extend(this.ag[i]);
  }
  var le = parseInt(this.ag.length / 2);
  this.D = this.ag[le];
  this.J = al;
};
MC3Place.prototype.ka = function () {
  var aN = "";
  if (mc3.sidebarIconWidth == 0) {
    aN = "&nbsp;&bull;";
  } else {
    var C = this.P;
    var wd = mc3.eP;
    var ht = mc3.fH;
    switch (this.ab) {
    case PL_POINT:
      aN = "<img src='" + this.bZ + "' alt='' width='" + wd + "' height='" + ht + "' /> ";
      break;
    case PL_POLYLINE:
      var bJ = C.lineCol;
      var aF = ";opacity:" + C.lineOpacity;
      aN = "<table cellpadding=0 cellspacing=0 style='width:" + wd + "px;height:" + ht + "px'><tr valign='middle' style='height:100%'><td style='width:100%'>" + "<table style='width:" + wd + "px'><tr style='height:4px'><td style='width:" + wd + "px;" + aF + ";background-color:" + bJ + "'></td></tr></table>" + "</td></tr></table>";
      break;
    case PL_POLYGON:
      var lh = parseInt(C.lineWidth);
      var bJ = C.lineCol;
      var fq = C.polyCol;
      var aF = (C.polyOpacity > 0) ? C.polyOpacity : C.lineOpacity;
      aF = "opacity:" + aF;
      var bM = "";
      switch (parseInt(C.polyOutline)) {
      case 0:
        break;
      case 1:
        bM = "border:solid 1px;";
        break;
      default:
        bM = "border:solid 2px;";
      }
      aN = "<div style='width:" + wd + "px;height:" + ht + "px;" + bM + bJ + ";" + aF + ";background-color:" + fq + "'></div>";
      break;
    }
  }
  this.fC = aN;
};
MC3Place.prototype.kg = function () {
  var aN = "";
  if (mc3.dA > 0) {
    var C = this.P;
    var wd = mc3.dA;
    var ht = mc3.jc;
    switch (this.ab) {
    case PL_POINT:
      aN = "<img src='" + this.bZ + "' alt='' width='" + wd + "' height='" + ht + "' /> ";
      break;
    case PL_POLYLINE:
      var bJ = C.lineCol;
      var aF = ";opacity:" + C.lineOpacity;
      aN = "<table cellpadding=0 cellspacing=0 style='width:" + wd + "px;height:" + ht + "px'><tr valign='middle' style='height:100%'><td style='width:100%'>" + "<table style='width:" + wd + "px'><tr style='height:4px'><td style='width:" + wd + "px;" + aF + ";background-color:" + bJ + "'></td></tr></table>" + "</td></tr></table>";
      break;
    case PL_POLYGON:
      var lh = parseInt(C.lineWidth);
      var bJ = C.lineCol;
      var fq = C.polyCol;
      var aF = (C.polyOpacity > 0) ? C.polyOpacity : C.lineOpacity;
      aF = "opacity:" + aF;
      var bM = "";
      switch (parseInt(C.polyOutline)) {
      case 0:
        break;
      case 1:
        bM = "border:solid 1px;";
        break;
      default:
        bM = "border:solid 2px;";
      }
      aN = "<div style='width:" + wd + "px;height:" + ht + "px;" + bM + bJ + ";" + aF + ";background-color:" + fq + "'></div>";
      break;
    }
  }
  this.eu = aN;
};
MC3Place.prototype.gq = function (U, bI) {
  this.bo = U;
  this.ad = U.ar + "_" + bI;
  this.D = new GLatLng(this.y, this.x);
  this.P = U.P;
  this.ab = PL_POINT;
  this.description = U.di(this);
  this.cL();
  mc3.R.push(this);
  mc3.bF[this.ad] = this;
  U.R.push(this);
};
MC3Place.prototype.jH = function () {
  var B = "";
  if (mc3.cj || mc3.dQ || mc3.iq || mc3.ip || mc3.ic) {
    var x = this.D.lng();
    var y = this.D.lat();
    var db = mc3.kC;
    if (!db) {
      db = "blue";
    }
    var be = "style='color:" + db + "'";
    B += "<div style='height:2px'></div>";
    B += "<div style='width:100%;border-top:solid 1px black;padding-top:2px'>";
    if (mc3.M > 0) {
      B += "<a id='linkMap' href='javascript:viewFullMap()' " + be + " >" + mc3.gY + "</a>&nbsp; ";
    }
    if (mc3.cj) {
      B += "<a id='linkStreet' href='javascript:viewStreet(" + x + "," + y + ")' " + be + ">" + mc3.et + "</a>&nbsp; ";
    }
    if (mc3.dQ) {
      B += "<a id='linkVE' href='javascript:viewVE(" + x + "," + y + ")' " + be + ">" + mc3.ev + "</a>&nbsp; ";
    }
    if (mc3.iq) {
      B += "<a href='javascript:viewBlowUp()' " + be + ">" + mc3.gZ + "</a>&nbsp; ";
    }
    if (mc3.ip) {
      B += "<a href='javascript:viewDirections()' " + be + ">" + mc3.eJ + "</a>&nbsp; ";
    }
    if (mc3.ic) {
      B += "<a href='javascript:zoomIn()' " + be + ">" + mc3.fF + "</a>&nbsp; " + "<a href='javascript:zoomOut()' " + be + ">" + mc3.fY + "</a>&nbsp; ";
    }
    B += "</div>";
  }
  return B;
};
MC3Place.prototype.hK = function () {
  var B = "";
  if (mc3.iV > 0) {
    B += "<table cellspacing=0 cellpadding=0><tr valign='bottom'>";
    if (mc3.dA > 0 && this.eu) {
      B += "<td style='width:" + (mc3.dA + 4) + "px'>" + this.eu + "</td>";
    }
    B += "<td>";
    if (this.link != "") {
      B += "<a target='" + mc3.es + "' href='" + this.link + "'>" + this.name + "</a>";
    } else {
      B += "<b>" + this.name + "</b>";
    }
    B += "</td></tr></table>";
  }
  B += "<div style='height:4px'></div>";
  if (mc3.M == 0 && mc3.dq == 0) {
    B += this.description;
  }
  var hH = "";
  if (mc3.dC && mc3.M == 0) {
    hH = ";height:" + mc3.dC + "px;overflow:auto";
  }
  B = "<div id='infoWndDiv' style='width:" + mc3.cH + "px" + hH + "'>" + B + "</div>";
  return B;
};
MC3.prototype.bu = function (H, iX, am) {
  map.closeInfoWindow();
  var o = H.bo;
  var A = H.ak;
  this.aY();
  if (!A) {
    return;
  }
  this.af = A;
  this.I = H;
  var hM = H.jH();
  var B = H.hK() + hM;
  if (this.hq) {
    B = "<div style='" + this.hq + "'>" + B + "</div>";
  }
  var aG = {};
  if (mc3.cH > 0) {
    aG.maxWidth = mc3.cH;
  }
  aG.maxWidth = mc3.cH;
  if (this.ib && o) {
    var fy = o.hQ(H);
    fy += "<div style='height:8px'></div>" + hM;
    aG.maxContent = fy;
    aG.maxTitle = H.name;
  }
  switch (H.ab) {
  case PL_POINT:
    A.openInfoWindowHtml(B, aG);
    break;
  case PL_POLYGON:
  case PL_POLYLINE:
    map.openInfoWindowHtml(am, B, aG);
    break;
  case PL_GROUNDOVERLAY:
    var ah = map.getBoundsZoomLevel(H.J);
    map.setCenter(H.J.getCenter(), ah);
    break;
  }
  if (iX) {
    var iv = e("sb" + A.row);
    if (iv) {
      var dK = this.cP + parseInt(this.cu / 2) - 20;
      var y = iv.offsetTop - dK;
      if (y < 0) {
        y = 0;
      }
      e("indexOuterDiv").scrollTop = y;
    }
  }
  if (this.dq && (this.F != 3) && (this.F != 2)) {
    var fk = "";
    var aH = "";
    if (o.cT) {
      var aH = o.jK(H);
      if (aH) {
        if (this.cD[aH]) {
          fk = "<p></p><div id='rssDiv' style='color:black'>" + mc3.cD[aH] + "</div>";
        } else {
          fk = "<p></p><div id='rssUrlDiv' style='display:none'>" + aH + "</div>" + "<div id='rssDiv' >...</div>";
        }
      }
    }
    e("sideInfoContent").innerHTML = "<div style='height:28px'>" + "<div style='float:right'><a href='javascript:mc3.infoClose()' style='color:gray;text-decoration:underline'>Close</a></div>" + "<a href='javascript:mc3.infoPrev()' style='color:blue'>&lt;&lt;</a> &nbsp;" + "<a href='javascript:mc3.infoNext()' style='color:blue'>&gt;&gt;</a>" + "</div>" + H.hK() + o.di(H) + fk;
    var aI = e("rssDiv");
    if (aH && aI) {
      if (mc3.cD[aH]) {
        aI.innerHTML = mc3.cD[aH];
      } else {
        var bK = new google.feeds.Feed(aH);
        bK.setResultFormat(google.feeds.Feed.MIXED_FORMAT);
        bK.setNumEntries(20);
        bK.load(function (result) {
          var html = "";
          if (!result.error) {
            var items = result.feed.entries;
            for (var i = 0; i < items.length; i++) {
              var item = items[i].xmlNode;
              html += getRSSListing(item);
            }
            html += "<p></p><p style='font-size:10px'><b>" + result.feed.title + "</b><br/>" + result.feed.description + "<br/><a target='_blank' href='" + result.feed.link + "'>" + result.feed.link + "</a></p>";
            var aI = e("rssDiv");
            if (aI) {
              var ca = aI.innerHTML;
              if (ca.length > 2 && ca.substr(0, 3) == "...") {
                aI.innerHTML = html;
              }
            }
          }
          mc3.cD[aH] = html;
        });
      }
    }
    if (!this.jQ && this.F != 2 && this.F != 3) {
      this.F = 4;
      e("sidebarBox").checked = true;
      this.ap();
    }
  }
  if (!this.jQ) {
    var aa = H.D;
    switch (this.aJ) {
    case 3:
      viewStreet(aa.lng(), aa.lat());
      break;
    case 4:
      viewVE(aa.lng(), aa.lat());
      break;
    }
  }
  this.dH();
  setTimeout("infoSidebarHighlight()", 1);
};
function infoSidebarHighlight() {
  if (mc3.af) {
    mc3.af.mkHi(mc3.af.row);
  }
};
MC3Place.prototype.dZ = function (at, U, bI) {
  this.ad = U.ar + "_" + bI;
  this.bo = U;
  var aw = at.getElementsByTagName("Point");
  var cq = at.getElementsByTagName("LineString");
  var ku = at.getElementsByTagName("Polygon");
  var iH = at.getElementsByTagName("LatLonBox");
  if (aw.length > 0) {
    this.ab = PL_POINT;
  } else if (cq.length > 0) {
    this.ab = PL_POLYLINE;
  } else if (ku.length > 0) {
    this.ab = PL_POLYGON;
  } else if (iH.length > 0) {
    this.ab = PL_GROUNDOVERLAY;
  }
  var gr = at.getElementsByTagName("name");
  if (gr.length > 0) {
    this.name = GXml.value(gr[0]);
  }
  var hk = at.getElementsByTagName("description");
  if (hk.length > 0) {
    this.description = GXml.value(hk[0]);
  }
  var fW = at.getElementsByTagName("link");
  if (fW.length > 0) {
    this.link = GXml.value(fW[0]);
  }
  var fx = at.getElementsByTagName("ExtendedData");
  if (fx.length > 0) {
    var fu = "<table cellspacing=0 cellpadding=4 border=1 >";
    if (fx.length > 0) {
      var iI = fx[0];
      var hn = iI.getElementsByTagName("Data");
      for (var i = 0; i < hn.length; i++) {
        var fm = hn[i];
        var av = fm.getAttribute("name");
        if (av.length && av.substr(0, 1) == "_") {
          if (av == "_SnapToRoads") {
            var cs = fm.getElementsByTagName("value");
            if (cs.length > 0) {
              var eQ = GXml.value(cs[0]);
              if (eQ == "true") {
                this.ey = true;
              }
            }
          }
        } else {
          var cs = fm.getElementsByTagName("value");
          if (cs.length > 0) {
            var eQ = GXml.value(cs[0]);
            fu += "<tr><td>" + av + "</td><td><b>" + eQ + "</b></td></tr>";
          }
        }
      }
    }
    fu += "</table>";
    this.description += "<br/>" + fu;
  }
  if (this.ab == PL_GROUNDOVERLAY) {
    var jV = at.getElementsByTagName("north");
    var kv = at.getElementsByTagName("south");
    var jf = at.getElementsByTagName("east");
    var iT = at.getElementsByTagName("west");
    var jP = parseFloat(GXml.value(jf[0]));
    var jN = parseFloat(GXml.value(jV[0]));
    var lj = parseFloat(GXml.value(iT[0]));
    var lk = parseFloat(GXml.value(kv[0]));
    var ls = new GLatLng(lk, lj);
    var jR = new GLatLng(jN, jP);
    this.J = new GLatLngBounds(ls, jR);
    if (this.name == "") {
      this.name = "Ground overlay";
    }
  }
  if (U.ej && this.ab != PL_GROUNDOVERLAY) {
    this.P = U.P;
  } else {
    var hW = at.getElementsByTagName("styleUrl");
    if (hW.length > 0) {
      var jS = GXml.value(hW[0]).substr(1);
      var C = U.dU[jS];
      if (C) {
        this.P = C;
      }
    } else {
      var bX = at.getElementsByTagName("href");
      if (bX) {
        var V = GXml.value(bX[0]);
        if (V) {
          this.P = new KMLStyle();
          this.P.iconUrl = V;
        }
      }
    }
  }
  if (!this.P) {
    this.P = U.P;
  }
  var il = at.getElementsByTagName("coordinates");
  if (il.length > 0) {
    var lp = GXml.value(il[0]).trim();
    var fn = [];
    var ff = lp.split(' ');
    for (var k = 0; k < ff.length; k++) {
      if (ff[k].length > 1) {
        fn.push(ff[k]);
      }
    }
    for (var j = 0; j < fn.length; j++) {
      var fc = fn[j].split(',');
      if (fc.length > 1) {
        var x = parseFloat(fc[0]);
        var y = parseFloat(fc[1]);
        var aa = new GLatLng(y, x);
        this.ag.push(aa);
      }
    }
  }
  switch (this.ab) {
  case PL_POINT:
    this.D = this.ag[0];
    break;
  case PL_POLYLINE:
    this.fE();
    break;
  case PL_POLYGON:
    this.fD();
    break;
  }
  this.cL();
};
MC3Place.prototype.lg = function (ax, U, bI) {
  this.ad = U.ar + "_" + bI;
  this.bo = U;
  this.P = U.P;
  var fJ = ax.getElementsByTagName("title")[0];
  if (fJ) {
    this.name = fJ.firstChild.nodeValue;
  }
  var cw = ax.getElementsByTagName("description")[0];
  if (cw) {
    this.description = cw.firstChild.nodeValue;
  }
  if (this.description.length == 0) {
    var hP = ax.getElementsByTagName("summary")[0];
    if (hP) {
      this.description = hP.firstChild.nodeValue;
    }
  }
  var cQ = ax.getElementsByTagName("link")[0];
  if (cQ) {
    this.link = cQ.firstChild.nodeValue;
  }
  var cY = null;
  cY = ax.getElementsByTagName("georss:point")[0];
  if (!cY) {
    cY = ax.getElementsByTagName("point")[0];
  }
  var dj = ax.getElementsByTagName("Polygon")[0];
  if (!dj) {
    dj = ax.getElementsByTagName("gml:Polygon")[0];
  }
  var cA = ax.getElementsByTagName("LineString")[0];
  if (!cA) {
    cA = ax.getElementsByTagName("gml:LineString")[0];
  }
  if (dj) {
    var bb = dj.getElementsByTagName("posList")[0];
    if (!bb) {
      bb = dj.getElementsByTagName("gml:posList")[0];
    }
    if (bb) {
      var aw = bb.firstChild.nodeValue;
      this.kb(aw);
    }
  } else if (cA) {
    var bb = cA.getElementsByTagName("posList")[0];
    if (!bb) {
      bb = cA.getElementsByTagName("gml:posList")[0];
    }
    if (bb) {
      var aw = bb.firstChild.nodeValue;
      this.jY(aw);
    }
  } else if (cY) {
    var aa = cY.firstChild.nodeValue;
    if (typeof(aa) == "undefined") {
      return false;
    }
    this.jX(aa);
  }
  switch (this.ab) {
  case PL_POLYLINE:
    this.fE();
    break;
  case PL_POLYGON:
    this.fD();
    break;
  }
  this.cL();
  return true;
};
MC3Place.prototype.jX = function (am) {
  this.ab = PL_POINT;
  if (am.indexOf(",") > -1) {
    var aw = am.split(',');
  } else {
    var aw = am.split(' ');
  }
  this.y = parseFloat(aw[0]);
  this.x = parseFloat(aw[1]);
  this.D = new GLatLng(this.y, this.x);
};
MC3Place.prototype.jY = function (ek) {
  this.ab = PL_POLYLINE;
  var bE = ek.split(' ');
  var aw = [];
  for (var i = 0; i < bE.length; i += 2) {
    var y = parseFloat(bE[i]);
    var x = parseFloat(bE[i + 1]);
    aw.push(new GLatLng(y, x));
  }
  this.ag = aw;
};
MC3Place.prototype.kb = function (ek) {
  this.ab = PL_POLYGON;
  var bE = ek.split(' ');
  var aw = [];
  for (var i = 0; i < bE.length; i += 2) {
    var y = parseFloat(bE[i]);
    var x = parseFloat(bE[i + 1]);
    aw.push(new GLatLng(y, x));
  }
  this.ag = aw;
};
MC3Place.prototype.lf = function (bG, U, bI) {
  this.ab = PL_POINT;
  this.bo = U;
  for (var i = 0; i < bG.length; i++) {
    var dI = bG[1];
    if (dI.indexOf("\"") > -1) {
      dI = unQuote(dI);
    }
    this.fields[U.dh[i]] = dI;
  }
  this.ad = U.ar + "_" + bI;
  for (var i = 0; i < bG.length; i++) {
    var cf = U.dh[i];
    if (cf == "x") {
      this.x = parseFloat(bG[i]);
    } else if (cf == "y") {
      this.y = parseFloat(bG[i]);
    } else {
      eval("this." + cf + " = \"" + bG[i] + "\";");
    }
  }
  this.D = new GLatLng(this.y, this.x);
  this.P = U.P;
  if (U.bv) {
    this.cn = U.bv(this);
  }
  if (this.fields["link"]) {
    this.link = this.fields["link"];
  }
  if (this.fields["rss"]) {
    this.rss = bG[11];
  }
  if (U.di) {
    this.description = U.di(this);
  }
  this.cL();
};
function searchCallback(a) {
  if (mc3.F > 0) {
    mc3.F = -mc3.F;
    e("sidebarBox").checked = false;
  }
  mc3.ap();
  return false;
};
function searchClose() {
  if (mc3.F == 3) {
    mc3.F = -1;
    e("sidebarBox").checked = false;
    mc3.ap();
  }
};
MC3.prototype.dW = function () {
  var B = "";
  if (this.fT > 0) {
    this.G.sort(this.fT == 1 ? sortMarkerFn1 : sortMarkerFn2);
  }
  var iw = this.eP;
  var ih = this.fH;
  var hD = mc3.e("indexDiv");
  hD.innerHTML = "";
  for (var i = 0; i < this.G.length; i++) {
    var A = this.G[i];
    A.row = i;
    var iF = "";
    if (A == this.af) {
      iF = ";background-color:" + mc3.aR;
    }
    B = "<table cellspacing=0 cellpadding=2 id='sb" + i + "' style='width:100%;cursor:pointer" + iF + "' " + "onclick='mkClick(\"" + i + "\")' " + "onmouseover='sbOver(\"" + i + "\")' onmouseout='sbOut(\"" + i + "\")'><tr valign='top'><td style='width:" + (mc3.eP + 2) + "px'>";
    if (A.cluster) {
      var g = A.cluster.T[0];
      if (iw) {
        B += "<img src='" + this.du + "' height='" + ih + "' width='" + iw + "' /></td><td>";
      }
      B += "<b>" + A.name + "</b>";
    }
    if (A.place) {
      var g = A.place;
      var iU = this.gy;
      if (g.P && g.P.iconUrl) {
        iU = g.P.iconUrl;
      }
      B += g.fC + "</td><td>";
      B += "<b>" + g.name + "</b><br/>" + g.cn;
    }
    B += "</td></tr></table>";
    var gn = document.createElement("div");
    gn.innerHTML = B;
    hD.appendChild(gn);
  }
  B = "";
  if (this.au == 1) {
    B += "1 " + this.gX;
  } else {
    B += this.au + " " + this.ha;
  }
  if (this.aD != this.au) {
    B += ", ";
    if (this.aD == 1) {
      B += "1 " + this.gR;
    } else {
      B += this.aD + " " + this.gQ;
    }
  }
  this.e("indexHeaderSpan").innerHTML = B;
};
function sortMarkerFn1(p1, p2) {
  var r = 0;
  var pl1 = p1.place;
  var pl2 = p2.place;
  if (pl1 && pl2) {
    var v1 = pl1.cN;
    var v2 = pl2.cN;
    r = ((v1 < v2) ? -1 : ((v1 > v2) ? 1 : 0));
  }
  return r;
};
function sortMarkerFn2(p1, p2) {
  var r = 0;
  var pl1 = p1.place;
  var pl2 = p2.place;
  if (pl1 && pl2) {
    var s1 = pl1.P;
    var s2 = pl2.P;
    if (s1 && s2) {
      var i1 = s1.iconUrl;
      var i2 = s2.iconUrl;
      r = ((i1 < i2) ? -1 : ((i1 > i2) ? 1 : 0));
    }
    if (r == 0) {
      var v1 = pl1.cN;
      var v2 = pl2.cN;
      r = ((v1 < v2) ? -1 : ((v1 > v2) ? 1 : 0));
    }
  }
  return r;
};
function mkClick(id) {
  if (mc3.bg) {
    var A = mc3.G[id];
    var as = null;
    if (mc3.af) {
      as = mc3.af;
    }
    mc3.af = A;
    var g = A.place;
    mc3.I = g;
    if (as) {
      as.mkLo(as.row);
    }
    if (mc3.I) {
      mc3.eG = true;
      mc3.bu(mc3.I, false, g.D);
      mc3.aY();
    } else {
      var Q = A.cluster;
      if (Q) {
        Q.ir();
      }
    }
  }
};
function sbOver(a) {
  var A = mc3.G[a];
  A.mkHi(a);
  var g = A.place;
  if (!g) {
    g = A.cluster;
  }
  mc3.dp(g);
};
function sbOut(a) {
  var A = mc3.G[a];
  if (A) {
    A.mkLo(a);
  }
  mc3.aY();
};
GMarker.prototype.mkHi = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = mc3.dG;
    }
  }
};
GMarker.prototype.mkLo = function (a, iW) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af && iW != false) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = "transparent";
    }
  }
};
GPolyline.prototype.mkHi = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = mc3.dG;
    }
  }
};
GPolyline.prototype.mkLo = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = "transparent";
    }
  }
};
GPolygon.prototype.mkHi = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = mc3.dG;
    }
  }
};
GPolygon.prototype.mkLo = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = "transparent";
    }
  }
};
GGroundOverlay.prototype.mkHi = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = mc3.dG;
    }
  }
};
GGroundOverlay.prototype.mkLo = function (a) {
  var O = e("sb" + a);
  if (O) {
    if (this == mc3.af) {
      O.style.backgroundColor = mc3.aR;
    } else {
      O.style.backgroundColor = "transparent";
    }
  }
};
MC3.prototype.io = function (iL, am) {
  if (!this.cv) {
    this.cv = new GStreetviewOverlay();
    GEvent.addListener(map, "click", function (lM, aa) {
      if (aa && mc3.dF) {
        initPanorama(aa);
      }
    });
  }
  if (iL) {
    if (!this.dF) {
      this.dF = true;
      map.addOverlay(this.cv);
    }
    initPanorama(am);
  } else {
    this.dF = false;
    if (map && this.cv) {
      map.removeOverlay(this.cv);
    }
  }
};
var initialStreetPoint = null;
function initPanorama(am) {
  mc3.eo = 5;
  initialStreetPoint = am;
  mc3.fN.getNearestPanorama(am, initPanorama2);
};
function initPanorama2(a) {
  if (a != null) {
    var dv = a.location;
    if (dv == null) {
      mc3.dM = "Street View Image Not Available";
      if (mc3.aK) {
        mc3.aM = mc3.aK.getPoint();
      }
      e("panDiv").style.display = "none";
    } else {
      if (mc3.I) {
        mc3.aP = mc3.ji(dv.latlng, initialStreetPoint);
      }
      e("panDiv").style.display = "block";
      mc3.aM = dv.latlng;
      mc3.dM = dv.description;
      mc3.dn(false);
    }
    displayPanorama();
  }
};
function displayPanorama() {
  var jT = mc3.e("panDiv");
  mc3.bt = new GStreetviewPanorama(jT);
  GEvent.addListener(mc3.bt, "yawchanged", function (a) {
    mc3.aP = parseFloat(a);
    mc3.dn(false);
  });
  GEvent.addListener(mc3.bt, "initialized", function (a) {
    mc3.aM = a.latlng;
    mc3.dM = a.description;
    mc3.hS = mc3.aM;
    mc3.x = mc3.hS.lng();
    mc3.y = mc3.hS.lat();
    mc3.dn(true);
  });
  mc3.bt.setLocationAndPOV(mc3.aM, {
    "yaw": mc3.aP
  });
  var gz = mc3.e("panTitle");
  if (gz) {
    gz.innerHTML = mc3.dM;
  }
};
MC3.prototype.dn = function (jr) {
  if (!this.aK) {
    var V = new GIcon();
    var eY = Math.round(mc3.aP / 22.5) % 16;
    var fb = "http://maps.google.com/intl/en_us/mapfiles/cb/man_arrow-" + eY + ".png";
    V.image = fb;
    V.iconSize = new GSize(49, 52);
    V.printImage = V.image;
    V.mozPrintImage = V.image;
    V.iconAnchor = new GPoint(25, 36);
    V.infoWindowAnchor = new GPoint(25, 6);
    var A = new GMarker(this.aM, {
      "icon": V,
      "draggable": true
    });
    this.map.addOverlay(A);
    this.aK = A;
    GEvent.addListener(A, "dragstart", function () {
      mc3.map.closeInfoWindow();
      mc3.aY();
    });
    GEvent.addListener(A, "dragend", function () {
      mc3.aM = A.getPoint();
      initPanorama(mc3.aM);
    });
  } else {
    var eY = Math.round(mc3.aP / 22.5) % 16;
    var fb = "http://maps.google.com/intl/en_us/mapfiles/cb/man_arrow-" + eY + ".png";
    this.aK.show();
    this.aK.setImage(fb);
    this.aK.setPoint(this.aM);
  }
  if (jr) {
    map.setCenter(this.aM);
  }
};
function panClose() {
  mc3.M = 0;
  mc3.aJ = 0;
  mc3.ap();
};
function panRotate() {
  mc3.dJ = !mc3.dJ;
  e("panRotateLink").style.color = mc3.dJ ? "green" : "gray";
};
function panRotateTimer() {
  if (mc3.bt && mc3.dJ && (mc3.M == 3)) {
    if (mc3.eo > 0) {
      mc3.eo--;
    } else {
      try {
        mc3.aP += 1;
        if (mc3.aP > 360) {
          mc3.aP -= 360;
        }
        mc3.bt.panTo({
          "yaw": mc3.aP
        });
        mc3.dn(false);
      } catch(ex) {}
    }
  }
  setTimeout("panRotateTimer()", 100);
};
MC3.prototype.ji = function (p1, p2) {
  var angle = null;
  if (p1 != null && p2 != null) {
    var y1 = p1.latRadians();
    var x1 = p1.lngRadians();
    var y2 = p2.latRadians();
    var x2 = p2.lngRadians();
    var a = Math.sin(x1 - x2) * Math.cos(y2);
    var b = Math.cos(y1) * Math.sin(y2) - Math.sin(y1) * Math.cos(y2) * Math.cos(x1 - x2);
    angle = -(Math.atan2(a, b));
    if (angle < 0.0) {
      angle += Math.PI * 2.0;
    }
  }
  return parseInt(angle * 180.0 / Math.PI);
};
MC3.prototype.dp = function (H) {
  if (H == this.I) {
    this.aY();
    return;
  }
  if (this.bg) {
    var bX = this.lx;
    if (H) {
      var gi = this.jL(H.D);
      var gh = true;
      if (gi < (H.bW + H.dV)) {
        var kI = this.jF(H.D);
        if (gi < kI) {
          gh = false;
        }
      }
      if (H.bW > 0) {
        this.bH.style.width = H.bW + "px";
      }
      this.bH.innerHTML = "<div class='markerTooltip'>" + H.bU + "</div>";
      var A = H.ak;
      var aa = H.D;
      var z = map.getZoom();
      var ga = map.getCurrentMapType().getProjection().fromLatLngToPixel(map.fromDivPixelToLatLng(new GPoint(0, 0), true), z);
      var dK = map.getCurrentMapType().getProjection().fromLatLngToPixel(aa, z);
      var x = dK.x - ga.x;
      var y = dK.y - ga.y;
      if (gh) {
        x += H.dV;
      } else {
        x -= (H.dV + H.bW);
      }
      y += H.hG;
      var ky = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(x, y));
      ky.apply(this.bH);
      this.bH.style.visibility = "visible";
    }
  }
};
MC3.prototype.aY = function () {
  this.bH.style.visibility = "hidden";
};
MC3.prototype.eE = function (ee) {
  var ig = 0;
  if (this.co) {
    this.co.style.display = "inline";
    this.co.innerHTML = ee;
    ig = this.co.offsetWidth + 8;
    this.co.style.display = "none";
  }
  return ig;
};
MC3.prototype.jL = function (eN) {
  var ah = map.getZoom();
  var aa = map.getCurrentMapType().getProjection().fromLatLngToPixel(eN, ah);
  var al = map.getBounds();
  var ne = al.getNorthEast();
  var fw = map.getCurrentMapType().getProjection().fromLatLngToPixel(ne, ah);
  var fv = (fw.x - aa.x);
  return fv;
};
MC3.prototype.jF = function (eN) {
  var ah = map.getZoom();
  var aa = map.getCurrentMapType().getProjection().fromLatLngToPixel(eN, ah);
  var al = map.getBounds();
  var sw = al.getSouthWest();
  var fw = map.getCurrentMapType().getProjection().fromLatLngToPixel(sw, ah);
  var fv = (aa.x - fw.x);
  return fv;
};
function e(id) {
  return document.getElementById(id);
};
MC3.prototype.e = function (id) {
  return document.getElementById(id);
};
MC3.prototype.jC = function () {
  var cU = navigator.userAgent.toLowerCase();
  if (cU.indexOf("firefox") != -1) {
    this.bY = 1;
  } else if (cU.indexOf("msie") != -1) {
    this.bY = 2;
  } else if (cU.indexOf("chrome") != -1) {
    this.bY = 5;
  } else if (cU.indexOf("safari") != -1) {
    this.bY = 3;
  } else if (cU.indexOf("opera") != -1) {
    this.bY = 4;
  }
};
MC3.prototype.aV = function (q, n) {
  var ln = n + "=";
  if (q.length > 0) {
    var b = q.indexOf(n);
    if (b != -1) {
      b += ln.length;
      var c = q.indexOf("&", b);
      if (c == -1) c = q.length;
      return unescape(q.substring(b, c));
    }
  }
  return "";
};
MC3.prototype.iJ = function () {
  var bd = document.location.search.substring(1);
  var x = this.aV(bd, "x");
  var y = this.aV(bd, "y");
  var z = this.aV(bd, "z");
  var t = this.aV(bd, "t");
  var f = this.aV(bd, "f");
  var id = this.aV(bd, "id");
  var name = this.aV(bd, "name");
  var georss = this.aV(bd, "georss");
  this.eq = this.aV(bd, "v");
  if (x != "" && y != "") {
    this.bj = parseFloat(x);
    this.bq = parseFloat(y);
  }
  if (z) {
    this.bT = parseInt(z);
  }
  if (t) {
    this.dY = parseInt(t);
  }
  if (f) {
    this.eg = true;
  }
  if (id) {
    this.cG = id;
  }
  if (name) {
    this.er = name;
    this.cG = 1;
  }
  if (georss) {
    this.iD = georss;
    this.K = [];
    this.dg = [];
    var o = new MC3Feed();
    o.ar = "georss1";
    o.bV = "GeoRSS";
    o.cx = this.iD;
    o.ab = "rss";
    this.K.push(o);
    this.dg[o.ar] = o;
  }
};
function formatFloat(v, p) {
  var m = Math.pow(10, p);
  return parseInt(v * m, 10) / m;
};
function initRandom() {
  var seed = new Date().getTime();
  var x = Math.random(seed);
};
function getRandomInt(el) {
  var fi = Math.floor(Math.random() * el);
  return fi;
};
function getRandomFloat(el) {
  var fi = Math.random() * el;
  return fi;
};
String.prototype.trim = function () {
  return this.replace(/^\s*|\s*$/g, '');
};
MC3.prototype.kV = function () {
  this.aq = [];
  for (var i = 0; i < 10; i++) {
    var c = i.toString();
    this.aq[c] = i;
  }
  this.aq["A"] = 10;
  this.aq["B"] = 11;
  this.aq["C"] = 12;
  this.aq["D"] = 13;
  this.aq["E"] = 14;
  this.aq["F"] = 15;
  this.aq["a"] = 10;
  this.aq["b"] = 11;
  this.aq["c"] = 12;
  this.aq["d"] = 13;
  this.aq["e"] = 14;
  this.aq["f"] = 15;
};
function unQuote(a) {
  var b = "";
  for (var i = 0; i < a.length; i++) {
    var c = a.substr(i, 1);
    if (c == '\"') {
      b += "&quot;";
    } else {
      b += c;
    }
  }
  return b;
};
MC3.prototype.jq = function () {
  var fe = e("veFrame");
  if (fe) {
    if (window.frames.veFrame && window.frames.veFrame.clearVEpos) {
      window.frames.veFrame.clearVEpos();
    }
  }
};
MC3.prototype.dk = function (x, y, z, m) {
  var fe = e("veFrame");
  if (fe) {
    var fd = e("veDiv");
    fd.style.display = "block";
    if (this.aE && window.frames.veFrame && window.frames.veFrame.setVEpos) {
      window.frames.veFrame.setVEpos(x, y, z, m);
    }
  } else {
    var fd = e("veDiv");
    fd.innerHTML = "<iframe name='veFrame' id='veFrame' src='" + mc3.lb + "?x=" + x + "&y=" + y + "&z=" + z + "&m=" + m + "' style='width:100%;height:100%' frameborder='0' marginwidth='0' marginheight='0' scrolling='off' ></iframe>";
  }
  this.aJ = 4;
};
function viewFullMap() {
  mc3.aE = true;
  mc3.M = 0;
  mc3.aJ = 0;
  mc3.ap();
};
function viewStreet(x, y) {
  mc3.M = 3;
  mc3.aJ = 3;
  mc3.streetviewClick(true, new GLatLng(y, x));
};
function viewVE(x, y) {
  mc3.M = 4;
  mc3.aJ = 4;
  mc3.ap();
  mc3.e("veBox").checked = true;
  mc3.dk(x, y, map.getZoom(), 1);
};
function viewBlowUp() {
  var bp = map.getInfoWindow();
  if (bp) {
    var aa = bp.getPoint();
    map.closeInfoWindow();
    if (aa) {
      map.showMapBlowup(aa);
    }
  }
};
function zoomIn() {
  map.zoomIn();
};
function zoomOut() {
  map.zoomOut();
};
function viewAllMarkers() {
  map.closeInfoWindow();
  var al = null;
  var gA = 0;
  for (var f = 0; f < mc3.K.length; f++) {
    var o = mc3.K[f];
    for (var i = 0; i < o.R.length; i++) {
      var g = o.R[i];
      if (g.ai) {
        if (!al) {
          al = new GLatLngBounds(g.D);
        }
        gA++;
        if (g.J) {
          al.extend(g.J.getNorthEast());
          al.extend(g.J.getSouthWest());
        } else {
          al.extend(g.D);
        }
      }
    }
  }
  if (gA) {
    var L = al.getCenter();
    var ah = map.getBoundsZoomLevel(al);
    map.setCenter(L, ah);
  } else if (mc3.bj && mc3.bq && mc3.bT) {
    map.setCenter(new GLatLng(mc3.bq, mc3.bj), mc3.bT);
  }
};
MC3.prototype.printClick = function (a) {
  if (confirm("Print this map ?")) {
    window.print();
  }
  return false;
};
MC3.prototype.sidebarClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("sidebarBox").checked);
  }
  if (a) {
    if (this.F < 0) {
      this.F = -this.F;
    } else {
      this.F = 1;
    }
  } else {
    if (this.F > 0) {
      this.F = -this.F;
    } else {
      this.F = -1;
    }
  }
  var L = map.getCenter();
  this.ap();
  map.setCenter(L);
  e("sidebarBox").checked = a;
};
MC3.prototype.controlsClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("controlsBox").checked);
  }
  if (a) {
    if (this.az && this.M == 0) {
      map.addControl(this.az);
    }
    if (this.bm && this.M > 0) {
      map.addControl(this.bm);
    }
    if (this.bS) {
      map.addControl(this.bS);
    }
    if (this.iE == 3) {
      this.aO = new GMenuMapTypeControl();
    }
    if (this.aO) {
      map.addControl(this.aO);
    }
    if (this.ba) {
      this.ba.enable();
    }
  } else {
    if (this.az) {
      map.removeControl(this.az);
    }
    if (this.bm) {
      map.removeControl(this.bm);
    }
    if (this.bS) {
      map.removeControl(this.bS);
    }
    if (this.aO) {
      map.removeControl(this.aO);
    }
    if (this.ba) {
      this.ba.disable();
    }
  }
  e("controlsBox").checked = a;
};
MC3.prototype.mapClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("mapBox").checked);
  }
  if (this.bY == 5 || this.M == 0) {
    a = true;
  }
  this.aE = a;
  e("mapBox").checked = a;
  this.cz = -1;
  this.ap();
};
MC3.prototype.markersClick = function (a) {
  this.bg = a;
  for (var i = 0; i < this.G.length; i++) {
    var A = this.G[i];
    if (this.bg) {
      A.show();
    } else {
      A.hide();
      map.closeInfoWindow();
    }
  }
  if (this.bg && this.cO) {
    for (var i = 0; i < this.G.length; i++) {
      var A = this.G[i];
      A.hide();
    }
    this.G = [];
    this.aS();
  }
};
MC3.prototype.streetviewClick = function (a, am) {
  if (typeof(a) == "undefined") {
    a = !(e("streetviewBox").checked);
    am = null;
  }
  if (a) {
    this.M = 3;
    this.aJ = 3;
  } else {
    this.M = 0;
    this.aJ = 0;
    this.cz = -1;
    this.aE = true;
    e("mapBox").checked = true;
  }
  this.ap();
  if (a) {
    if (this.I) {
      var L = this.I.D;
    } else {
      var L = am;
    }
    if (!L) {
      L = map.getCenter();
    }
    this.io(a, L);
  }
  e("streetviewBox").checked = a;
};
MC3.prototype.veClick = function (a) {
  if (typeof(a) == "undefined") {
    a = !(e("veBox").checked);
  }
  if (a) {
    this.M = 4;
    this.aJ = 4;
  } else {
    this.M = 0;
    this.aJ = 0;
    this.aE = true;
    e("mapBox").checked = true;
    this.cz = -1;
  }
  this.ap();
  if (a) {
    if (this.I) {
      var L = this.I.D;
    } else {
      var L = map.getCenter();
    }
    var x = L.lng();
    var y = L.lat();
    this.dk(x, y, map.getZoom(), 0);
  }
  e("veBox").checked = a;
}
