﻿
var VGEO = 0;
var VSEARCH = 0;
VMC.prototype.cY = function()
{
   if(this.aJ.length > 0)
   {
      var cy = new VJS(this.aJ + "?nc=1");
      cy.bZ();
      cy.ct();
   }
   else
   {
      this.by();
   }
}
;
VMC.prototype.initVMC = function(a)
{
   for(var i = 0; i < a.length; i ++ )
   {
      var dh = a[i];
      var ab = new VFeed();
      ab.aK = i;
      ab.dI(dh);
      this.af[ab.aK] = ab;
   }
   this.by();
}
;
function VFeed()
{
   this.aK = 0;
   this.bl = "";
   this.ar = "";
   this.ai = false;
   this.ap = "black";
   this.ae = null;
   this.bb = [];
   this.ax = [];
   this.ba = 0;
}
;
VFeed.prototype.dI = function(a)
{
   this.bl = a[0];
   this.ar = a[1];
   this.ai = true;
   if(a.length > 2)
   {
      this.ap = a[2];
   }
}
;
// VFeed.prototype.bx = function()
// {
   // var aa = "<table cellpadding=1 cellspacing=0 style='color:white; background-color:"+this.ap+";font-weight:bold;width:"+vMC.aN+"px'><tr><td>" + "&nbsp;" + "<input id='sc"+this.aK+"' onclick='vMC.feedCheck(this)' type='checkbox' " + (this.ai ? "checked='checked'" : "") + " /> " + "<a href='javascript:vMC.feedClick("+this.aK+")' style='color:white;text-decoration:none'>" + this.ar + " (" + this.ax.length + ")</a>";
   // if(this.ba == VSEARCH)
   // {
      // aa += "</td><td align='right'>";
      // if(vMC.bE)
      // {
         // aa += "<a href='javascript:vMC.searchMore()' style='color:white'>More</a>&nbsp;";
      // }
      // aa += "<a href='javascript:vMC.searchClear()' style='color:white'>Clear</a>&nbsp;";
   // }
   // aa += "</td></tr></table>";
   // return aa;
// }
;
// VMC.prototype.co = function()
// {
   // this.aB = - 1;
   // VNextFeed2();
// }
;
// function VNextFeed(au)
// {
   // if(vMC.aB == 0 && vMC.feedBounds)
   // {
      // vMC.ce = vMC.map.GetZoomLevel();
      // var bt = vMC.map.GetCenter();
      // vMC.cc = bt.Longitude;
      // vMC.cb = bt.Latitude;
   // }
   // var bK = au.GetShapeCount();
   // vMC.aM.ae = au;
   // for(var i = 0; i < bK; i ++ )
   // {
      // var cr = au.GetShapeByIndex(i);
      // var ac = new VPlace();
      // ac.bh(cr);
      // vMC.aM.bq(ac);
   // }
   // setTimeout("VNextFeed2()", 1);
// }
;
// function VNextFeed2()
// {
   // vMC.e("indexInnerDiv").innerHTML += "Loading<br />";
   // vMC.aB ++ ;
   // if(vMC.aB < vMC.af.length)
   // {
      // var ab = vMC.af[vMC.aB];
      // vMC.aM = ab;
      // var layer = new VEShapeLayer();
      // var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, ab.bl, layer);
      // var bQ = false;
      // if(vMC.aB == 0 && vMC.feedBounds)
      // {
         // bQ = true;
      // }
      // vMC.map.ImportShapeLayerData(veLayerSpec, VNextFeed, bQ);
   // }
   // else
   // {
      // vMC.aj();
   // }
// }
;
// VFeed.prototype.bq = function(bI)
// {
   // if(this.bb[bI.bi] == null)
   // {
      // this.bb[bI.bi] = bI;
      // this.ax.push(bI);
   // }
// }
;
﻿;
// VMC.prototype.feedCheck = function(a)
// {
   // var dC = a.id.substr(0, 2);
   // var ds = parseInt(a.id.substr(2));
   // var ab = this.af[ds];
   // ab.ai = a.checked;
   // if(ab.ae)
   // {
      // if(ab.ai)
      // {
         // ab.ae.Show();
      // }
      // else
      // {
         // ab.ae.Hide();
      // }
   // }
   // this.aj();
// }
;
// VMC.prototype.feedClick = function(dR)
// {
   // for(var i = 0; i < this.af.length; i ++ )
   // {
      // ab = this.af[i];
      // if(i == dR)
      // {
         // if(this.e("sc" + i))
         // {
            // this.e("sc" + i).checked = true;
         // }
         // ab.ai = true;
      // }
      // else
      // {
         // if(this.e("sc" + i))
         // {
            // this.e("sc" + i).checked = false;
         // }
         // ab.ai = false;
      // }
      // if(ab.ae)
      // {
         // if(ab.ai)
         // {
            // ab.ae.Show();
         // }
         // else
         // {
            // ab.ae.Hide();
         // }
      // }
   // }
   // this.aj();
// }
;
// VMC.prototype.allClick = function()
// {
   // this.aL();
   // for(var i = 0; i < this.af.length; i ++ )
   // {
      // ab = this.af[i];
      // if(this.e("sc" + i))
      // {
         // this.e("sc" + i).checked = true;
      // }
      // if( ! ab.ai)
      // {
         // ab.ai = true;
         // if(ab.ae)
         // {
            // ab.ae.Show();
         // }
      // }
   // }
   // this.x = this.cc;
   // this.y = this.cb;
   // this.z = this.ce;
   // this.aV = new VELatLong(this.y, this.x);
   // this.map.SetCenterAndZoom(this.aV, this.z);
   // this.aj();
// }
;
// VMC.prototype.noneClick = function()
// {
   // this.aL();
   // for(var i = 0; i < this.af.length; i ++ )
   // {
      // ab = this.af[i];
      // if(this.e("sc" + i))
      // {
         // this.e("sc" + i).checked = false;
      // }
      // if(ab.ai)
      // {
         // ab.ai = false;
         // if(ab.ae)
         // {
            // ab.ae.Hide();
         // }
      // }
   // }
   // this.aj();
// }
;
// VMC.prototype.feedAdd = function()
// {
   // var bL = this.e("feedText").value;
   // if(bL.length == 0)
   // {
      // alert("Enter the url of a KML or GeoRSS feed");
      // return;
   // }
   // this.e("feedAddDiv").innerHTML = "<br/><b>Loading</b><br /><i>" + bL + "</i><br/><br/>";
   // this.ao = new VFeed();
   // this.ao.colour = "black";
   // this.ao.bl = bL;
   // this.ao.ar = "New Feed";
   // this.ao.ai = true;
   // var layer = new VEShapeLayer();
   // var veLayerSpec = new VEShapeSourceSpecification(VEDataType.ImportXML, bL, layer);
   // this.map.ImportShapeLayerData(veLayerSpec, cbFeedAdd, 1);
// }
;
// function cbFeedAdd(au)
// {
   // var bK = au.GetShapeCount();
   // if(bK > 0)
   // {
      // vMC.ao.ae = au;
      // vMC.ao.aK = vMC.af.length;
      // vMC.ao.ar = au.GetTitle();
      // vMC.ao.ap = (vMC.ao.aK % 2) ? "dodgerblue" : "forestgreen"; vMC.af.push(vMC.ao); vMC.aM = vMC.ao;
      // for(var i = 0; i < bK; i ++ )
      // {
         // var cr = au.GetShapeByIndex(i);
         // var ac = new VPlace();
         // ac.bh(cr);
         // vMC.ao.bq(ac);
      // }
   // }
   // else
   // {
      // alert(vMC.ao.bl + " is not a valid KML or GeoRSS feed");
   // }
   // vMC.aj();
// }
﻿;
VMC.prototype.bs = function()
{
   if(this.aA == 2)
   {
      this.bc = parseInt(document.documentElement.clientWidth);
      this.ay = parseInt(document.documentElement.clientHeight);
   }
   else
   {
      this.bc = parseInt(window.innerWidth);
      this.ay = parseInt(window.innerHeight);
   }
   this.ay -= this.topMargin;
   if(this.aA == 4)
   {
      this.ay -= 1;
   }
   var aD = this.sidebarWidth;
   this.bA = aD;
   if(this.searchOn)
   {
      this.aQ = 24;
   }
   else
   {
      this.aQ = 0;
   }
   this.cF = aD;
   this.aU = 24;
   this.dj = aD;
   this.cd = 60;
   this.cC = aD;
   this.bu = 20;
   this.aO = aD;
   this.bz = this.ay - this.aU - this.aQ - this.cd - 200;
   this.aE = 6;
   this.cB = this.ay;
   if(this.sidebarVisible)
   {
      this.bv = this.bc - aD - this.aE;
   }
   else
   {
      this.bv = this.bc - this.aE;
   }
   this.bR = this.ay;
   this.aN = aD - 20;
}
;
VMC.prototype.cE = function()
{
   this.bs();
   var cX = vMC.e("mainDiv");
   var di = this.sidebarVisible ? this.sidebarWidth : 0;
   var aa = "<div id='mapDiv' style='position:absolute;top:"+this.topMargin+"px;left:"+(di+this.aE)+"px;width:"+this.bv+"px;height:"+this.bR+"px'></div>" + "<div id='sidebarDiv' style='position:absolute;top:"+this.topMargin+"px;left:0px;display:"+(this.sidebarVisible?"block":"none")+"'>";
   if(this.searchOn)
   {
      aa += "<div style='font-size:14px;width:"+this.bA+"px;height:'0'px'>" + "<a href='http://www.virtualbirdseye.com'><img src='http://www.virtualbirdseye.com/vbemaplogo.jpg' alt='Virtual Birds Eye Home Page Link' /></a>" + "<p>Use the link below for a direct link to the Virtual Earth map!  (BEV Still under development)</p>" + "</div>";
   }
   aa += "<td style='width:64px'>" + "<span id='permalinkDiv'></span>" + "<div id='indexDiv' style='font-size:11px;;height:"+this.bz+"px;width:'100';overflow:auto'>" + "<div id='indexInnerDiv'></div>" + "</div>" + "<div id='adDiv' style='font-size:11px;width:"+this.dj+"px;height:"+this.cd+"px'>" + this.e("gaDiv").innerHTML + "</div>" + "<div id='footerDiv' style='font-size:11px;width:"+this.cC+"px;height:"+this.bu+"px'>" + "<table cellspacing=0 cellpadding=2 style='width:100%;'><tr valign=middle><td style='width:100%'>" + "Visit <a target='_blank' href='http://www.mapchannels.com' title='Create Embeddable Maps for Virtual Earth and Google Maps'>map channels</a> for free mapping tools" + "</td></tr></table>" + "</div>" + "</div>" + "<div id='sizerDiv' style='cursor:pointer;position:absolute;top:"+this.topMargin+"px;left:"+di+"px;background-color:darkblue;width:"+this.aE+"px;height:"+this.cB+"px' onclick='vMC.sidebarClick()' title='Hide/Show the side bar'></div>";
   cX.innerHTML = aa;
}
;
VMC.prototype.bB = function()
{
   var cg = this.e("indexDiv");
   var aT = this.e("mapDiv");
   var cl = this.e("sizerDiv");
   var cJ = this.e("sidebarDiv");
   this.sidebarVisible = cJ.style.display == "none" ? false : true;
   this.bs();
   cg.style.height = this.bz + "px";
   cl.style.height = this.cB + "px";
   aT.style.width = this.bv + "px";
   aT.style.height = this.bR + "px";
   aT.style.left = (this.sidebarVisible ? (this.aO + this.aE) : this.aE) + "px";
   cl.style.left = (this.sidebarVisible ? this.aO : 0) + "px";
   this.map.Resize(this.bv, this.bR);
}
;
﻿;
function VJS(dn)
{
   this.cz = dn;
   this.cv = document.getElementsByTagName("head").item(0);
}
;
VJS.prototype.bZ = function()
{
   this.cV = '&noCacheIE=' + (new Date()).getTime();
   this.as = document.createElement("script");
   this.as.setAttribute("type", "text/javascript");
   this.as.setAttribute("charset", "utf-8");
   this.as.setAttribute("src", this.cz + this.cV);
}
;
VJS.prototype.cZ = function()
{
   var dk = new Date();
   this.cs = '&noCacheIE=' + dk.getDate().toString() + dk.getMonth().toString();
   this.as = document.createElement("script");
   this.as.setAttribute("type", "text/javascript");
   this.as.setAttribute("charset", "utf-8");
   this.as.setAttribute("src", this.cz + this.cs);
}
;
VJS.prototype.dp = function()
{
   this.cv.removeChild(this.as);
}
;
VJS.prototype.ct = function()
{
   this.cv.appendChild(this.as);
}
;
﻿;
var vMC = null;
function VMC()
{
   this.aX = "map.htm";
   this.bm = [VEMapStyle.Road, VEMapStyle.Aerial, VEMapStyle.Hybrid, VEMapStyle.Birdseye];
   this.map = null;
   this.dN = false;
   this.x = - 86.088867;
   this.y = 39.808536;
   this.z = 4;
   this.aV = new VELatLong(this.y, this.x);
   this.bW = null;
   this.bT = null;
   this.bS = null;
   this.bV = null;
   this.be = "";
   this.cO = 2;
   this.cP = 0;
   this.cR = 0;
   this.cN = 0;
   this.heading = 0;
   this.pitch = - 45;
   this.altitude = 10000;
   this.aC = [];
   this.aJ = "";
   this.af = [];
   this.mapType = 0;
   this.wheelScroll = 1;
   this.topMargin = 0;
   this.mode3d = 1;
   this.mode3dOn = 0;
   this.trafficOn = 0;
   this.searchOn = 1;
   this.feedBounds = 0;
   this.sidebarWidth = 250;
   this.sidebarVisible = 1;
   this.bg = false;
   this.al = null;
}
;
VMC.prototype.cQ = function()
{
   this.ci();
   this.bH();
   this.cY();
}
;
VMC.prototype.by = function()
{
   if(this.bW && this.bT && this.bS)
   {
      this.x = this.bW;
      this.y = this.bT;
      this.z = this.bS;
      if(this.cO == 3)
      {
         this.altitude = this.cP;
         this.pitch = this.cR;
         this.heading = this.cN;
      }
   }
   if(this.bV)
   {
      this.mapType = this.bV;
   }
   this.aV = new VELatLong(this.y, this.x);
   this.cE();
   this.cW();
   this.co();
}
;
VMC.prototype.bH = function()
{
   var ck = document.location.href.indexOf("?");
   if(ck > 0)
   {
      this.aX = document.location.href.substr(0, ck);
   }
   var an = document.location.search.substring(1);
   this.be = this.ak(an, "data");
   var cI = this.ak(an, "x");
   var cT = this.ak(an, "y");
   var cS = this.ak(an, "z");
   var dy = this.ak(an, "t");
   if(cI.length > 0 && cT.length > 0)
   {
      this.bW = parseFloat(cI);
      this.bT = parseFloat(cT);
      this.bV = parseFloat(dy);
   }
   if(cS.length > 0)
   {
      this.bS = parseInt(cS);
   }
   var dz = this.ak(an, "m");
   var du = this.ak(an, "a");
   var dv = this.ak(an, "p");
   var dr = this.ak(an, "h");
   if(dz == "3")
   {
      this.cO = 3;
      this.cP = parseFloat(du);
      this.cR = parseFloat(dv);
      this.cN = parseFloat(dr);
   }
   if(this.be.length > 0)
   {
      var bM = this.be;
      var df = bM.indexOf(".js");
      if(df < 0)
      {
         bM = "http://www.virtualbirdseye.com/map/" + bM + ".js";
      }
      this.aJ = bM;
   }
   else
   {
      var bG = vMC.e("VMCData");
      if(bG)
      {
         this.aJ = bG.innerHTML;
      }
   }
}
;
function initPage()
{
   vMC = new VMC();
   vMC.cQ();
}
;
function closePage()
{
}
;
function resizePage()
{
   vMC.bB();
}
;
﻿;
VMC.prototype.cW = function()
{
   this.map = new VEMap("mapDiv");
   this.cc = this.x;
   this.cb = this.y;
   this.ce = this.z;
   var dc = new VELatLong(this.y, this.x);
   var cx = this.bm[this.mapType];
   if(this.mode3dOn)
   {
      this.map.LoadMap(dc);
      var initView = new VEMapViewSpecification(dc, this.z, this.altitude, this.pitch, this.heading);
      this.map.SetMapMode(VEMapMode.Mode3D);
      this.map.SetMapStyle(cx);
      this.map.SetMapView(initView);
   }
   else
   {
      this.map.LoadMap(dc, this.z, cx, false, (this.mode3dOn ? VEMapMode.Mode3D : VEMapMode.Mode2D), (this.mode3d ? true : false), 0, null);
   }
   this.map.AttachEvent("onendpan", mapViewChanged);
   this.map.AttachEvent("onendzoom", mapViewChanged);
   if(this.mode3d)
   {
      this.map.AttachEvent('onmodenotavailable', vMC.no3DInstalled);
   }
   if( ! this.wheelScroll)
   {
      this.map.AttachEvent("onmousewheel", vMC.bP);
   }
   if(this.trafficOn)
   {
      this.map.LoadTraffic(true);
      this.map.ShowTrafficLegend();
      this.map.SetTrafficLegendText("Traffic");
   }
   mapViewChanged();
}
;
VMC.prototype.no3DInstalled = function()
{
   alert('Before viewing the maps in 3D mode, ' + 'you must install the Virtual Earth 3D software on your computer.' + '\nTo install the software, visit ' + 'http://go.microsoft.com/fwlink/?LinkId=72623.');
}
;
VMC.prototype.bP = function()
{
   return true;
}
;
function mapViewChanged()
{
   vMC.aV = vMC.map.GetCenter();
   vMC.z = vMC.map.GetZoomLevel();
   vMC.bO();
}
;
VMC.prototype.bO = function()
{
   var aa = "<a target='_blank' title='Link to share with others' href='"+vMC.aX+"?";
   switch(this.map.GetMapStyle())
   {
      case VEMapStyle.Road :
         this.mapType = 0;
         break;
      case VEMapStyle.Shaded :
         this.mapType = 0;
         break;
      case VEMapStyle.Aerial :
         this.mapType = 1;
         break;
      case VEMapStyle.Hybrid :
         this.mapType = 2;
         break;
      case VEMapStyle.Oblique :
         this.mapType = 3;
         break;
      case VEMapStyle.Birdseye :
         this.mapType = 3;
         break;
      case VEMapStyle.BirdseyeHybrid :
         this.mapType = 3;
         break;
   }
   aa += "x=" + this.av(this.aV.Longitude, 6) + "&y=" + this.av(this.aV.Latitude, 6) + "&z=" + this.z + "&t=" + this.mapType;
   if(this.map.GetMapMode() == VEMapMode.Mode3D)
   {
      aa += "&m=3";
      aa += "&a=" + parseInt(this.map.GetAltitude());
      aa += "&p=" + this.av(this.map.GetPitch(), 2);
      aa += "&h=" + this.av(this.map.GetHeading(), 2);
   }
   if(this.aJ.length > 0)
   {
      aa += "&data=" + this.aJ;
   }
   aa += "' style='font-size:14px'>LINK</a>";
   vMC.e("permalinkDiv").innerHTML = aa;
}
;
﻿;
function VPlace()
{
   this.bi = "";
   this.ar = "";
   this.dT = "";
   this.x = 0;
   this.y = 0;
   this.az = null;
   this.url = "";
   this.markerImage = "";
   this.dK = "";
   this.dS = "";
   this.dO = "";
   this.dH = "";
   this.dD = "";
   this.bd = "";
   this.bk = 0;
   this.ap = "black";
   this.ba = 0;
   this.aq = false;
}
;
VPlace.prototype.aF = function()
{
   if(vMC.bg || this.aq)
   {
      var aa = "";
      aa += "<table cellspacing=2 cellpadding=0 style='width:100%'><tr><td style='width:100%'>";
      if(this.aq)
      {
         aa += "<table cellspacing=0 cellpadding=2 style='width:100%;border:solid 1px black; background-color:white'><tr><td style='width:100%'>";
      }
      aa += "<span style='font-weight:bold;color:"+this.ap+"'>" + this.ar + "</span>";
      if(this.aq)
      {
         aa += "<br/><br/>" + "<a href='javascript:vMC.zoomIn("+this.bk+")'>Zoom In</a> " + "<a href='javascript:vMC.zoomOut("+this.bk+")'>Zoom Out</a> ";
         aa += "<br/><br/>";
      }
      else
      {
         aa += " &nbsp;";
      }
      aa += this.bd;
      if(this.aq)
      {
         aa += "<br /><br />";
         aa += "</td></tr></table>";
      }
      aa += "</td></tr></table>";
   }
   else
   {
      var aa = "&nbsp; <span style='color:"+this.ap+"'>&bull;</span> " + this.ar;
   }
   return aa;
}
;
VPlace.prototype.bX = function()
{
   var aa = "<div id='r"+this.bk+"' style='cursor:pointer;background-color:"+"white;width:"+vMC.aN+"px' " + "onmouseover='vMC.rowHi("+this.bk+")' onmouseout='vMC.rowLo("+this.bk+")' onclick='vMC.rowClick("+this.bk+")'>";
   aa += this.aF();
   aa += "</div>";
   return aa;
}
;
VPlace.prototype.dM = function()
{
   vMC.dJ = this;
   vMC.map.HideInfoBox();
   vMC.map.ShowInfoBox(this.ae, this.az);
}
;
VPlace.prototype.bh = function(bo)
{
   this.ba = 0;
   this.bi = bo.GetID();
   this.ar = bo.GetTitle();
   var aS = bo.GetPoints();
   var x = 0;
   var y = 0;
   for(var i = 0; i < aS.length; i ++ )
   {
      x += aS[i].Longitude;
      y += aS[i].Latitude;
   }
   if(aS.length)
   {
      x /= aS.length;
      y /= aS.length;
   }
   this.az = new VELatLong(y, x);
   this.x = this.az.Longitude;
   this.y = this.az.Latitude;
   this.bd = bo.GetDescription();
   this.ae = bo;
   this.ap = vMC.aM.ap;
   this.ai = true;
}
;
VPlace.prototype.bU = function(aP)
{
   this.ba = VSEARCH;
   this.bi = aP.Phone;
   this.ar = aP.Name;
   this.az = aP.LatLong;
   this.x = this.az.Longitude;
   this.y = this.az.Latitude;
   this.bd = aP.Description + " &nbsp;<span style='color:darkred'>" + aP.Phone + "</span>";
   this.ae = aP.Shape;
   this.ap = "black";
   this.ai = true;
}
;
﻿;
VMC.prototype.search = function()
{
   var cG = this.e("searchText").value;
   var da = "";
   this.e("searchButton").disabled = true;
   if(cG == "" && da == "")
   {
      alert("Please enter some search text");
      return;
   }
   var cD = new VEShapeLayer();
   this.cL = cG;
   this.aH = 0;
   this.bE = false;
   this.map.Find(cG, da, null, cD, this.aH, 20, true, true, true, false, cbVSearch);
   vMC.noneClick();
}
;
function cbVSearch(db, aR, dQ, dm, dw)
{
   vMC.e("searchButton").disabled = false;
   vMC.bE = dm;
   if(vMC.aH == 0)
   {
      var ah = new VFeed();
      ah.ar = "Search";
      ah.ap = "black";
      ah.ai = true;
      ah.ba = VSEARCH;
   }
   else
   {
      var ah = vMC.af[0];
   }
   if(aR)
   {
      for(var i = 0; i < aR.length; i ++ )
      {
         ac = new VPlace();
         ac.bU(aR[i]);
         ah.ax.push(ac);
         ah.bb[ac.dV] = ac;
      }
   }
   ah.ae = db;
   if(vMC.aH == 0)
   {
      var at = vMC.af[0];
      if(at && at.ba == VSEARCH)
      {
         if(at.ae)
         {
            at.ae.Hide();
         }
      }
      else
      {
         for(var i = vMC.af.length - 1; i >= 0; i -- )
         {
            var ab = vMC.af[i];
            ab.aK = i + 1;
            vMC.af[i + 1] = ab;
         }
      }
      vMC.af[0] = ah;
      vMC.map.AddShapeLayer(db);
   }
   vMC.aj();
}
;
VMC.prototype.searchKey = function(bp)
{
   var aY = bp.keyCode;
   if(aY == 13)
   {
      this.search();
      return false;
   }
   return true;
}
;
VMC.prototype.searchClear = function()
{
   var at = vMC.af[0];
   if(at && at.ba == VSEARCH)
   {
      if(at.ae)
      {
         at.ae.Hide();
      }
      for(var i = 1; i < vMC.af.length; i ++ )
      {
         var ab = vMC.af[i];
         ab.aK = i - 1;
         vMC.af[i - 1] = ab;
      }
      vMC.af.length -- ;
      vMC.aj();
   }
   vMC.e("searchText").value = "";
   vMC.e("searchText").focus();
}
;
VMC.prototype.searchMore = function()
{
   this.aH += 20;
   var ah = this.af[0];
   if(ah && ah.ba == VSEARCH)
   {
      this.map.Find(this.cL, "", null, ah.ae, this.aH, 20, true, true, true, false, cbVSearch);
   }
}
;
﻿;
VMC.prototype.aj = function()
{
   var aa = "";
   var ix = 0;
   this.aC = [];
   for(var i = 0; i < this.af.length; i ++ )
   {
      var ab = this.af[i];
      if(ab == null)
      {
      }
      if(i > 0)
      {
         aa += "<div style='float:left'>";
      }
      aa += ab.bx();
      if(i > 0)
      {
         aa += "</div>";
      }
      if(ab.ai)
      {
         aa += "<div style='float:left'>";
         ab.ax.sort(this.dx);
         for(var j = 0; j < ab.ax.length; j ++ )
         {
            var ac = ab.ax[j];
            ac.bk = this.aC.length;
            this.aC.push(ac);
            aa += ac.bX();
         }
         aa += "</div>";
      }
   }
   aa += vMC.bY();
   vMC.e("indexInnerDiv").innerHTML = aa;
   vMC.map.HideInfoBox();
}
;
VMC.prototype.rowHi = function(a)
{
   this.e("r" + a).style.backgroundColor = "yellow";
   var ac = this.aC[a];
   this.map.HideInfoBox();
   this.map.ShowInfoBox(ac.ae, ac.az);
}
;
VMC.prototype.rowLo = function(a)
{
   this.e("r" + a).style.backgroundColor = "white";
}
;
VMC.prototype.dx = function(p1, p2)
{
   var v1 = p1.ar;
   var v2 = p2.ar;
   var aW = ((v1 < v2) ? - 1 : ((v1 > v2) ? 1 : 0));
   return aW;
}
;
VMC.prototype.cf = function(bn)
{
   var r = false;
   var v = this.map.GetMapView();
   var x = bn.Longitude;
   var y = bn.Latitude;
   var nw = v.TopLeftLatLong;
   var se = v.BottomRightLatLong;
   if(x > nw.Longitude && x < se.Longitude && y > se.Latitude && y < nw.Latitude)
   {
      r = true;
   }
   return r;
}
;
VMC.prototype.rowClick = function(a)
{
   var ac = vMC.aC[a];
   if(this.al && ac != this.al)
   {
      this.al.aq = false;
      var bF = this.e("r" + this.al.bk);
      if(bF)
      {
         bF.innerHTML = this.al.aF();
      }
      this.al = null;
   }
   if(ac && ! ac.aq)
   {
      var dq = ac.ae;
      if(dq)
      {
         this.map.HideInfoBox();
         var dP = this.map.GetCenter();
         if( ! this.cf(ac.az))
         {
            this.map.SetCenter(ac.az);
         }
         this.map.ShowInfoBox(ac.ae, ac.az);
         if( ! ac.aq)
         {
            ac.aq = true;
            var aa = ac.aF();
            this.e("r" + a).innerHTML = aa;
         }
         this.al = ac;
      }
   }
}
;
VMC.prototype.bY = function()
{
   var aa = "<br/>" + "<div id='feedAddDiv'>" + "<table cellpadding=2 cellspacing=0 style='float:left;font-size:10px;width:"+vMC.aN+"px'><tr><td style='width:100%'>" + "<b>Add KML or GeoRSS feed to map</b>" + "</td></tr><tr><td>" + "<input id='feedText'  type='text' title='Enter full URL of a KML or GeoRSS Feed' style='font-size:10px;width:168px' /> " + "<input type='button' onclick='vMC.feedAdd()' value='Add' style='color:darkred;font-size:10px;width:40px'/>" + "<br /><br />" + "</td></tr></table></div>";
   return aa;
}
;
VMC.prototype.sidebarClick = function()
{
   var bD = this.e("sidebarDiv");
   var cl = this.e("sizerDiv");
   var aT = this.e("mapDiv");
   if(bD.style.display != "none")
   {
      this.sidebarVisible = true;
      bD.style.display = "none";
   }
   else
   {
      this.sidebarVisible = false;
      bD.style.display = "block";
   }
   this.bB();
}
;
VMC.prototype.aL = function(a)
{
   for(var i = 0; i < this.af.length; i ++ )
   {
      var ab = this.af[i];
      for(var j = 0; j < ab.ax.length; j ++ )
      {
         var ac = ab.ax[j];
         ac.aq = false;
      }
   }
}
;
VMC.prototype.detailClick = function(a)
{
   this.aL();
   if(a.checked)
   {
      this.bg = true;
   }
   else
   {
      this.bg = false;
   }
   this.aj();
}
;
VMC.prototype.zoomIn = function(a)
{
   var ac = vMC.aC[a];
   if(ac)
   {
      var z = this.map.GetZoomLevel() + 1;
      this.map.SetCenterAndZoom(ac.az, z);
   }
}
;
VMC.prototype.zoomOut = function(a)
{
   var ac = vMC.aC[a];
   if(ac)
   {
      var z = this.map.GetZoomLevel() - 1;
      this.map.SetCenterAndZoom(ac.az, z);
   }
}
;
﻿;
VMC.prototype.e = function(id)
{
   return document.getElementById(id);
}
;
VMC.prototype.dL = function(a)
{
   GLog.write(a);
}
;
VMC.prototype.ci = function()
{
   if(navigator.userAgent.indexOf("Firefox") != - 1)
   {
      this.aA = 1;
   }
   else if(navigator.userAgent.indexOf("MSIE") != - 1)
   {
      this.aA = 2;
   }
   else if(navigator.userAgent.indexOf("Safari") != - 1)
   {
      this.aA = 3;
   }
   else if(navigator.userAgent.indexOf("Opera") != - 1)
   {
      this.aA = 4;
   }
}
;
VMC.prototype.dB = function(dE)
{
   var cj = "";
   for(var i = 0; i < dE.length; i ++ )
   {
      var c = dE.substr(i, 1);
      if(c == ' ' || c == '+')
      {
         cj += "&nbsp;";
      }
      else if(c == '-')
      {
         cj += (this.aA == 2 ? "&nbsp;" : "-");
      }
      else
      {
         cj += c;
      }
   }
   return cj;
}
;
VMC.prototype.av = function(pFloat, pDp)
{
   var m = Math.pow(10, pDp);
   return parseInt(pFloat * m, 10) / m;
}
;
VMC.prototype.ak = function(aI, bj)
{
   var cp = bj + "=";
   if(aI.length > 0)
   {
      var bJ = aI.indexOf(bj);
      if(bJ != - 1)
      {
         bJ += cp.length;
         var de = aI.indexOf("&", bJ);
         if(de == - 1)
         {
            de = aI.length;
         }
         return unescape(aI.substring(bJ, de));
      }
   }
   return "";
}
;
VMC.prototype.dF = function(dG)
{
   var dA = Math.floor(Math.random() * dG);
   return dA;
}
;
