﻿var map = null;
var slVisCntr = null;
//var slDetail = null;
//var slPolyBoundary = null;
//var slPolyRoadMask = null;
//var slPolyAdm70Mask = null; // added
//var slPolyBldg = null;
//var slPolyPark = null;
//var slPolyLineRoad = null;
var slFindResults = new VEShapeLayer();
var slCrowFlies = new VEShapeLayer();
var itemArray = new Array();
var route = null;
var routeType = null;
var ppVisCntr = null;
var ppVisCntrPark = null;
var bPointsOnOff = 1;
var pPolyOnOff = 1;

var polyline;
//var startLongValue;
//var endLongValue;
//var startLatValue;
//var endLatValue;
var earthRadius = 6367; //radius in km 

var ppBldg1 = null;
var ppBldg2 = null;
var ppBldg3 = null;
var ppBldg4 = null;
var ppBldg5 = null;
var ppBldg6 = null;
var ppBldg7 = null;
var ppBldg8 = null;
var ppBldg9 = null;
var ppBldg10 = null;
var ppBldg11 = null;
var ppBldg12 = null;
var ppBldg14 = null;
var ppBldg15 = null;
var ppBldg17 = null;
var ppBldg19 = null;
var ppBldg20 = null;
var ppBldg21 = null;
var ppBldg22 = null;
var ppBldg23 = null;
var ppBldg24 = null;
var ppBldg25 = null;
var ppBldg26 = null;
var ppBldg27 = null;
var ppBldg28 = null;
var ppBldg29 = null;
var ppBldg30 = null;
var ppBldg31 = null;
var ppBldg32 = null;
var ppBldg33 = null;
var ppBldg34 = null;
var ppBldg35 = null;
var ppBldg38 = null;
var ppBldg39 = null;
var ppBldg40 = null;
var ppBldg41 = null;
var ppBldg42 = null;
var ppBldg43 = null;
var ppBldg44 = null;
var ppBldg45 = null;
var ppBldg46 = null;
var ppBldg47 = null;
var ppBldg48 = null;
var ppBldg49 = null;
var ppBldg50 = null;
var ppBldg51 = null;
var ppBldg52 = null;
var ppBldg53 = null;
var ppBldg54 = null;
var ppBldg55 = null;
var ppBldg56 = null;
var ppBldg57 = null;
var ppBldg58 = null;
var ppBldg59 = null;
var ppBldg60 = null;
var ppBldg61 = null;
var ppBldg62 = null;
var ppBldg64 = null;
var ppBldg65 = null;
var ppBldg66 = null;
var ppBldg67 = null;
var ppBldg68 = null;
var ppBldg69 = null;
var ppBldg70 = null;
var ppBldg71 = null;
var ppBldg72 = null;
var ppBldg73 = null;
var ppBldg75 = null;
var ppBldg76 = null;
var ppBldg78 = null;
var ppBldg82 = null;
var ppBldg85 = null;
var ppBldg86 = null;
var ppBldg87 = null;
var ppBldg88 = null;
var ppBldg89 = null;
var ppBldg91 = null;
var ppBldg92 = null;
var ppBldg93 = null;
var ppBldg94 = null;
var ppBldg96 = null;
var ppBldg97 = null;
var ppBldg98 = null;
var ppBldg99 = null;
var ppBldg101 = null;
var ppBldg102 = null;
var ppBldg103 = null;
var ppBldg105 = null;
var ppBldg106 = null;
var ppBldg107 = null;
var ppBldg108 = null;
var ppBldg110 = null;
var ppBldg111 = null;
var ppBldg112 = null;
var ppBldg113 = null;
var ppBldg114 = null;
var ppBldg115 = null;
var ppBldg118 = null;
var ppBldg119 = null;
var ppBldg121 = null;
var ppBldg122 = null;
var ppBldg124 = null;
var ppBldg125 = null;
var ppBldg126 = null;
var ppBldg127 = null;
var ppBldg128 = null;
var ppBldg129 = null;
var ppBldg130 = null;
var ppBldg131 = null;
var ppBldg132 = null;
var ppBldg133 = null;
var ppBldg134 = null;
var ppBldg135 = null;
var ppBldg136 = null;
var ppBldg137 = null;
var ppBldg138 = null;
var ppBldg140 = null;
var ppBldg142 = null;
var ppBldg143 = null;
var ppBldg144 = null;
var ppBldg145 = null;
var ppBldg146 = null;
var ppBldg147 = null;
var ppBldg148 = null;
var ppBldg149 = null;
var ppBldg150 = null;
var ppBldg151 = null;
var ppBldg152 = null;
var ppBldg153 = null;
var ppBldg154 = null;
var ppBldg155 = null;
var ppBldg156 = null;
var ppBldg157 = null;
var ppBldg158 = null;
var ppBldg159 = null;
var ppBldg160 = null;
var ppBldg161 = null;
var ppBldg162 = null;
var ppBldg163 = null;
var ppBldg164 = null;
var ppBldg177 = null;
var ppBldg182 = null;
var ppBldg183 = null;
var ppBldg184 = null;
var ppBldg185 = null;
var ppBldg189 = null;
var ppBldg190 = null;
var ppBldg191 = null;
var ppBldg192 = null;
var ppBldg193 = null;
var ppBldg194 = null;
var ppBldg197 = null;
var ppBldg198 = null;
var ppBldg199 = null;
var ppBldg200 = null;
var ppBldg202 = null;
var ppBldg204 = null;
var ppBldg207 = null;
var ppBldg209 = null;
var ppBldg210 = null;
var ppBldg211 = null;
var ppBldg212 = null;
var ppBldg213 = null;
var ppBldg214 = null;
var ppBldg215 = null;
var ppBldg216 = null;
var ppBldg219 = null;
var ppBldg220 = null;
var ppBldg222 = null;
var ppBldg223 = null;
var ppBldg224 = null;
var ppBldg225 = null;
var ppBldg227 = null;
var ppBldg229 = null;
var ppBldg230 = null;
var ppBldg231 = null;
var ppBldg232 = null;
var ppBldg235 = null;
var ppBldg236 = null;
var ppBldg237 = null;
var ppBldg238 = null;
var ppBldg240 = null;
var ppBldg241 = null;
var ppBldg242 = null;
var ppBldg243 = null;
var ppBldg244 = null;
var ppBldg245 = null;
var ppBldg246 = null;
var ppBldg247 = null;
var ppBldg248 = null;
var ppBldg249 = null;
var ppBldg250 = null;
var ppBldg251 = null;
var ppBldg252 = null;
var ppBldg253 = null;
var ppBldg254 = null;
var ppBldg255 = null;
var ppBldg256 = null;
var ppBldg257 = null;
var ppBldg258 = null;
var ppBldg259 = null;
var ppBldg260 = null;
var ppBldg261 = null;
var ppBldg262 = null;
var ppBldg263 = null;
var ppBldg264 = null;
var ppBldg265 = null;
var ppBldg266 = null;
var ppBldg267 = null;
var ppBldg268 = null;
var ppBldg269 = null;
var ppBldg272 = null;
var ppBldg274 = null;
var ppBldg275 = null;
var ppBldg276 = null;
var ppBldg277 = null;
var ppBldg278 = null;
var ppBldg279 = null;
var ppBldg281 = null;
var ppBldg282 = null;
var ppBldg283 = null;
var ppBldg284 = null;
var ppBldg285 = null;
var ppBldg286 = null;
var ppBldg287 = null;
var ppBldg288 = null;
var ppBldg289 = null;
var ppBldg293 = null;
var ppBldg294 = null;
var ppBldg297 = null;
var ppBldg298 = null;
var ppBldg300 = null;
var ppBldg301 = null;
var ppBldg302 = null;
var ppBldg305 = null;
var ppBldg308 = null;
var ppBldg312 = null;
var ppBldg314 = null;
var ppBldg315 = null;
var ppBldg322 = null;
var ppBldg333 = null;
var ppBldg336 = null;
var ppBldg337 = null;
var ppBldg343 = null;
var ppBldg344 = null;
var ppBldg345 = null;
var ppBldg346 = null;
var ppBldg347 = null;
var ppBldg348 = null;
var ppBldg349 = null;
var ppBldg350 = null;
var ppBldg351 = null;
var ppBldg353 = null;
var ppBldg361 = null;
var ppBldg362 = null;
var ppBldg363 = null;
var ppBldg365 = null;
var ppBldg377 = null;
var ppBldg378 = null;
var ppBldg381 = null;
var ppBldg386 = null;
var ppBldg400 = null;
var ppBldg401 = null;
var ppBldg402 = null;
var ppBldg408 = null;
var ppBldg412 = null;
var ppBldg413 = null;
var ppBldg417 = null;
var ppBldg420 = null;
var ppBldg428 = null;
var ppBldg432 = null;
var ppBldg433 = null;
var ppBldg442 = null;
var ppBldg449 = null;
var ppBldg450 = null;
var ppBldg451 = null;
var ppBldg452 = null;
var ppBldg453 = null;
var ppBldg456 = null;
var ppBldg460 = null;
var ppBldg461 = null;
var ppBldg467 = null;
var ppBldg473 = null;
var ppBldg481 = null;
var ppBldg482 = null;
var ppBldg484 = null;
var ppBldg485 = null;
var ppBldg487 = null;
var ppBldg489 = null;
var ppBldg490 = null;
var ppBldg494 = null;
var ppBldg495 = null;
var ppBldg503 = null;
var ppBldg504 = null;
var ppBldg505 = null;
var ppBldg506 = null;
var ppBldg507 = null;
var ppBldg509 = null;
var ppBldg510 = null;
var ppBldg511 = null;
var ppBldg514 = null;
var ppBldg517 = null;
var ppBldg518 = null;
var ppBldg564 = null;
var ppBldg565 = null;
var ppBldg566 = null;
var ppBldg567 = null;
var ppBldg568 = null;
var ppBldg571 = null;
var ppBldg572 = null;
var ppBldg582 = null;
var ppBldg585 = null;
var ppBldg596 = null;
var ppBldg600 = null;
var ppBldg601 = null;
var ppBldg604 = null;
var ppBldg611 = null;
var ppBldg612 = null;
var ppBldg613 = null;
var ppBldg614 = null;
var ppBldg615 = null;
var ppBldg618 = null;
var ppBldg621 = null;
var ppBldg622 = null;
var ppBldg623 = null;
var ppBldg624 = null;
var ppBldg625 = null;
var ppBldg626 = null;
var ppBldg627 = null;
var ppBldg629 = null;
var ppBldg630 = null;
var ppBldg631 = null;
var ppBldg632 = null;
var ppBldg636 = null;
var ppBldg8633 = null;
var ppBldg9983 = null;

function toggleBldgSort()
{
	var box1 = this.Select1.options;
	for (i = 2; i < this.Select1.options.length; i++)
	{
		box1[i].text = "";
		box1[i].value = "";
	}
}

function buildList(whichLayer)
{
	var elem
	elem = document.getElementById( whichLayer );
	alert(elem);
}

function EventMapLoad()
{
    // atb 3-2009
	//clRoadMaskPoly();
	//clRoadFixes();
	//clBoundPoly();
	//clParkPoly();
	//clBldgPoly();
	clBldgPnts();
	clVisCntrPnts();
}

function ViewChanged()
{
	ZoomScale();
}

function ZoomScale() {

// atb 3-2009 updated for ArcGIS server
    var zoom_val = null;
		zoom_val = map.GetZoomLevel();
		if ((zoom_val >= 17) && (zoom_val <= 19))
		{
			if (bPointsOnOff != 0)
			{
				slPinVisCntr.Show();
				slPinBldgDet.Show();
				slCrowFlies.Show();
			}
			
		}
		else if ((zoom_val == 16) || (zoom_val == 15))
		{
			if (bPointsOnOff != 0)
			{
				slPinVisCntr.Show();
				slPinBldgDet.Hide();
				slCrowFlies.Show();
			}
			
		}
		else if (zoom_val == 14)
		{
			if (bPointsOnOff != 0)
			{
				slPinVisCntr.Show();
				slPinBldgDet.Hide();
				slCrowFlies.Show();
			}
			
		}
		else if ((zoom_val ==12) || (zoom_val == 13))
		{
			slPinVisCntr.Show();
			slPinBldgDet.Hide();
			slCrowFlies.Hide();
			
		}
		else if (zoom_val <= 11)
		{
			slPinVisCntr.Show();
			slPinBldgDet.Hide();
			slCrowFlies.Hide();
			
		}



// atb 3-2009 original code before ArcGIS Server
//	slPolyBoundary.Show();
//	//slPolyPark.Show();
//	var style = map.GetMapStyle();
//	if (style == "r")
//	{
//		slPolyRoadMask.Show();
//		slPolyLineRoad.Show();
//	}
//	else
//	{
//		slPolyRoadMask.Hide();
//		slPolyLineRoad.Hide();
//	}
//	if (style == "o")
//	{
//		if (bPointsOnOff != 0)
//		{
//			slPinBldgDet.Show();
//			slPolyBldg.Show();
//		}
//	}
//	else
//	{
//		var zoom_val = null;
//		zoom_val = map.GetZoomLevel();
//		if ((zoom_val >= 17) && (zoom_val <= 19))
//		{
//			if (bPointsOnOff != 0)
//			{
//				slPinVisCntr.Show();
//				slPinBldgDet.Show();
//			}
//			slPolyBldg.Show();
//			slPolyBoundary.Show();
//			if (pPolyOnOff != 0)
//				slPolyPark.Show();
//		}
//		else if ((zoom_val == 16) || (zoom_val == 15))
//		{
//			if (bPointsOnOff != 0)
//			{
//				slPinVisCntr.Show();
//				slPinBldgDet.Hide();
//			}
//			slPolyBldg.Show();
//			slPolyBoundary.Show();
//			if (pPolyOnOff != 0)
//				slPolyPark.Show();
//		}
//		else if (zoom_val == 14)
//		{
//			if (bPointsOnOff != 0)
//			{
//				slPinVisCntr.Show();
//				slPinBldgDet.Hide();
//			}
//			slPolyRoadMask.Hide();
//			slPolyLineRoad.Hide();
//			slPolyBldg.Hide();
//			slPolyPark.Hide();
//			slPolyBoundary.Show();
//		}
//		else if ((zoom_val ==12) || (zoom_val == 13))
//		{
//			slPinVisCntr.Show();
//			slPinBldgDet.Hide();
//			slPolyBldg.Hide();
//			slPolyPark.Hide();
//			slPolyRoadMask.Hide();
//			slPolyLineRoad.Hide();
//			slPolyBoundary.Show();
//		}
//		else if (zoom_val <= 11)
//		{
//			slPinVisCntr.Show();
//			slPinBldgDet.Hide();
//			slPolyBldg.Hide();
//			slPolyPark.Hide();
//			slPolyRoadMask.Hide();
//			slPolyLineRoad.Hide();
//			slPolyBoundary.Hide();
//		}
//	}
}

function bldgPointsOnOff(onoff)
{
	var style = map.GetMapStyle();
	if (bPointsOnOff == 0)
	{
		bPointsOnOff = 1;
		if (style != "o")
			if (map.GetZoomLevel() <= 16)
				alert("You must zoom in closer to view points on all the buildings.");
		ZoomScale();
	}
	else if (bPointsOnOff != 0)
	{
		if (style != "o")
			if (map.GetZoomLevel() <= 16)
				alert("As you zoom in closer the building points will not be displayed.");
		bPointsOnOff = 0;
		//slPinVisCntr.Hide();
		slPinBldgMajor.Hide();
		slPinBldgDet.Hide();
		slCrowFlies.Hide();
	}
}

//function parkPolyOnOff(onoff)
//{
//	var style = map.GetMapStyle();
//	if (pPolyOnOff == 0)
//	{
//		pPolyOnOff = 1;
//		if (style != "o")
//			if (map.GetZoomLevel() <= 16)
//				alert("You must zoom in closer to view parking lots.");
//		ZoomScale();
//	}
//	else if (pPolyOnOff != 0)
//	{
//		if (style != "o")
//			if (map.GetZoomLevel() <= 16)
//				alert("As you zoom in closer the Parking Lots will not be displayed.  Click this link again to turn them back on.");
//		pPolyOnOff = 0;
//		//slPinVisCntr.Hide();
//		slPolyPark.Hide();
//	}
//}

function BldgZoomLatLong(bldgid)
{
	try
	{
		switch(bldgid)
		{
case '1': map.SetCenterAndZoom(new VELatLong(38.0406654903,-84.5073088198), 18); setTimeout("map.ShowInfoBox(ppBldg1)", 500); break
case '2': map.SetCenterAndZoom(new VELatLong(38.0397346804,-84.5076315006), 18); setTimeout("map.ShowInfoBox(ppBldg2)", 500); break
case '3': map.SetCenterAndZoom(new VELatLong(38.0355743355,-84.5070071667), 18); setTimeout("map.ShowInfoBox(ppBldg3)", 500); break
case '4': map.SetCenterAndZoom(new VELatLong(38.0410951799,-84.5059361446), 18); setTimeout("map.ShowInfoBox(ppBldg4)", 500); break
case '5': map.SetCenterAndZoom(new VELatLong(38.0407007420, -84.5056664354), 18); setTimeout("map.ShowInfoBox(ppBldg5)", 500); break
case '6': map.SetCenterAndZoom(new VELatLong(38.0416972996,-84.5029658771), 18); setTimeout("map.ShowInfoBox(ppBldg6)", 500); break
case '7': map.SetCenterAndZoom(new VELatLong(38.0410520128,-84.5028921977), 18); setTimeout("map.ShowInfoBox(ppBldg7)", 500); break
case '8': map.SetCenterAndZoom(new VELatLong(38.0411774039,-84.5024955961), 18); setTimeout("map.ShowInfoBox(ppBldg8)", 500); break
case '9': map.SetCenterAndZoom(new VELatLong(38.0414917343,-84.5020760095), 18); setTimeout("map.ShowInfoBox(ppBldg9)", 500); break
case '10': map.SetCenterAndZoom(new VELatLong(38.0422569074,-84.5022066388), 18); setTimeout("map.ShowInfoBox(ppBldg10)", 500); break
case '11': map.SetCenterAndZoom(new VELatLong(38.0417444088,-84.5016560640), 18); setTimeout("map.ShowInfoBox(ppBldg11)", 500); break
case '12': map.SetCenterAndZoom(new VELatLong(38.0410174263,-84.5018537736), 18); setTimeout("map.ShowInfoBox(ppBldg12)", 500); break
case '14': map.SetCenterAndZoom(new VELatLong(38.0352140727,-84.5027285112), 18); setTimeout("map.ShowInfoBox(ppBldg14)", 500); break
case '15': map.SetCenterAndZoom(new VELatLong(38.0365790903,-84.5011009425), 18); setTimeout("map.ShowInfoBox(ppBldg15)", 500); break
case '17': map.SetCenterAndZoom(new VELatLong(38.0407987977,-84.5080748449), 18); setTimeout("map.ShowInfoBox(ppBldg17)", 500); break
case '19': map.SetCenterAndZoom(new VELatLong(38.0393605715,-84.5005190966), 18); setTimeout("map.ShowInfoBox(ppBldg19)", 500); break
case '20': map.SetCenterAndZoom(new VELatLong(38.0389458944,-84.5078712080), 18); setTimeout("map.ShowInfoBox(ppBldg20)", 500); break
case '21': map.SetCenterAndZoom(new VELatLong(38.0371273202,-84.5011956702), 18); setTimeout("map.ShowInfoBox(ppBldg21)", 500); break
case '22': map.SetCenterAndZoom(new VELatLong(38.0369678507,-84.5020586344), 18); setTimeout("map.ShowInfoBox(ppBldg22)", 500); break
case '23': map.SetCenterAndZoom(new VELatLong(38.0377002757,-84.4993240538), 18); setTimeout("map.ShowInfoBox(ppBldg23)", 500); break
case '24': map.SetCenterAndZoom(new VELatLong(38.0376341451,-84.5033081680), 18); setTimeout("map.ShowInfoBox(ppBldg24)", 500); break
case '25': map.SetCenterAndZoom(new VELatLong(38.0380584153,-84.5038500749), 18); setTimeout("map.ShowInfoBox(ppBldg25)", 500); break
case '26': map.SetCenterAndZoom(new VELatLong(38.0394576667,-84.5028619875), 18); setTimeout("map.ShowInfoBox(ppBldg26)", 500); break
case '27': map.SetCenterAndZoom(new VELatLong(38.0386450673,-84.5042121657), 18); setTimeout("map.ShowInfoBox(ppBldg27)", 500); break
case '28': map.SetCenterAndZoom(new VELatLong(38.0394013946,-84.5040966491), 18); setTimeout("map.ShowInfoBox(ppBldg28)", 500); break
case '29': map.SetCenterAndZoom(new VELatLong(38.0406678710,-84.5034687975), 18); setTimeout("map.ShowInfoBox(ppBldg29)", 500); break
case '30': map.SetCenterAndZoom(new VELatLong(38.0401635223,-84.5036188564), 18); setTimeout("map.ShowInfoBox(ppBldg30)", 500); break
case '31': map.SetCenterAndZoom(new VELatLong(38.0400600988,-84.5041474868), 18); setTimeout("map.ShowInfoBox(ppBldg31)", 500); break
case '32': map.SetCenterAndZoom(new VELatLong(38.0388845853,-84.5048834767), 18); setTimeout("map.ShowInfoBox(ppBldg32)", 500); break
case '33': map.SetCenterAndZoom(new VELatLong(38.0385559125,-84.5054093223), 18); setTimeout("map.ShowInfoBox(ppBldg33)", 500); break
case '34': map.SetCenterAndZoom(new VELatLong(38.0379975757,-84.5065039631), 18); setTimeout("map.ShowInfoBox(ppBldg34)", 500); break
case '35': map.SetCenterAndZoom(new VELatLong(38.0380067609,-84.5046737286), 18); setTimeout("map.ShowInfoBox(ppBldg35)", 500); break
case '38': map.SetCenterAndZoom(new VELatLong(38.0371017300,-84.5042645974), 18); setTimeout("map.ShowInfoBox(ppBldg38)", 500); break
case '39': map.SetCenterAndZoom(new VELatLong(38.0368136309,-84.5035097198), 18); setTimeout("map.ShowInfoBox(ppBldg39)", 500); break
case '40': map.SetCenterAndZoom(new VELatLong(38.0361683911,-84.5030576041), 18); setTimeout("map.ShowInfoBox(ppBldg40)", 500); break
case '41': map.SetCenterAndZoom(new VELatLong(38.0365593188,-84.5040791059), 18); setTimeout("map.ShowInfoBox(ppBldg41)", 500); break
case '42': map.SetCenterAndZoom(new VELatLong(38.0368193111,-84.5045744215), 18); setTimeout("map.ShowInfoBox(ppBldg42)", 500); break
case '43': map.SetCenterAndZoom(new VELatLong(38.0386342400,-84.5074842884), 18); setTimeout("map.ShowInfoBox(ppBldg43)", 500); break
case '44': map.SetCenterAndZoom(new VELatLong(38.0360912994,-84.5047620590), 18); setTimeout("map.ShowInfoBox(ppBldg44)", 500); break
case '45': map.SetCenterAndZoom(new VELatLong(38.0364407211,-84.5051544258), 18); setTimeout("map.ShowInfoBox(ppBldg45)", 500); break
case '46': map.SetCenterAndZoom(new VELatLong(38.0374037738,-84.5057134783), 18); setTimeout("map.ShowInfoBox(ppBldg46)", 500); break
case '47': map.SetCenterAndZoom(new VELatLong(38.0375674632,-84.5068611955), 18); setTimeout("map.ShowInfoBox(ppBldg47)", 500); break
case '48': map.SetCenterAndZoom(new VELatLong(38.0365533950,-84.5072233019), 18); setTimeout("map.ShowInfoBox(ppBldg48)", 500); break
case '49': map.SetCenterAndZoom(new VELatLong(38.0368737827,-84.5064361943), 18); setTimeout("map.ShowInfoBox(ppBldg49)", 500); break
case '50': map.SetCenterAndZoom(new VELatLong(38.0363297949,-84.5064192261), 18); setTimeout("map.ShowInfoBox(ppBldg50)", 500); break
case '51': map.SetCenterAndZoom(new VELatLong(38.0361568474,-84.5069679871), 18); setTimeout("map.ShowInfoBox(ppBldg51)", 500); break
case '52': map.SetCenterAndZoom(new VELatLong(38.0358917009,-84.5067592292), 18); setTimeout("map.ShowInfoBox(ppBldg52)", 500); break
case '53': map.SetCenterAndZoom(new VELatLong(38.0353581797,-84.5063514766), 18); setTimeout("map.ShowInfoBox(ppBldg53)", 500); break
case '54': map.SetCenterAndZoom(new VELatLong(38.0357547216,-84.5056716104), 18); setTimeout("map.ShowInfoBox(ppBldg54)", 500); break
case '55': map.SetCenterAndZoom(new VELatLong(38.0356533241,-84.5038790318), 18); setTimeout("map.ShowInfoBox(ppBldg55)", 500); break
case '56': map.SetCenterAndZoom(new VELatLong(38.0350558044,-84.5052116573), 18); setTimeout("map.ShowInfoBox(ppBldg56)", 500); break
case '57': map.SetCenterAndZoom(new VELatLong(38.0349944743,-84.5048218413), 18); setTimeout("map.ShowInfoBox(ppBldg57)", 500); break
case '58': map.SetCenterAndZoom(new VELatLong(38.0346817101,-84.5047912741), 18); setTimeout("map.ShowInfoBox(ppBldg58)", 500); break
case '59': map.SetCenterAndZoom(new VELatLong(38.0347028680,-84.5052404059), 18); setTimeout("map.ShowInfoBox(ppBldg59)", 500); break
case '60': map.SetCenterAndZoom(new VELatLong(38.0350169717,-84.5056677697), 18); setTimeout("map.ShowInfoBox(ppBldg60)", 500); break
case '61': map.SetCenterAndZoom(new VELatLong(38.0343242033,-84.5062671910), 18); setTimeout("map.ShowInfoBox(ppBldg61)", 500); break
case '61': map.SetCenterAndZoom(new VELatLong(38.0343825002,-84.5061883204), 18); setTimeout("map.ShowInfoBox(ppBldg61)", 500); break
case '61': map.SetCenterAndZoom(new VELatLong(38.0344788131,-84.5060436902), 18); setTimeout("map.ShowInfoBox(ppBldg61)", 500); break
case '62': map.SetCenterAndZoom(new VELatLong(38.0345174987,-84.5063817528), 18); setTimeout("map.ShowInfoBox(ppBldg62)", 500); break
case '62': map.SetCenterAndZoom(new VELatLong(38.0345560073,-84.5064781006), 18); setTimeout("map.ShowInfoBox(ppBldg62)", 500); break
case '62': map.SetCenterAndZoom(new VELatLong(38.0347462449,-84.5062240003), 18); setTimeout("map.ShowInfoBox(ppBldg62)", 500); break
case '64': map.SetCenterAndZoom(new VELatLong(38.0349567145,-84.5072292685), 18); setTimeout("map.ShowInfoBox(ppBldg64)", 500); break
case '65': map.SetCenterAndZoom(new VELatLong(38.0339953314,-84.5066406696), 18); setTimeout("map.ShowInfoBox(ppBldg65)", 500); break
case '66': map.SetCenterAndZoom(new VELatLong(38.0337574065,-84.5067192691), 18); setTimeout("map.ShowInfoBox(ppBldg66)", 500); break
case '67': map.SetCenterAndZoom(new VELatLong(38.0362127601,-84.5014444262), 18); setTimeout("map.ShowInfoBox(ppBldg67)", 500); break
case '68': map.SetCenterAndZoom(new VELatLong(38.0358692340,-84.5018814545), 18); setTimeout("map.ShowInfoBox(ppBldg68)", 500); break
case '69': map.SetCenterAndZoom(new VELatLong(38.0355640478,-84.5022287549), 18); setTimeout("map.ShowInfoBox(ppBldg69)", 500); break
case '70': map.SetCenterAndZoom(new VELatLong(38.0336326973,-84.5048752127), 18); setTimeout("map.ShowInfoBox(ppBldg70)", 500); break
case '71': map.SetCenterAndZoom(new VELatLong(38.0332496086,-84.5042903023), 18); setTimeout("map.ShowInfoBox(ppBldg71)", 500); break
case '72': map.SetCenterAndZoom(new VELatLong(38.0331514947,-84.5051946831), 18); setTimeout("map.ShowInfoBox(ppBldg72)", 500); break
case '73': map.SetCenterAndZoom(new VELatLong(38.0327612758,-84.5058084735), 18); setTimeout("map.ShowInfoBox(ppBldg73)", 500); break
case '75': map.SetCenterAndZoom(new VELatLong(38.0314016277,-84.5046877610), 18); setTimeout("map.ShowInfoBox(ppBldg75)", 500); break
case '76': map.SetCenterAndZoom(new VELatLong(38.0312694128,-84.5053896641), 18); setTimeout("map.ShowInfoBox(ppBldg76)", 500); break
case '78': map.SetCenterAndZoom(new VELatLong(38.0307206474,-84.5050351490), 18); setTimeout("map.ShowInfoBox(ppBldg78)", 500); break
case '82': map.SetCenterAndZoom(new VELatLong(38.0331354948,-84.5070688345), 18); setTimeout("map.ShowInfoBox(ppBldg82)", 500); break
case '85': map.SetCenterAndZoom(new VELatLong(38.0299013742,-84.5077483989), 18); setTimeout("map.ShowInfoBox(ppBldg85)", 500); break
case '86': map.SetCenterAndZoom(new VELatLong(38.0301182765,-84.5053162487), 18); setTimeout("map.ShowInfoBox(ppBldg86)", 500); break
case '87': map.SetCenterAndZoom(new VELatLong(38.0196629531,-84.5022441688), 18); setTimeout("map.ShowInfoBox(ppBldg87)", 500); break
case '88': map.SetCenterAndZoom(new VELatLong(38.0216038040,-84.5024110236), 18); setTimeout("map.ShowInfoBox(ppBldg88)", 500); break
case '89': map.SetCenterAndZoom(new VELatLong(38.0289632543,-84.5057937159), 18); setTimeout("map.ShowInfoBox(ppBldg89)", 500); break
case '91': map.SetCenterAndZoom(new VELatLong(38.0287338634,-84.5092050336), 18); setTimeout("map.ShowInfoBox(ppBldg91)", 500); break
case '92': map.SetCenterAndZoom(new VELatLong(38.0286130037,-84.5081855023), 18); setTimeout("map.ShowInfoBox(ppBldg92)", 500); break
case '93': map.SetCenterAndZoom(new VELatLong(38.0321301232,-84.5066933629), 18); setTimeout("map.ShowInfoBox(ppBldg93)", 500); break
case '94': map.SetCenterAndZoom(new VELatLong(38.0272118720,-84.5104391252), 18); setTimeout("map.ShowInfoBox(ppBldg94)", 500); break
case '96': map.SetCenterAndZoom(new VELatLong(38.0317668478,-84.5059104052), 18); setTimeout("map.ShowInfoBox(ppBldg96)", 500); break
case '97': map.SetCenterAndZoom(new VELatLong(38.0247961026,-84.5080360704), 18); setTimeout("map.ShowInfoBox(ppBldg97)", 500); break
case '98': map.SetCenterAndZoom(new VELatLong(38.0320163765,-84.5055721366), 18); setTimeout("map.ShowInfoBox(ppBldg98)", 500); break
case '99': map.SetCenterAndZoom(new VELatLong(38.0251062169,-84.5108179332), 18); setTimeout("map.ShowInfoBox(ppBldg99)", 500); break
case '101': map.SetCenterAndZoom(new VELatLong(38.0419959588,-84.5087510908), 18); setTimeout("map.ShowInfoBox(ppBldg101)", 500); break
case '102': map.SetCenterAndZoom(new VELatLong(38.0423199366,-84.5085636651), 18); setTimeout("map.ShowInfoBox(ppBldg102)", 500); break
case '103': map.SetCenterAndZoom(new VELatLong(38.0417133724,-84.5091915861), 18); setTimeout("map.ShowInfoBox(ppBldg103)", 500); break
case '105': map.SetCenterAndZoom(new VELatLong(38.0258262574,-84.5120315197), 18); setTimeout("map.ShowInfoBox(ppBldg105)", 500); break
case '106': map.SetCenterAndZoom(new VELatLong(38.0262705719,-84.5129962969), 18); setTimeout("map.ShowInfoBox(ppBldg106)", 500); break
case '107': map.SetCenterAndZoom(new VELatLong(38.0346767042,-84.5031980457), 18); setTimeout("map.ShowInfoBox(ppBldg107)", 500); break
case '108': map.SetCenterAndZoom(new VELatLong(38.0370312411,-84.5055101614), 18); setTimeout("map.ShowInfoBox(ppBldg108)", 500); break
case '110': map.SetCenterAndZoom(new VELatLong(38.0272774761,-84.4994371581), 18); setTimeout("map.ShowInfoBox(ppBldg110)", 500); break
case '111': map.SetCenterAndZoom(new VELatLong(38.0325962233,-84.5042426436), 18); setTimeout("map.ShowInfoBox(ppBldg111)", 500); break
case '112': map.SetCenterAndZoom(new VELatLong(38.0334262786,-84.5032218783), 18); setTimeout("map.ShowInfoBox(ppBldg112)", 500); break
case '113': map.SetCenterAndZoom(new VELatLong(38.0270736918,-84.5000460026), 18); setTimeout("map.ShowInfoBox(ppBldg113)", 500); break
case '114': map.SetCenterAndZoom(new VELatLong(38.0291676376,-84.4985016783), 18); setTimeout("map.ShowInfoBox(ppBldg114)", 500); break
case '115': map.SetCenterAndZoom(new VELatLong(38.0315466157,-84.5006063596), 18); setTimeout("map.ShowInfoBox(ppBldg115)", 500); break
case '118': map.SetCenterAndZoom(new VELatLong(38.0306378037,-84.5019182718), 18); setTimeout("map.ShowInfoBox(ppBldg118)", 500); break
case '119': map.SetCenterAndZoom(new VELatLong(38.0374015412,-84.4998920575), 18); setTimeout("map.ShowInfoBox(ppBldg119)", 500); break
case '121': map.SetCenterAndZoom(new VELatLong(38.0351235628,-84.4993755752), 18); setTimeout("map.ShowInfoBox(ppBldg121)", 500); break
case '122': map.SetCenterAndZoom(new VELatLong(38.0344247069,-84.5008203386), 18); setTimeout("map.ShowInfoBox(ppBldg122)", 500); break
case '124': map.SetCenterAndZoom(new VELatLong(38.0353249328,-84.5018583190), 18); setTimeout("map.ShowInfoBox(ppBldg124)", 500); break
case '125': map.SetCenterAndZoom(new VELatLong(38.0351943130,-84.5015323243), 18); setTimeout("map.ShowInfoBox(ppBldg125)", 500); break
case '126': map.SetCenterAndZoom(new VELatLong(38.0352171510,-84.5010662130), 18); setTimeout("map.ShowInfoBox(ppBldg126)", 500); break
case '127': map.SetCenterAndZoom(new VELatLong(38.0355371173,-84.5008659648), 18); setTimeout("map.ShowInfoBox(ppBldg127)", 500); break
case '128': map.SetCenterAndZoom(new VELatLong(38.0357485125,-84.5011098547), 18); setTimeout("map.ShowInfoBox(ppBldg128)", 500); break
case '129': map.SetCenterAndZoom(new VELatLong(38.0356209402,-84.5014352444), 18); setTimeout("map.ShowInfoBox(ppBldg129)", 500); break
case '130': map.SetCenterAndZoom(new VELatLong(38.0285921841,-84.4993653343), 18); setTimeout("map.ShowInfoBox(ppBldg130)", 500); break
case '131': map.SetCenterAndZoom(new VELatLong(38.0291543889,-84.5000012623), 18); setTimeout("map.ShowInfoBox(ppBldg131)", 500); break
case '132': map.SetCenterAndZoom(new VELatLong(38.0300340087,-84.4999079466), 18); setTimeout("map.ShowInfoBox(ppBldg132)", 500); break
case '133': map.SetCenterAndZoom(new VELatLong(38.0309354560,-84.5004555555), 18); setTimeout("map.ShowInfoBox(ppBldg133)", 500); break
case '134': map.SetCenterAndZoom(new VELatLong(38.0315429485,-84.4995144533), 18); setTimeout("map.ShowInfoBox(ppBldg134)", 500); break
case '135': map.SetCenterAndZoom(new VELatLong(38.0307828195,-84.4987989806), 18); setTimeout("map.ShowInfoBox(ppBldg135)", 500); break
case '136': map.SetCenterAndZoom(new VELatLong(38.0297104359,-84.4988838667), 18); setTimeout("map.ShowInfoBox(ppBldg136)", 500); break
case '137': map.SetCenterAndZoom(new VELatLong(38.0312843916,-84.5031840800), 18); setTimeout("map.ShowInfoBox(ppBldg137)", 500); break
case '138': map.SetCenterAndZoom(new VELatLong(38.0309008010,-84.5027487933), 18); setTimeout("map.ShowInfoBox(ppBldg138)", 500); break
case '140': map.SetCenterAndZoom(new VELatLong(38.0309770411,-84.5016780479), 18); setTimeout("map.ShowInfoBox(ppBldg140)", 500); break
case '142': map.SetCenterAndZoom(new VELatLong(38.0317407534,-84.5025406757), 18); setTimeout("map.ShowInfoBox(ppBldg142)", 500); break
case '143': map.SetCenterAndZoom(new VELatLong(38.0300661285,-84.5035648564), 18); setTimeout("map.ShowInfoBox(ppBldg143)", 500); break
case '144': map.SetCenterAndZoom(new VELatLong(38.0295860731,-84.5036434008), 18); setTimeout("map.ShowInfoBox(ppBldg144)", 500); break
case '145': map.SetCenterAndZoom(new VELatLong(38.0295614176,-84.5030075372), 18); setTimeout("map.ShowInfoBox(ppBldg145)", 500); break
case '146': map.SetCenterAndZoom(new VELatLong(38.0290914120,-84.5030785760), 18); setTimeout("map.ShowInfoBox(ppBldg146)", 500); break
case '147': map.SetCenterAndZoom(new VELatLong(38.0287015102,-84.5024361971), 18); setTimeout("map.ShowInfoBox(ppBldg147)", 500); break
case '148': map.SetCenterAndZoom(new VELatLong(38.0290341878,-84.5017635597), 18); setTimeout("map.ShowInfoBox(ppBldg148)", 500); break
case '149': map.SetCenterAndZoom(new VELatLong(38.0295099120,-84.5017680619), 18); setTimeout("map.ShowInfoBox(ppBldg149)", 500); break
case '150': map.SetCenterAndZoom(new VELatLong(38.0294740899,-84.5011393351), 18); setTimeout("map.ShowInfoBox(ppBldg150)", 500); break
case '151': map.SetCenterAndZoom(new VELatLong(38.0299580049,-84.5011348815), 18); setTimeout("map.ShowInfoBox(ppBldg151)", 500); break
case '152': map.SetCenterAndZoom(new VELatLong(38.0300038294,-84.5017491780), 18); setTimeout("map.ShowInfoBox(ppBldg152)", 500); break
case '153': map.SetCenterAndZoom(new VELatLong(38.0300559748,-84.5029609276), 18); setTimeout("map.ShowInfoBox(ppBldg153)", 500); break
case '154': map.SetCenterAndZoom(new VELatLong(38.0283650242,-84.5074479524), 18); setTimeout("map.ShowInfoBox(ppBldg154)", 500); break
case '155': map.SetCenterAndZoom(new VELatLong(38.0286436071,-84.5076964477), 18); setTimeout("map.ShowInfoBox(ppBldg155)", 500); break
case '156': map.SetCenterAndZoom(new VELatLong(38.0286088705,-84.5075377166), 18); setTimeout("map.ShowInfoBox(ppBldg156)", 500); break
case '157': map.SetCenterAndZoom(new VELatLong(38.0281510482,-84.5073802852), 18); setTimeout("map.ShowInfoBox(ppBldg157)", 500); break
case '158': map.SetCenterAndZoom(new VELatLong(38.0281883532,-84.5075297032), 18); setTimeout("map.ShowInfoBox(ppBldg158)", 500); break
case '159': map.SetCenterAndZoom(new VELatLong(38.0282177663,-84.5076796907), 18); setTimeout("map.ShowInfoBox(ppBldg159)", 500); break
case '160': map.SetCenterAndZoom(new VELatLong(38.0282514601,-84.5078343078), 18); setTimeout("map.ShowInfoBox(ppBldg160)", 500); break
case '161': map.SetCenterAndZoom(new VELatLong(38.0281177956,-84.5072268147), 18); setTimeout("map.ShowInfoBox(ppBldg161)", 500); break
case '162': map.SetCenterAndZoom(new VELatLong(38.0280855623,-84.5070802446), 18); setTimeout("map.ShowInfoBox(ppBldg162)", 500); break
case '163': map.SetCenterAndZoom(new VELatLong(38.0285753058,-84.5073881616), 18); setTimeout("map.ShowInfoBox(ppBldg163)", 500); break
case '164': map.SetCenterAndZoom(new VELatLong(38.0284508090,-84.5070010564), 18); setTimeout("map.ShowInfoBox(ppBldg164)", 500); break
case '177': map.SetCenterAndZoom(new VELatLong(38.0207901424,-84.5018329742), 18); setTimeout("map.ShowInfoBox(ppBldg177)", 500); break
case '182': map.SetCenterAndZoom(new VELatLong(38.0203173260,-84.5027911417), 18); setTimeout("map.ShowInfoBox(ppBldg182)", 500); break
case '183': map.SetCenterAndZoom(new VELatLong(38.0198413942,-84.5030245945), 18); setTimeout("map.ShowInfoBox(ppBldg183)", 500); break
case '184': map.SetCenterAndZoom(new VELatLong(38.0204100605,-84.5018770239), 18); setTimeout("map.ShowInfoBox(ppBldg184)", 500); break
case '185': map.SetCenterAndZoom(new VELatLong(38.0208825352,-84.5016573700), 18); setTimeout("map.ShowInfoBox(ppBldg185)", 500); break
case '189': map.SetCenterAndZoom(new VELatLong(38.0197219238,-84.5100165427), 18); setTimeout("map.ShowInfoBox(ppBldg189)", 500); break
case '190': map.SetCenterAndZoom(new VELatLong(38.0190923251,-84.5094238084), 18); setTimeout("map.ShowInfoBox(ppBldg190)", 500); break
case '191': map.SetCenterAndZoom(new VELatLong(38.0179507930,-84.5096496527), 18); setTimeout("map.ShowInfoBox(ppBldg191)", 500); break
case '192': map.SetCenterAndZoom(new VELatLong(38.0165719519,-84.5105402715), 18); setTimeout("map.ShowInfoBox(ppBldg192)", 500); break
case '193': map.SetCenterAndZoom(new VELatLong(38.0174361632,-84.5104807256), 18); setTimeout("map.ShowInfoBox(ppBldg193)", 500); break
case '194': map.SetCenterAndZoom(new VELatLong(38.0185798323,-84.5102481359), 18); setTimeout("map.ShowInfoBox(ppBldg194)", 500); break
case '197': map.SetCenterAndZoom(new VELatLong(38.0273627979,-84.5062456340), 18); setTimeout("map.ShowInfoBox(ppBldg197)", 500); break
case '198': map.SetCenterAndZoom(new VELatLong(38.0340210232,-84.5038792520), 18); setTimeout("map.ShowInfoBox(ppBldg198)", 500); break
case '199': map.SetCenterAndZoom(new VELatLong(38.0335900583,-84.5074794863), 18); setTimeout("map.ShowInfoBox(ppBldg199)", 500); break
case '200': map.SetCenterAndZoom(new VELatLong(38.0319706109,-84.5086633579), 18); setTimeout("map.ShowInfoBox(ppBldg200)", 500); break
case '202': map.SetCenterAndZoom(new VELatLong(38.0413425604,-84.5051797384), 18); setTimeout("map.ShowInfoBox(ppBldg202)", 500); break
case '204': map.SetCenterAndZoom(new VELatLong(38.0413669135,-84.5067221157), 18); setTimeout("map.ShowInfoBox(ppBldg204)", 500); break
case '207': map.SetCenterAndZoom(new VELatLong(38.0419370348,-84.5080651601), 18); setTimeout("map.ShowInfoBox(ppBldg207)", 500); break
case '209': map.SetCenterAndZoom(new VELatLong(38.0337327515,-84.5046778076), 18); setTimeout("map.ShowInfoBox(ppBldg209)", 500); break
case '210': map.SetCenterAndZoom(new VELatLong(38.0418694741,-84.5082125284), 18); setTimeout("map.ShowInfoBox(ppBldg210)", 500); break
case '211': map.SetCenterAndZoom(new VELatLong(38.0362088072,-84.5035734953), 18); setTimeout("map.ShowInfoBox(ppBldg211)", 500); break
case '212': map.SetCenterAndZoom(new VELatLong(38.0285723333,-84.5040347423), 18); setTimeout("map.ShowInfoBox(ppBldg212)", 500); break
case '213': map.SetCenterAndZoom(new VELatLong(38.0267306412,-84.5029087996), 18); setTimeout("map.ShowInfoBox(ppBldg213)", 500); break
case '214': map.SetCenterAndZoom(new VELatLong(38.0357671696,-84.5064660246), 18); setTimeout("map.ShowInfoBox(ppBldg214)", 500); break
case '215': map.SetCenterAndZoom(new VELatLong(38.0279879012,-84.5087617670), 18); setTimeout("map.ShowInfoBox(ppBldg215)", 500); break
case '216': map.SetCenterAndZoom(new VELatLong(38.0344636262,-84.5077019540), 18); setTimeout("map.ShowInfoBox(ppBldg216)", 500); break
case '219': map.SetCenterAndZoom(new VELatLong(38.0283564894,-84.5045974564), 18); setTimeout("map.ShowInfoBox(ppBldg219)", 500); break
case '220': map.SetCenterAndZoom(new VELatLong(38.0276928656,-84.5039587573), 18); setTimeout("map.ShowInfoBox(ppBldg220)", 500); break
case '222': map.SetCenterAndZoom(new VELatLong(38.0227499755,-84.5051601074), 18); setTimeout("map.ShowInfoBox(ppBldg222)", 500); break
case '223': map.SetCenterAndZoom(new VELatLong(38.0329415651,-84.5080755444), 18); setTimeout("map.ShowInfoBox(ppBldg223)", 500); break
case '224': map.SetCenterAndZoom(new VELatLong(38.0372532198,-84.5029432201), 18); setTimeout("map.ShowInfoBox(ppBldg224)", 500); break
case '225': map.SetCenterAndZoom(new VELatLong(38.0339537007,-84.5059287530), 18); setTimeout("map.ShowInfoBox(ppBldg225)", 500); break
case '227': map.SetCenterAndZoom(new VELatLong(38.0272525097,-84.5030608339), 18); setTimeout("map.ShowInfoBox(ppBldg227)", 500); break
case '229': map.SetCenterAndZoom(new VELatLong(38.0199593762,-84.5020456218), 18); setTimeout("map.ShowInfoBox(ppBldg229)", 500); break
case '230': map.SetCenterAndZoom(new VELatLong(38.0328741895,-84.5086209604), 18); setTimeout("map.ShowInfoBox(ppBldg230)", 500); break
case '231': map.SetCenterAndZoom(new VELatLong(38.0205571462,-84.5031514331), 18); setTimeout("map.ShowInfoBox(ppBldg231)", 500); break
case '232': map.SetCenterAndZoom(new VELatLong(38.0326054220,-84.5078093308), 18); setTimeout("map.ShowInfoBox(ppBldg232)", 500); break
case '235': map.SetCenterAndZoom(new VELatLong(38.0247930816,-84.5036934310), 18); setTimeout("map.ShowInfoBox(ppBldg235)", 500); break
case '236': map.SetCenterAndZoom(new VELatLong(38.0256934547,-84.5071729316), 18); setTimeout("map.ShowInfoBox(ppBldg236)", 500); break
case '237': map.SetCenterAndZoom(new VELatLong(38.0339197035,-84.5048519773), 18); setTimeout("map.ShowInfoBox(ppBldg237)", 500); break
case '238': map.SetCenterAndZoom(new VELatLong(38.0367545199,-84.4990150062), 18); setTimeout("map.ShowInfoBox(ppBldg238)", 500); break
case '240': map.SetCenterAndZoom(new VELatLong(38.0337428168,-84.4977121715), 18); setTimeout("map.ShowInfoBox(ppBldg240)", 500); break
case '241': map.SetCenterAndZoom(new VELatLong(38.0377993573,-84.5012086325), 18); setTimeout("map.ShowInfoBox(ppBldg241)", 500); break
case '242': map.SetCenterAndZoom(new VELatLong(38.0407744410,-84.5006719343), 18); setTimeout("map.ShowInfoBox(ppBldg242)", 500); break
case '243': map.SetCenterAndZoom(new VELatLong(38.0182686179,-84.5069960740), 18); setTimeout("map.ShowInfoBox(ppBldg243)", 500); break
case '244': map.SetCenterAndZoom(new VELatLong(38.0184092129,-84.5073794284), 18); setTimeout("map.ShowInfoBox(ppBldg244)", 500); break
case '245': map.SetCenterAndZoom(new VELatLong(38.0184692247,-84.5078197191), 18); setTimeout("map.ShowInfoBox(ppBldg245)", 500); break
case '246': map.SetCenterAndZoom(new VELatLong(38.0183468494,-84.5082479045), 18); setTimeout("map.ShowInfoBox(ppBldg246)", 500); break
case '247': map.SetCenterAndZoom(new VELatLong(38.0180716618,-84.5085355575), 18); setTimeout("map.ShowInfoBox(ppBldg247)", 500); break
case '248': map.SetCenterAndZoom(new VELatLong(38.0177212977,-84.5086109266), 18); setTimeout("map.ShowInfoBox(ppBldg248)", 500); break
case '249': map.SetCenterAndZoom(new VELatLong(38.0173922865,-84.5085728783), 18); setTimeout("map.ShowInfoBox(ppBldg249)", 500); break
case '250': map.SetCenterAndZoom(new VELatLong(38.0167274399,-84.5084978248), 18); setTimeout("map.ShowInfoBox(ppBldg250)", 500); break
case '251': map.SetCenterAndZoom(new VELatLong(38.0163952105,-84.5084603063), 18); setTimeout("map.ShowInfoBox(ppBldg251)", 500); break
case '252': map.SetCenterAndZoom(new VELatLong(38.0160427054,-84.5085779632), 18); setTimeout("map.ShowInfoBox(ppBldg252)", 500); break
case '253': map.SetCenterAndZoom(new VELatLong(38.0158335150,-84.5089561348), 18); setTimeout("map.ShowInfoBox(ppBldg253)", 500); break
case '254': map.SetCenterAndZoom(new VELatLong(38.0158651679,-84.5094152620), 18); setTimeout("map.ShowInfoBox(ppBldg254)", 500); break
case '255': map.SetCenterAndZoom(new VELatLong(38.0153907646,-84.5094615707), 18); setTimeout("map.ShowInfoBox(ppBldg255)", 500); break
case '256': map.SetCenterAndZoom(new VELatLong(38.0152518341,-84.5090813760), 18); setTimeout("map.ShowInfoBox(ppBldg256)", 500); break
case '257': map.SetCenterAndZoom(new VELatLong(38.0151903271,-84.5086353191), 18); setTimeout("map.ShowInfoBox(ppBldg257)", 500); break
case '258': map.SetCenterAndZoom(new VELatLong(38.0153149670,-84.5082162742), 18); setTimeout("map.ShowInfoBox(ppBldg258)", 500); break
case '259': map.SetCenterAndZoom(new VELatLong(38.0155862157,-84.5079216220), 18); setTimeout("map.ShowInfoBox(ppBldg259)", 500); break
case '260': map.SetCenterAndZoom(new VELatLong(38.0159387537,-84.5078446813), 18); setTimeout("map.ShowInfoBox(ppBldg260)", 500); break
case '261': map.SetCenterAndZoom(new VELatLong(38.0162688831,-84.5078807320), 18); setTimeout("map.ShowInfoBox(ppBldg261)", 500); break
case '262': map.SetCenterAndZoom(new VELatLong(38.0165993857,-84.5079183980), 18); setTimeout("map.ShowInfoBox(ppBldg262)", 500); break
case '263': map.SetCenterAndZoom(new VELatLong(38.0169332164,-84.5079566307), 18); setTimeout("map.ShowInfoBox(ppBldg263)", 500); break
case '264': map.SetCenterAndZoom(new VELatLong(38.0172681564,-84.5079942633), 18); setTimeout("map.ShowInfoBox(ppBldg264)", 500); break
case '265': map.SetCenterAndZoom(new VELatLong(38.0176146781,-84.5078761326), 18); setTimeout("map.ShowInfoBox(ppBldg265)", 500); break
case '266': map.SetCenterAndZoom(new VELatLong(38.0178258765,-84.5075013396), 18); setTimeout("map.ShowInfoBox(ppBldg266)", 500); break
case '267': map.SetCenterAndZoom(new VELatLong(38.0177933194,-84.5070407261), 18); setTimeout("map.ShowInfoBox(ppBldg267)", 500); break
case '268': map.SetCenterAndZoom(new VELatLong(38.0170229837,-84.5085153514), 18); setTimeout("map.ShowInfoBox(ppBldg268)", 500); break
case '269': map.SetCenterAndZoom(new VELatLong(38.0197749095,-84.5014664411), 18); setTimeout("map.ShowInfoBox(ppBldg269)", 500); break
case '272': map.SetCenterAndZoom(new VELatLong(38.0240985338,-84.5053390765), 18); setTimeout("map.ShowInfoBox(ppBldg272)", 500); break
case '274': map.SetCenterAndZoom(new VELatLong(38.0253659688,-84.5037812388), 18); setTimeout("map.ShowInfoBox(ppBldg274)", 500); break
case '275': map.SetCenterAndZoom(new VELatLong(38.0205346357,-84.5094025901), 18); setTimeout("map.ShowInfoBox(ppBldg275)", 500); break
case '276': map.SetCenterAndZoom(new VELatLong(38.0268349011,-84.5096251543), 18); setTimeout("map.ShowInfoBox(ppBldg276)", 500); break
case '277': map.SetCenterAndZoom(new VELatLong(38.0269563152,-84.5006239434), 18); setTimeout("map.ShowInfoBox(ppBldg277)", 500); break
case '278': map.SetCenterAndZoom(new VELatLong(38.0202256345,-84.5011795446), 18); setTimeout("map.ShowInfoBox(ppBldg278)", 500); break
case '279': map.SetCenterAndZoom(new VELatLong(38.0196397714,-84.5009949931), 18); setTimeout("map.ShowInfoBox(ppBldg279)", 500); break
case '281': map.SetCenterAndZoom(new VELatLong(38.0371968044,-84.5052329317), 18); setTimeout("map.ShowInfoBox(ppBldg281)", 500); break
case '282': map.SetCenterAndZoom(new VELatLong(38.0349247804,-84.5030820818), 18); setTimeout("map.ShowInfoBox(ppBldg282)", 500); break
case '283': map.SetCenterAndZoom(new VELatLong(38.0279365376,-84.4987989514), 18); setTimeout("map.ShowInfoBox(ppBldg283)", 500); break
case '284': map.SetCenterAndZoom(new VELatLong(38.0336137229,-84.5080718674), 18); setTimeout("map.ShowInfoBox(ppBldg284)", 500); break
case '285': map.SetCenterAndZoom(new VELatLong(38.0219500283,-84.5033724585), 18); setTimeout("map.ShowInfoBox(ppBldg285)", 500); break
case '286': map.SetCenterAndZoom(new VELatLong(38.0367621273,-84.5051345038), 18); setTimeout("map.ShowInfoBox(ppBldg286)", 500); break
case '287': map.SetCenterAndZoom(new VELatLong(38.0202918075,-84.5014757393), 18); setTimeout("map.ShowInfoBox(ppBldg287)", 500); break
case '288': map.SetCenterAndZoom(new VELatLong(38.0202749103,-84.5008592358), 18); setTimeout("map.ShowInfoBox(ppBldg288)", 500); break
case '289': map.SetCenterAndZoom(new VELatLong(38.0199211489,-84.5007779554), 18); setTimeout("map.ShowInfoBox(ppBldg289)", 500); break
case '293': map.SetCenterAndZoom(new VELatLong(38.0310744688,-84.5076421923), 18); setTimeout("map.ShowInfoBox(ppBldg293)", 500); break
case '294': map.SetCenterAndZoom(new VELatLong(38.0312092736,-84.5084571614), 18); setTimeout("map.ShowInfoBox(ppBldg294)", 500); break
case '297': map.SetCenterAndZoom(new VELatLong(38.0313086624,-84.5062778145), 18); setTimeout("map.ShowInfoBox(ppBldg297)", 500); break
case '298': map.SetCenterAndZoom(new VELatLong(38.0310111235,-84.5067140853), 18); setTimeout("map.ShowInfoBox(ppBldg298)", 500); break
case '300': map.SetCenterAndZoom(new VELatLong(38.0137237485,-84.5050884664), 18); setTimeout("map.ShowInfoBox(ppBldg300)", 500); break
case '301': map.SetCenterAndZoom(new VELatLong(38.0362544150,-84.5099084874), 18); setTimeout("map.ShowInfoBox(ppBldg301)", 500); break
case '302': map.SetCenterAndZoom(new VELatLong(38.0145096989,-84.5038998320), 18); setTimeout("map.ShowInfoBox(ppBldg302)", 500); break
case '305': map.SetCenterAndZoom(new VELatLong(38.0307187249,-84.5059395865), 18); setTimeout("map.ShowInfoBox(ppBldg305)", 500); break
//case '308': map.SetCenterAndZoom(new VELatLong(38.0315076851,-84.5067308874), 18); setTimeout("map.ShowInfoBox(ppBldg308)", 500); break
case '312': map.SetCenterAndZoom(new VELatLong(38.0264905207,-84.5086365861), 18); setTimeout("map.ShowInfoBox(ppBldg312)", 500); break
case '314': map.SetCenterAndZoom(new VELatLong(38.0401396221,-84.4980248092), 18); setTimeout("map.ShowInfoBox(ppBldg314)", 500); break
case '315': map.SetCenterAndZoom(new VELatLong(38.0410864684,-84.4990884465), 18); setTimeout("map.ShowInfoBox(ppBldg315)", 500); break
case '322': map.SetCenterAndZoom(new VELatLong(38.0338726081,-84.5003462051), 18); setTimeout("map.ShowInfoBox(ppBldg322)", 500); break
case '333': map.SetCenterAndZoom(new VELatLong(38.0366243931,-84.5080436661), 18); setTimeout("map.ShowInfoBox(ppBldg333)", 500); break
case '336': map.SetCenterAndZoom(new VELatLong(38.0356121771,-84.5084031981), 18); setTimeout("map.ShowInfoBox(ppBldg336)", 500); break
case '337': map.SetCenterAndZoom(new VELatLong(38.0356299614,-84.5086887949), 18); setTimeout("map.ShowInfoBox(ppBldg337)", 500); break
case '343': map.SetCenterAndZoom(new VELatLong(38.0408052121,-84.4988876482), 18); setTimeout("map.ShowInfoBox(ppBldg343)", 500); break
case '344': map.SetCenterAndZoom(new VELatLong(38.0405350810,-84.4985386233), 18); setTimeout("map.ShowInfoBox(ppBldg344)", 500); break
case '345': map.SetCenterAndZoom(new VELatLong(38.0409507997,-84.4989924375), 18); setTimeout("map.ShowInfoBox(ppBldg345)", 500); break
case '346': map.SetCenterAndZoom(new VELatLong(38.0360144169,-84.5091323500), 18); setTimeout("map.ShowInfoBox(ppBldg346)", 500); break
case '347': map.SetCenterAndZoom(new VELatLong(38.0366891841,-84.5083389476), 18); setTimeout("map.ShowInfoBox(ppBldg347)", 500); break
case '348': map.SetCenterAndZoom(new VELatLong(38.0367409919,-84.5085390563), 18); setTimeout("map.ShowInfoBox(ppBldg348)", 500); break
case '349': map.SetCenterAndZoom(new VELatLong(38.0365827625,-84.5093560693), 18); setTimeout("map.ShowInfoBox(ppBldg349)", 500); break
case '350': map.SetCenterAndZoom(new VELatLong(38.0364650214,-84.5094109713), 18); setTimeout("map.ShowInfoBox(ppBldg350)", 500); break
case '351': map.SetCenterAndZoom(new VELatLong(38.0364083543,-84.5089917082), 18); setTimeout("map.ShowInfoBox(ppBldg351)", 500); break
case '353': map.SetCenterAndZoom(new VELatLong(38.0299892702,-84.4980669350), 18); setTimeout("map.ShowInfoBox(ppBldg353)", 500); break
case '361': map.SetCenterAndZoom(new VELatLong(38.0346100885,-84.5003786463), 18); setTimeout("map.ShowInfoBox(ppBldg361)", 500); break
case '362': map.SetCenterAndZoom(new VELatLong(38.0347199335,-84.4999421677), 18); setTimeout("map.ShowInfoBox(ppBldg362)", 500); break
case '363': map.SetCenterAndZoom(new VELatLong(38.0344063631,-84.5001320014), 18); setTimeout("map.ShowInfoBox(ppBldg363)", 500); break
case '365': map.SetCenterAndZoom(new VELatLong(38.0341930374,-84.4999061799), 18); setTimeout("map.ShowInfoBox(ppBldg365)", 500); break
case '377': map.SetCenterAndZoom(new VELatLong(38.0366779772,-84.5004186052), 18); setTimeout("map.ShowInfoBox(ppBldg377)", 500); break
case '378': map.SetCenterAndZoom(new VELatLong(38.0366052827,-84.5003242949), 18); setTimeout("map.ShowInfoBox(ppBldg378)", 500); break
case '381': map.SetCenterAndZoom(new VELatLong(38.0327708025,-84.5115329215), 18); setTimeout("map.ShowInfoBox(ppBldg381)", 500); break
case '386': map.SetCenterAndZoom(new VELatLong(38.0326105267,-84.5110514185), 18); setTimeout("map.ShowInfoBox(ppBldg386)", 500); break
case '400': map.SetCenterAndZoom(new VELatLong(38.0366960087,-84.5087126114), 18); setTimeout("map.ShowInfoBox(ppBldg400)", 500); break
case '401': map.SetCenterAndZoom(new VELatLong(38.0367982809,-84.5092381799), 18); setTimeout("map.ShowInfoBox(ppBldg401)", 500); break
case '402': map.SetCenterAndZoom(new VELatLong(38.0350813475,-84.5058194718), 18); setTimeout("map.ShowInfoBox(ppBldg402)", 500); break
case '408': map.SetCenterAndZoom(new VELatLong(38.0366979370,-84.4999602888), 18); setTimeout("map.ShowInfoBox(ppBldg408)", 500); break
case '412': map.SetCenterAndZoom(new VELatLong(38.0348236473,-84.5000743883), 18); setTimeout("map.ShowInfoBox(ppBldg412)", 500); break
case '413': map.SetCenterAndZoom(new VELatLong(38.0178445125,-84.4998124113), 18); setTimeout("map.ShowInfoBox(ppBldg413)", 500); break
case '417': map.SetCenterAndZoom(new VELatLong(38.0359382471,-84.5076543598), 18); setTimeout("map.ShowInfoBox(ppBldg417)", 500); break
case '420': map.SetCenterAndZoom(new VELatLong(38.0365538811,-84.4986331442), 18); setTimeout("map.ShowInfoBox(ppBldg420)", 500); break
case '428': map.SetCenterAndZoom(new VELatLong(38.0331835424,-84.4983208089), 18); setTimeout("map.ShowInfoBox(ppBldg428)", 500); break
case '432': map.SetCenterAndZoom(new VELatLong(38.0405551692,-84.4988075053), 18); setTimeout("map.ShowInfoBox(ppBldg432)", 500); break
case '433': map.SetCenterAndZoom(new VELatLong(38.0368791292,-84.5005253888), 18); setTimeout("map.ShowInfoBox(ppBldg433)", 500); break
case '442': map.SetCenterAndZoom(new VELatLong(38.0360970673,-84.5076363841), 18); setTimeout("map.ShowInfoBox(ppBldg442)", 500); break
case '449': map.SetCenterAndZoom(new VELatLong(38.0270453766,-84.4995237070), 18); setTimeout("map.ShowInfoBox(ppBldg449)", 500); break
case '450': map.SetCenterAndZoom(new VELatLong(38.0175795817,-84.4997750773), 18); setTimeout("map.ShowInfoBox(ppBldg450)", 500); break
case '451': map.SetCenterAndZoom(new VELatLong(38.0174401455,-84.5003232947), 18); setTimeout("map.ShowInfoBox(ppBldg451)", 500); break
case '452': map.SetCenterAndZoom(new VELatLong(38.0173685902,-84.4999787400), 18); setTimeout("map.ShowInfoBox(ppBldg452)", 500); break
case '453': map.SetCenterAndZoom(new VELatLong(38.0271667442,-84.4995091210), 18); setTimeout("map.ShowInfoBox(ppBldg453)", 500); break
case '456': map.SetCenterAndZoom(new VELatLong(38.0328715208,-84.5017105598), 18); setTimeout("map.ShowInfoBox(ppBldg456)", 500); break
case '460': map.SetCenterAndZoom(new VELatLong(38.0321619171,-84.5113096630), 18); setTimeout("map.ShowInfoBox(ppBldg460)", 500); break
case '461': map.SetCenterAndZoom(new VELatLong(38.0321902472,-84.5114088179), 18); setTimeout("map.ShowInfoBox(ppBldg461)", 500); break
case '467': map.SetCenterAndZoom(new VELatLong(38.0323210909,-84.5135010562), 18); setTimeout("map.ShowInfoBox(ppBldg467)", 500); break
case '473': map.SetCenterAndZoom(new VELatLong(38.0305781241,-84.4979611080), 18); setTimeout("map.ShowInfoBox(ppBldg473)", 500); break
case '481': map.SetCenterAndZoom(new VELatLong(38.0244171522,-84.5025100371), 18); setTimeout("map.ShowInfoBox(ppBldg481)", 500); break
case '482': map.SetCenterAndZoom(new VELatLong(38.0366561212,-84.4992133004), 18); setTimeout("map.ShowInfoBox(ppBldg482)", 500); break
case '484': map.SetCenterAndZoom(new VELatLong(38.0299978269,-84.4977433782), 18); setTimeout("map.ShowInfoBox(ppBldg484)", 500); break
case '485': map.SetCenterAndZoom(new VELatLong(38.0269352386,-84.5020716031), 18); setTimeout("map.ShowInfoBox(ppBldg485)", 500); break
case '487': map.SetCenterAndZoom(new VELatLong(38.0301122769,-84.4979110389), 18); setTimeout("map.ShowInfoBox(ppBldg487)", 500); break
case '489': map.SetCenterAndZoom(new VELatLong(38.0295411966,-84.5104898563), 18); setTimeout("map.ShowInfoBox(ppBldg489)", 500); break
case '490': map.SetCenterAndZoom(new VELatLong(38.0276812783,-84.5079052226), 18); setTimeout("map.ShowInfoBox(ppBldg490)", 500); break
case '494': map.SetCenterAndZoom(new VELatLong(38.0371161249,-84.5002622456), 18); setTimeout("map.ShowInfoBox(ppBldg494)", 500); break
case '495': map.SetCenterAndZoom(new VELatLong(38.0397640229,-84.4978555682), 18); setTimeout("map.ShowInfoBox(ppBldg495)", 500); break
case '503': map.SetCenterAndZoom(new VELatLong(38.0375651695,-84.5047870882), 18); setTimeout("map.ShowInfoBox(ppBldg503)", 500); break
case '504': map.SetCenterAndZoom(new VELatLong(38.0346923296,-84.5011192974), 18); setTimeout("map.ShowInfoBox(ppBldg504)", 500); break
case '505': map.SetCenterAndZoom(new VELatLong(38.0349395678,-84.5007778340), 18); setTimeout("map.ShowInfoBox(ppBldg505)", 500); break
case '506': map.SetCenterAndZoom(new VELatLong(38.0302822079,-84.4983947618), 18); setTimeout("map.ShowInfoBox(ppBldg506)", 500); break
case '507': map.SetCenterAndZoom(new VELatLong(38.0354299247,-84.4998223584), 18); setTimeout("map.ShowInfoBox(ppBldg507)", 500); break
case '509': map.SetCenterAndZoom(new VELatLong(38.0343703655,-84.5090424346), 18); setTimeout("map.ShowInfoBox(ppBldg509)", 500); break
case '510': map.SetCenterAndZoom(new VELatLong(38.0342618700,-84.4982622252), 18); setTimeout("map.ShowInfoBox(ppBldg510)", 500); break
case '511': map.SetCenterAndZoom(new VELatLong(38.0340879506,-84.4985730706), 18); setTimeout("map.ShowInfoBox(ppBldg511)", 500); break
case '514': map.SetCenterAndZoom(new VELatLong(38.0344111706,-84.5130275202), 18); setTimeout("map.ShowInfoBox(ppBldg514)", 500); break
case '514': map.SetCenterAndZoom(new VELatLong(38.0347828967,-84.5127704017), 18); setTimeout("map.ShowInfoBox(ppBldg514)", 500); break
case '517': map.SetCenterAndZoom(new VELatLong(38.0331921128,-84.5099887099), 18); setTimeout("map.ShowInfoBox(ppBldg517)", 500); break
case '518': map.SetCenterAndZoom(new VELatLong(38.0342753483,-84.5125708997), 18); setTimeout("map.ShowInfoBox(ppBldg518)", 500); break
case '564': map.SetCenterAndZoom(new VELatLong(38.0426350531,-84.5077355356), 18); setTimeout("map.ShowInfoBox(ppBldg564)", 500); break
case '565': map.SetCenterAndZoom(new VELatLong(38.0301709374,-84.5007072120), 18); setTimeout("map.ShowInfoBox(ppBldg565)", 500); break
case '566': map.SetCenterAndZoom(new VELatLong(38.0291299048,-84.5005678789), 18); setTimeout("map.ShowInfoBox(ppBldg566)", 500); break
case '567': map.SetCenterAndZoom(new VELatLong(38.0284496448,-84.5010538549), 18); setTimeout("map.ShowInfoBox(ppBldg567)", 500); break
case '568': map.SetCenterAndZoom(new VELatLong(38.0406977556,-84.5023271212), 18); setTimeout("map.ShowInfoBox(ppBldg568)", 500); break
case '571': map.SetCenterAndZoom(new VELatLong(38.0349970538,-84.5119901016), 18); setTimeout("map.ShowInfoBox(ppBldg571)", 500); break
case '572': map.SetCenterAndZoom(new VELatLong(38.0273615763,-84.5016848119), 18); setTimeout("map.ShowInfoBox(ppBldg572)", 500); break
case '582': map.SetCenterAndZoom(new VELatLong(38.0323920000,-84.5088050000), 18); setTimeout("map.ShowInfoBox(ppBldg582)", 500); break
case '585': map.SetCenterAndZoom(new VELatLong(38.0274223273,-84.4993078787), 18); setTimeout("map.ShowInfoBox(ppBldg585)", 500); break
case '596': map.SetCenterAndZoom(new VELatLong(38.033665    , -84.509777   ), 18); setTimeout("map.ShowInfoBox(ppBldg596)", 500); break
case '600': map.SetCenterAndZoom(new VELatLong(38.0343063493,-84.4995018117), 18); setTimeout("map.ShowInfoBox(ppBldg600)", 500); break
case '601': map.SetCenterAndZoom(new VELatLong(38.0313710000,-84.5105410000), 18); setTimeout("map.ShowInfoBox(ppBldg601)", 500); break
case '604': map.SetCenterAndZoom(new VELatLong(38.0397692478,-84.5000207756), 18); setTimeout("map.ShowInfoBox(ppBldg604)", 500); break
case '611': map.SetCenterAndZoom(new VELatLong(38.0430355070,-84.5003219949), 18); setTimeout("map.ShowInfoBox(ppBldg611)", 500); break
case '612': map.SetCenterAndZoom(new VELatLong(38.0419702142,-84.5014853747), 18); setTimeout("map.ShowInfoBox(ppBldg612)", 500); break
case '613': map.SetCenterAndZoom(new VELatLong(38.0423999697,-84.5018021826), 18); setTimeout("map.ShowInfoBox(ppBldg613)", 500); break
case '614': map.SetCenterAndZoom(new VELatLong(38.0434583044,-84.4997402760), 18); setTimeout("map.ShowInfoBox(ppBldg614)", 500); break
case '615': map.SetCenterAndZoom(new VELatLong(38.0433453222,-84.4996625743), 18); setTimeout("map.ShowInfoBox(ppBldg615)", 500); break
case '618': map.SetCenterAndZoom(new VELatLong(38.0339024608,-84.5037434874), 18); setTimeout("map.ShowInfoBox(ppBldg618)", 500); break
case '621': map.SetCenterAndZoom(new VELatLong(38.030771    ,-84.510645)    , 18); setTimeout("map.ShowInfoBox(ppBldg621)", 500); break
case '622': map.SetCenterAndZoom(new VELatLong(38.03083     ,-84.51098)     , 18); setTimeout("map.ShowInfoBox(ppBldg622)", 500); break
case '623': map.SetCenterAndZoom(new VELatLong(38.030885    ,-84.511142)    , 18); setTimeout("map.ShowInfoBox(ppBldg623)", 500); break
case '624': map.SetCenterAndZoom(new VELatLong(38.03108     ,-84.511976)    , 18); setTimeout("map.ShowInfoBox(ppBldg624)", 500); break
case '625': map.SetCenterAndZoom(new VELatLong(38.0297114403,-84.5104556428), 18); setTimeout("map.ShowInfoBox(ppBldg625)", 500); break
case '626': map.SetCenterAndZoom(new VELatLong(38.0294025983,-84.5105805058), 18); setTimeout("map.ShowInfoBox(ppBldg626)", 500); break
case '627': map.SetCenterAndZoom(new VELatLong(38.0292721067,-84.5106710554), 18); setTimeout("map.ShowInfoBox(ppBldg627)", 500); break
case '629': map.SetCenterAndZoom(new VELatLong(38.0305627650,-84.5101559737), 18); setTimeout("map.ShowInfoBox(ppBldg629)", 500); break
case '630': map.SetCenterAndZoom(new VELatLong(38.01995     ,-84.50297)     , 18); setTimeout("map.ShowInfoBox(ppBldg630)", 500); break
case '631': map.SetCenterAndZoom(new VELatLong(38.034006    ,-84.498112)    , 18); setTimeout("map.ShowInfoBox(ppBldg631)", 500); break
case '632': map.SetCenterAndZoom(new VELatLong(38.033854    ,-84.497898)    , 18); setTimeout("map.ShowInfoBox(ppBldg632)", 500); break
case '636': map.SetCenterAndZoom(new VELatLong(38.034399881 ,-84.4996107049), 18); setTimeout("map.ShowInfoBox(ppBldg636)", 500); break
case '8633': map.SetCenterAndZoom(new VELatLong(38.0422202915,-84.5007037347), 18); setTimeout("map.ShowInfoBox(ppBldg8633)", 500); break
case '9983': map.SetCenterAndZoom(new VELatLong(38.0333362324,-84.5104928815), 18); setTimeout("map.ShowInfoBox(ppBldg9983)", 500); break
			default: alert('Your selection was not found on this campus.');
		}
	}
	catch(err)
	{
		alert(err.description);
	}
}
//function getPointLoc(bldgid, startEnd) {
function getPointLoc(bldgid) {
   try {
       switch (bldgid) {
case '1': return { latV: 38.0406654903, longV: -84.5073088198 }; break
case '2': return {latV: 38.0397346804, longV: -84.5076315006 }; break
case '3': return {latV: 38.0355743355, longV: -84.5070071667 }; break
case '4': return {latV: 38.0410951799, longV: -84.5059361446 }; break
case '5': return {latV: 38.0407007420, longV: -84.5056664354 }; break
case '6': return {latV: 38.0416972996, longV: -84.5029658771 }; break
case '7': return {latV: 38.0410520128, longV: -84.5028921977 }; break
case '8': return {latV: 38.0411774039, longV: -84.5024955961 }; break
case '9': return {latV: 38.0414917343, longV: -84.5020760095 }; break
case '10': return {latV: 38.0422569074, longV: -84.5022066388 }; break
case '11': return {latV: 38.0417444088, longV: -84.5016560640 }; break
case '12': return {latV: 38.0410174263, longV: -84.5018537736 }; break
case '14': return {latV: 38.0352140727, longV: -84.5027285112 }; break
case '15': return {latV: 38.0365790903, longV: -84.5011009425 }; break
case '17': return {latV: 38.0407987977, longV: -84.5080748449 }; break
case '19': return {latV: 38.0393605715, longV: -84.5005190966 }; break
case '20': return {latV: 38.0389458944, longV: -84.5078712080 }; break
case '21': return {latV: 38.0371273202, longV: -84.5011956702 }; break
case '22': return {latV: 38.0369678507, longV: -84.5020586344 }; break
case '23': return {latV: 38.0377002757, longV: -84.4993240538 }; break
case '24': return {latV: 38.0376341451, longV: -84.5033081680 }; break
case '25': return {latV: 38.0380584153, longV: -84.5038500749 }; break
case '26': return {latV: 38.0394576667, longV: -84.5028619875 }; break
case '27': return {latV: 38.0386450673, longV: -84.5042121657 }; break
case '28': return {latV: 38.0394013946, longV: -84.5040966491 }; break
case '29': return {latV: 38.0406678710, longV: -84.5034687975 }; break
case '30': return {latV: 38.0401635223, longV: -84.5036188564 }; break
case '31': return {latV: 38.0400600988, longV: -84.5041474868 }; break
case '32': return {latV: 38.0388845853, longV: -84.5048834767 }; break
case '33': return {latV: 38.0385559125, longV: -84.5054093223 }; break
case '34': return {latV: 38.0379975757, longV: -84.5065039631 }; break
case '35': return {latV: 38.0380067609, longV: -84.5046737286 }; break
case '38': return {latV: 38.0371017300, longV: -84.5042645974 }; break
case '39': return {latV: 38.0368136309, longV: -84.5035097198 }; break
case '40': return {latV: 38.0361683911, longV: -84.5030576041 }; break
case '41': return {latV: 38.0365593188, longV: -84.5040791059 }; break
case '42': return {latV: 38.0368193111, longV: -84.5045744215 }; break
case '43': return {latV: 38.0386342400, longV: -84.5074842884 }; break
case '44': return {latV: 38.0360912994, longV: -84.5047620590 }; break
case '45': return {latV: 38.0364407211, longV: -84.5051544258 }; break
case '46': return {latV: 38.0374037738, longV: -84.5057134783 }; break
case '47': return {latV: 38.0375674632, longV: -84.5068611955 }; break
case '48': return {latV: 38.0365533950, longV: -84.5072233019 }; break
case '49': return {latV: 38.0368737827, longV: -84.5064361943 }; break
case '50': return {latV: 38.0363297949, longV: -84.5064192261 }; break
case '51': return {latV: 38.0361568474, longV: -84.5069679871 }; break
case '52': return {latV: 38.0358917009, longV: -84.5067592292 }; break
case '53': return {latV: 38.0353581797, longV: -84.5063514766 }; break
case '54': return {latV: 38.0357547216, longV: -84.5056716104 }; break
case '55': return {latV: 38.0356533241, longV: -84.5038790318 }; break
case '56': return {latV: 38.0350558044, longV: -84.5052116573 }; break
case '57': return {latV: 38.0349944743, longV: -84.5048218413 }; break
case '58': return {latV: 38.0346817101, longV: -84.5047912741 }; break
case '59': return {latV: 38.0347028680, longV: -84.5052404059 }; break
case '60': return {latV: 38.0350169717, longV: -84.5056677697 }; break
case '61': return {latV: 38.0343242033, longV: -84.5062671910 }; break
case '61': return {latV: 38.0343825002, longV: -84.5061883204 }; break
case '61': return {latV: 38.0344788131, longV: -84.5060436902 }; break
case '62': return {latV: 38.0345174987, longV: -84.5063817528 }; break
case '62': return {latV: 38.0345560073, longV: -84.5064781006 }; break
case '62': return {latV: 38.0347462449, longV: -84.5062240003 }; break
case '64': return {latV: 38.0349567145, longV: -84.5072292685 }; break
case '65': return {latV: 38.0339953314, longV: -84.5066406696 }; break
case '66': return {latV: 38.0337574065, longV: -84.5067192691 }; break
case '67': return {latV: 38.0362127601, longV: -84.5014444262 }; break
case '68': return {latV: 38.0358692340, longV: -84.5018814545 }; break
case '69': return {latV: 38.0355640478, longV: -84.5022287549 }; break
case '70': return {latV: 38.0336326973, longV: -84.5048752127 }; break
case '71': return {latV: 38.0332496086, longV: -84.5042903023 }; break
case '72': return {latV: 38.0331514947, longV: -84.5051946831 }; break
case '73': return {latV: 38.0327612758, longV: -84.5058084735 }; break
case '75': return {latV: 38.0314016277, longV: -84.5046877610 }; break
case '76': return {latV: 38.0312694128, longV: -84.5053896641 }; break
case '78': return {latV: 38.0307206474, longV: -84.5050351490 }; break
case '82': return {latV: 38.0331354948, longV: -84.5070688345 }; break
case '85': return {latV: 38.0299013742, longV: -84.5077483989 }; break
case '86': return {latV: 38.0301182765, longV: -84.5053162487 }; break
case '87': return {latV: 38.0196629531, longV: -84.5022441688 }; break
case '88': return {latV: 38.0216038040, longV: -84.5024110236 }; break
case '89': return {latV: 38.0289632543, longV: -84.5057937159 }; break
case '91': return {latV: 38.0287338634, longV: -84.5092050336 }; break
case '92': return {latV: 38.0286130037, longV: -84.5081855023 }; break
case '93': return {latV: 38.0321301232, longV: -84.5066933629 }; break
case '94': return {latV: 38.0272118720, longV: -84.5104391252 }; break
case '96': return {latV: 38.0317668478, longV: -84.5059104052 }; break
case '97': return {latV: 38.0247961026, longV: -84.5080360704 }; break
case '98': return {latV: 38.0320163765, longV: -84.5055721366 }; break
case '99': return {latV: 38.0251062169, longV: -84.5108179332 }; break
case '101': return {latV: 38.0419959588, longV: -84.5087510908 }; break
case '102': return {latV: 38.0423199366, longV: -84.5085636651 }; break
case '103': return {latV: 38.0417133724, longV: -84.5091915861 }; break
case '105': return {latV: 38.0258262574, longV: -84.5120315197 }; break
case '106': return {latV: 38.0262705719, longV: -84.5129962969 }; break
case '107': return {latV: 38.0346767042, longV: -84.5031980457 }; break
case '108': return {latV: 38.0370312411, longV: -84.5055101614 }; break
case '110': return {latV: 38.0272774761, longV: -84.4994371581 }; break
case '111': return {latV: 38.0325962233, longV: -84.5042426436 }; break
case '112': return {latV: 38.0334262786, longV: -84.5032218783 }; break
case '113': return {latV: 38.0270736918, longV: -84.5000460026 }; break
case '114': return {latV: 38.0291676376, longV: -84.4985016783 }; break
case '115': return {latV: 38.0315466157, longV: -84.5006063596 }; break
case '118': return {latV: 38.0306378037, longV: -84.5019182718 }; break
case '119': return {latV: 38.0374015412, longV: -84.4998920575 }; break
case '121': return {latV: 38.0351235628, longV: -84.4993755752 }; break
case '122': return {latV: 38.0344247069, longV: -84.5008203386 }; break
case '124': return {latV: 38.0353249328, longV: -84.5018583190 }; break
case '125': return {latV: 38.0351943130, longV: -84.5015323243 }; break
case '126': return {latV: 38.0352171510, longV: -84.5010662130 }; break
case '127': return {latV: 38.0355371173, longV: -84.5008659648 }; break
case '128': return {latV: 38.0357485125, longV: -84.5011098547 }; break
case '129': return {latV: 38.0356209402, longV: -84.5014352444 }; break
case '130': return {latV: 38.0285921841, longV: -84.4993653343 }; break
case '131': return {latV: 38.0291543889, longV: -84.5000012623 }; break
case '132': return {latV: 38.0300340087, longV: -84.4999079466 }; break
case '133': return {latV: 38.0309354560, longV: -84.5004555555 }; break
case '134': return {latV: 38.0315429485, longV: -84.4995144533 }; break
case '135': return {latV: 38.0307828195, longV: -84.4987989806 }; break
case '136': return {latV: 38.0297104359, longV: -84.4988838667 }; break
case '137': return {latV: 38.0312843916, longV: -84.5031840800 }; break
case '138': return {latV: 38.0309008010, longV: -84.5027487933 }; break
case '140': return {latV: 38.0309770411, longV: -84.5016780479 }; break
case '142': return {latV: 38.0317407534, longV: -84.5025406757 }; break
case '143': return {latV: 38.0300661285, longV: -84.5035648564 }; break
case '144': return {latV: 38.0295860731, longV: -84.5036434008 }; break
case '145': return {latV: 38.0295614176, longV: -84.5030075372 }; break
case '146': return {latV: 38.0290914120, longV: -84.5030785760 }; break
case '147': return {latV: 38.0287015102, longV: -84.5024361971 }; break
case '148': return {latV: 38.0290341878, longV: -84.5017635597 }; break
case '149': return {latV: 38.0295099120, longV: -84.5017680619 }; break
case '150': return {latV: 38.0294740899, longV: -84.5011393351 }; break
case '151': return {latV: 38.0299580049, longV: -84.5011348815 }; break
case '152': return {latV: 38.0300038294, longV: -84.5017491780 }; break
case '153': return {latV: 38.0300559748, longV: -84.5029609276 }; break
case '154': return {latV: 38.0283650242, longV: -84.5074479524 }; break
case '155': return {latV: 38.0286436071, longV: -84.5076964477 }; break
case '156': return {latV: 38.0286088705, longV: -84.5075377166 }; break
case '157': return {latV: 38.0281510482, longV: -84.5073802852 }; break
case '158': return {latV: 38.0281883532, longV: -84.5075297032 }; break
case '159': return {latV: 38.0282177663, longV: -84.5076796907 }; break
case '160': return {latV: 38.0282514601, longV: -84.5078343078 }; break
case '161': return {latV: 38.0281177956, longV: -84.5072268147 }; break
case '162': return {latV: 38.0280855623, longV: -84.5070802446 }; break
case '163': return {latV: 38.0285753058, longV: -84.5073881616 }; break
case '164': return {latV: 38.0284508090, longV: -84.5070010564 }; break
case '177': return {latV: 38.0207901424, longV: -84.5018329742 }; break
case '182': return {latV: 38.0203173260, longV: -84.5027911417 }; break
case '183': return {latV: 38.0198413942, longV: -84.5030245945 }; break
case '184': return {latV: 38.0204100605, longV: -84.5018770239 }; break
case '185': return {latV: 38.0208825352, longV: -84.5016573700 }; break
case '189': return {latV: 38.0197219238, longV: -84.5100165427 }; break
case '190': return {latV: 38.0190923251, longV: -84.5094238084 }; break
case '191': return {latV: 38.0179507930, longV: -84.5096496527 }; break
case '192': return {latV: 38.0165719519, longV: -84.5105402715 }; break
case '193': return {latV: 38.0174361632, longV: -84.5104807256 }; break
case '194': return {latV: 38.0185798323, longV: -84.5102481359 }; break
case '197': return {latV: 38.0273627979, longV: -84.5062456340 }; break
case '198': return {latV: 38.0340210232, longV: -84.5038792520 }; break
case '199': return {latV: 38.0335900583, longV: -84.5074794863 }; break
case '200': return {latV: 38.0319706109, longV: -84.5086633579 }; break
case '202': return {latV: 38.0413425604, longV: -84.5051797384 }; break
case '204': return {latV: 38.0413669135, longV: -84.5067221157 }; break
case '207': return {latV: 38.0419370348, longV: -84.5080651601 }; break
case '209': return {latV: 38.0337327515, longV: -84.5046778076 }; break
case '210': return {latV: 38.0418694741, longV: -84.5082125284 }; break
case '211': return {latV: 38.0362088072, longV: -84.5035734953 }; break
case '212': return {latV: 38.0285723333, longV: -84.5040347423 }; break
case '213': return {latV: 38.0267306412, longV: -84.5029087996 }; break
case '214': return {latV: 38.0357671696, longV: -84.5064660246 }; break
case '215': return {latV: 38.0279879012, longV: -84.5087617670 }; break
case '216': return {latV: 38.0344636262, longV: -84.5077019540 }; break
case '219': return {latV: 38.0283564894, longV: -84.5045974564 }; break
case '220': return {latV: 38.0276928656, longV: -84.5039587573 }; break
case '222': return {latV: 38.0227499755, longV: -84.5051601074 }; break
case '223': return {latV: 38.0329415651, longV: -84.5080755444 }; break
case '224': return {latV: 38.0372532198, longV: -84.5029432201 }; break
case '225': return {latV: 38.0339537007, longV: -84.5059287530 }; break
case '227': return {latV: 38.0272525097, longV: -84.5030608339 }; break
case '229': return {latV: 38.0199593762, longV: -84.5020456218 }; break
case '230': return {latV: 38.0328741895, longV: -84.5086209604 }; break
case '231': return {latV: 38.0205571462, longV: -84.5031514331 }; break
case '232': return {latV: 38.0326054220, longV: -84.5078093308 }; break
case '235': return {latV: 38.0247930816, longV: -84.5036934310 }; break
case '236': return {latV: 38.0256934547, longV: -84.5071729316 }; break
case '237': return {latV: 38.0339197035, longV: -84.5048519773 }; break
case '238': return {latV: 38.0367545199, longV: -84.4990150062 }; break
case '240': return {latV: 38.0337428168, longV: -84.4977121715 }; break
case '241': return {latV: 38.0377993573, longV: -84.5012086325 }; break
case '242': return {latV: 38.0407744410, longV: -84.5006719343 }; break
case '243': return {latV: 38.0182686179, longV: -84.5069960740 }; break
case '244': return {latV: 38.0184092129, longV: -84.5073794284 }; break
case '245': return {latV: 38.0184692247, longV: -84.5078197191 }; break
case '246': return {latV: 38.0183468494, longV: -84.5082479045 }; break
case '247': return {latV: 38.0180716618, longV: -84.5085355575 }; break
case '248': return {latV: 38.0177212977, longV: -84.5086109266 }; break
case '249': return {latV: 38.0173922865, longV: -84.5085728783 }; break
case '250': return {latV: 38.0167274399, longV: -84.5084978248 }; break
case '251': return {latV: 38.0163952105, longV: -84.5084603063 }; break
case '252': return {latV: 38.0160427054, longV: -84.5085779632 }; break
case '253': return {latV: 38.0158335150, longV: -84.5089561348 }; break
case '254': return {latV: 38.0158651679, longV: -84.5094152620 }; break
case '255': return {latV: 38.0153907646, longV: -84.5094615707 }; break
case '256': return {latV: 38.0152518341, longV: -84.5090813760 }; break
case '257': return {latV: 38.0151903271, longV: -84.5086353191 }; break
case '258': return {latV: 38.0153149670, longV: -84.5082162742 }; break
case '259': return {latV: 38.0155862157, longV: -84.5079216220 }; break
case '260': return {latV: 38.0159387537, longV: -84.5078446813 }; break
case '261': return {latV: 38.0162688831, longV: -84.5078807320 }; break
case '262': return {latV: 38.0165993857, longV: -84.5079183980 }; break
case '263': return {latV: 38.0169332164, longV: -84.5079566307 }; break
case '264': return {latV: 38.0172681564, longV: -84.5079942633 }; break
case '265': return {latV: 38.0176146781, longV: -84.5078761326 }; break
case '266': return {latV: 38.0178258765, longV: -84.5075013396 }; break
case '267': return {latV: 38.0177933194, longV: -84.5070407261 }; break
case '268': return {latV: 38.0170229837, longV: -84.5085153514 }; break
case '269': return {latV: 38.0197749095, longV: -84.5014664411 }; break
case '272': return {latV: 38.0240985338, longV: -84.5053390765 }; break
case '274': return {latV: 38.0253659688, longV: -84.5037812388 }; break
case '275': return {latV: 38.0205346357, longV: -84.5094025901 }; break
case '276': return {latV: 38.0268349011, longV: -84.5096251543 }; break
case '277': return {latV: 38.0269563152, longV: -84.5006239434 }; break
case '278': return {latV: 38.0202256345, longV: -84.5011795446 }; break
case '279': return {latV: 38.0196397714, longV: -84.5009949931 }; break
case '281': return {latV: 38.0371968044, longV: -84.5052329317 }; break
case '282': return {latV: 38.0349247804, longV: -84.5030820818 }; break
case '283': return {latV: 38.0279365376, longV: -84.4987989514 }; break
case '284': return {latV: 38.0336137229, longV: -84.5080718674 }; break
case '285': return {latV: 38.0219500283, longV: -84.5033724585 }; break
case '286': return {latV: 38.0367621273, longV: -84.5051345038 }; break
case '287': return {latV: 38.0202918075, longV: -84.5014757393 }; break
case '288': return {latV: 38.0202749103, longV: -84.5008592358 }; break
case '289': return {latV: 38.0199211489, longV: -84.5007779554 }; break
case '293': return {latV: 38.0310744688, longV: -84.5076421923 }; break
case '294': return {latV: 38.0312092736, longV: -84.5084571614 }; break
case '297': return {latV: 38.0313086624, longV: -84.5062778145 }; break
case '298': return {latV: 38.0310111235, longV: -84.5067140853 }; break
case '300': return {latV: 38.0137237485, longV: -84.5050884664 }; break
case '301': return {latV: 38.0362544150, longV: -84.5099084874 }; break
case '302': return {latV: 38.0145096989, longV: -84.5038998320 }; break
case '305': return {latV: 38.0307187249, longV: -84.5059395865 }; break
//case '308': return {latV: 38.0315076851, longV: -84.5067308874 }; break
case '312': return {latV: 38.0264905207, longV: -84.5086365861 }; break
case '314': return {latV: 38.0401396221, longV: -84.4980248092 }; break
case '315': return {latV: 38.0410864684, longV: -84.4990884465 }; break
case '322': return {latV: 38.0338726081, longV: -84.5003462051 }; break
case '333': return {latV: 38.0366243931, longV: -84.5080436661 }; break
case '336': return {latV: 38.0356121771, longV: -84.5084031981 }; break
case '337': return {latV: 38.0356299614, longV: -84.5086887949 }; break
case '343': return {latV: 38.0408052121, longV: -84.4988876482 }; break
case '344': return {latV: 38.0405350810, longV: -84.4985386233 }; break
case '345': return {latV: 38.0409507997, longV: -84.4989924375 }; break
case '346': return {latV: 38.0360144169, longV: -84.5091323500 }; break
case '347': return {latV: 38.0366891841, longV: -84.5083389476 }; break
case '348': return {latV: 38.0367409919, longV: -84.5085390563 }; break
case '349': return {latV: 38.0365827625, longV: -84.5093560693 }; break
case '350': return {latV: 38.0364650214, longV: -84.5094109713 }; break
case '351': return {latV: 38.0364083543, longV: -84.5089917082 }; break
case '353': return {latV: 38.0299892702, longV: -84.4980669350 }; break
case '361': return {latV: 38.0346100885, longV: -84.5003786463 }; break
case '362': return {latV: 38.0347199335, longV: -84.4999421677 }; break
case '363': return {latV: 38.0344063631, longV: -84.5001320014 }; break
case '365': return {latV: 38.0341930374, longV: -84.4999061799 }; break
case '377': return {latV: 38.0366779772, longV: -84.5004186052 }; break
case '378': return {latV: 38.0366052827, longV: -84.5003242949 }; break
case '381': return {latV: 38.0327708025, longV: -84.5115329215 }; break
case '386': return {latV: 38.0326105267, longV: -84.5110514185 }; break
case '400': return {latV: 38.0366960087, longV: -84.5087126114 }; break
case '401': return {latV: 38.0367982809, longV: -84.5092381799 }; break
case '402': return {latV: 38.0350813475, longV: -84.5058194718 }; break
case '408': return {latV: 38.0366979370, longV: -84.4999602888 }; break
case '412': return {latV: 38.0348236473, longV: -84.5000743883 }; break
case '413': return {latV: 38.0178445125, longV: -84.4998124113 }; break
case '417': return {latV: 38.0359382471, longV: -84.5076543598 }; break
case '420': return {latV: 38.0365538811, longV: -84.4986331442 }; break
case '428': return {latV: 38.0331835424, longV: -84.4983208089 }; break
case '432': return {latV: 38.0405551692, longV: -84.4988075053 }; break
case '433': return {latV: 38.0368791292, longV: -84.5005253888 }; break
case '442': return {latV: 38.0360970673, longV: -84.5076363841 }; break
case '449': return {latV: 38.0270453766, longV: -84.4995237070 }; break
case '450': return {latV: 38.0175795817, longV: -84.4997750773 }; break
case '451': return {latV: 38.0174401455, longV: -84.5003232947 }; break
case '452': return {latV: 38.0173685902, longV: -84.4999787400 }; break
case '453': return {latV: 38.0271667442, longV: -84.4995091210 }; break
case '456': return {latV: 38.0328715208, longV: -84.5017105598 }; break
case '460': return {latV: 38.0321619171, longV: -84.5113096630 }; break
case '461': return {latV: 38.0321902472, longV: -84.5114088179 }; break
case '467': return {latV: 38.0323210909, longV: -84.5135010562 }; break
case '473': return {latV: 38.0305781241, longV: -84.4979611080 }; break
case '481': return {latV: 38.0244171522, longV: -84.5025100371 }; break
case '482': return {latV: 38.0366561212, longV: -84.4992133004 }; break
case '484': return {latV: 38.0299978269, longV: -84.4977433782 }; break
case '485': return {latV: 38.0269352386, longV: -84.5020716031 }; break
case '487': return {latV: 38.0301122769, longV: -84.4979110389 }; break
case '489': return {latV: 38.0295411966, longV: -84.5104898563 }; break
case '490': return {latV: 38.0276812783, longV: -84.5079052226 }; break
case '494': return {latV: 38.0371161249, longV: -84.5002622456 }; break
case '495': return {latV: 38.0397640229, longV: -84.4978555682 }; break
case '503': return {latV: 38.0375651695, longV: -84.5047870882 }; break
case '504': return {latV: 38.0346923296, longV: -84.5011192974 }; break
case '505': return {latV: 38.0349395678, longV: -84.5007778340 }; break
case '506': return {latV: 38.0302822079, longV: -84.4983947618 }; break
case '507': return {latV: 38.0354299247, longV: -84.4998223584 }; break
case '509': return {latV: 38.0343703655, longV: -84.5090424346 }; break
case '510': return {latV: 38.0342618700, longV: -84.4982622252 }; break
case '511': return {latV: 38.0340879506, longV: -84.4985730706 }; break
case '514': return {latV: 38.0344111706, longV: -84.5130275202 }; break
case '514': return {latV: 38.0347828967, longV: -84.5127704017 }; break
case '517': return {latV: 38.0331921128, longV: -84.5099887099 }; break
case '518': return {latV: 38.0342753483, longV: -84.5125708997 }; break
case '564': return {latV: 38.0426350531, longV: -84.5077355356 }; break
case '565': return {latV: 38.0301709374, longV: -84.5007072120 }; break
case '566': return {latV: 38.0291299048, longV: -84.5005678789 }; break
case '567': return {latV: 38.0284496448, longV: -84.5010538549 }; break
case '568': return {latV: 38.0406977556, longV: -84.5023271212 }; break
case '571': return {latV: 38.0349970538, longV: -84.5119901016 }; break
case '572': return {latV: 38.0273615763, longV: -84.5016848119 }; break
case '582': return {latV: 38.0323920000, longV: -84.5088050000 }; break
case '585': return {latV: 38.0274223273, longV: -84.4993078787 }; break
case '596': return {latV: 38.033665    , longV: -84.509777    }; break
case '600': return {latV: 38.0343063493, longV: -84.4995018117 }; break
case '601': return {latV: 38.0313710000, longV: -84.5105410000 }; break
case '604': return {latV: 38.0397692478, longV: -84.5000207756 }; break
case '611': return {latV: 38.0430355070, longV: -84.5003219949 }; break
case '612': return {latV: 38.0419702142, longV: -84.5014853747 }; break
case '613': return {latV: 38.0423999697, longV: -84.5018021826 }; break
case '614': return {latV: 38.0434583044, longV: -84.4997402760 }; break
case '615': return {latV: 38.0433453222, longV: -84.4996625743 }; break
case '618': return {latV: 38.0339024608, longV: -84.5037434874 }; break
case '621': return {latV: 38.030771    , longV: -84.510645} ; break
case '622': return {latV: 38.03083     , longV: -84.51098} ; break
case '623': return {latV: 38.030885    , longV: -84.511142}; break
case '624': return {latV: 38.03108     , longV: -84.511976} ; break
case '625': return {latV: 38.0297114403, longV: -84.5104556428 }; break
case '626': return {latV: 38.0294025983, longV: -84.5105805058 }; break
case '627': return {latV: 38.0292721067, longV: -84.5106710554 }; break
case '629': return {latV: 38.0305627650, longV: -84.5101559737 }; break
case '630': return {latV: 38.01995     , longV: -84.50297}; break
case '631': return {latV: 38.034006    , longV: -84.498112}; break
case '632': return { latV: 38.033854, longV: -84.497898 }; break
case '636': return {latV: 38.034399881 , longV: -84.4996107049 }; break
case '8633': return {latV: 38.0422202915, longV: -84.5007037347 }; break
case '9983': return {latV: 38.0333362324, longV: -84.5104928815 }; break

        }
    }
    catch (err) {
        alert(err.description);
    }
}
function DoFind()
{
	if( document.getElementById('txtWhat').value == "" )
		alert( 'Please enter a value in the text field to search for.' );
	else {
	    DeleteBuilding();DeleteLocation();DeleteRoute();DeleteBtoBDirections();
	    //(layer, resultsArray, places, hasMore, veErrorMessage)
	    var cb = function(a, b, c, d, e) {
	        var locResults;
	        if (b) {
	            locResults = '<p>The following location results were found:</p><ol class="resultol">';
	            for (var i = 0; i < b.length; i++) {
	                locResults += "<li>" + b[i].Name + "</li>";
	            }
	            locResults += "</ol></p>";
	            // more results
//	            if (d) {
//	                var r = "<a href='#' onclick='javascript:alert();'>" +
//                       "Click for More Results</a>";
//	                // document.getElementById('results').innerHTML = r;
//	                locResults += r;
//	            }
//	            else {
//	                index = 0;
//	                number = Number(document.getElementById('txtNumResults').value);
//	                document.getElementById('results').innerHTML = "";
//	                document.getElementById('results').innerHTML = "No More Results Available";
//	            }


	        }
	        else {
	            locResults = "<p>No location results were found.</p>";
	        }
	        //document.getElementById('routebox').style.display="block";
	        document.getElementById('routelistinfo').innerHTML = locResults + '<p><input id="deletelocation" type="button" value="Clear" onclick="DeleteBuilding();DeleteLocation();DeleteRoute();DeleteBtoBDirections();" /></p>';
	    };
		try
		{
			slFindResults.DeleteAllShapes();
			var what = document.getElementById('txtWhat').value;
			////var where = document.getElementById('txtWhere').value;
			var where = 'lexington, kentucky, usa';
			//VEMap.Find(what, where, findType, shapeLayer, startIndex, numberOfResults, showResults, createResults, useDefaultDisambiguation, setBestMapView, callback);
			map.Find(what, where, null, slFindResults, null, 20, null, null, null, false, cb);
			//map.Find(what, null, null, slFindResults, null, 20, null, null, null, false, cb);
			map.AddShapeLayer(slFindResults);
		}
		catch( err )
		{
			//alert(err.message);
			//alert(err.description);
		}
		tae(3);
	}
}
function DeleteBuilding() {
    document.getElementById('txtBldg').value = "";
    document.getElementById('routelistinfo').innerHTML = '<p>Search Has Been Cleared<br />&nbsp;</p>';
    
}

function DeleteLocation() {
	slFindResults.DeleteAllShapes();
	//document.getElementById('txtWhat').value = "";
	document.getElementById('routelistinfo').innerHTML = '<p>Search Has Been Cleared<br />&nbsp;</p>';
	//document.getElementById('B2Bdistance').innerHTML = "";
	document.getElementById('startBldg').options[0].selected = true;
	document.getElementById('stop1Bldg').options[0].selected = true;
	document.getElementById('stop2Bldg').options[0].selected = true;
	document.getElementById('endBldg').options[0].selected = true;
	
}
function DeleteBtoBDirections() {
    slCrowFlies.DeleteAllShapes();
    
}
function DrawPolyLine() {
    try {
    	
    // check to make sure they picked something in dropdown list
        if (document.getElementById('startBldg').value == "none")
            alert('Please select a starting building from the drop down list.');
        else if (document.getElementById('endBldg').value == "none")
            alert('Please select an ending building from the drop down list.');
        else {
            slCrowFlies.DeleteAllShapes();
            var zoom_val1 = map.GetZoomLevel();
			DeleteRoute();
            //Add a polyline
            var startV = getPointLoc(document.getElementById('startBldg').value);
            var endV = getPointLoc(document.getElementById('endBldg').value);
            var stop1TF = 0;
            var stop2TF = 0;

            if (document.getElementById('stop1Bldg').value != "none") {
                var stop1V = getPointLoc(document.getElementById('stop1Bldg').value);
                var point2 = new VELatLong(stop1V.latV, stop1V.longV);
                var point2b = new VELatLong(stop1V.latV, stop1V.longV);
                var point2c = new VELatLong(stop1V.latV, stop1V.longV);
                
                var ppPoint2 = new VEShape(VEShapeType.Pushpin, point2);
                ppPoint2.SetCustomIcon("<div class='pinStyleRedPP'></div>");
                ppPoint2.SetTitle('Intermediate Location:<br /><br />' );
                ppPoint2.SetDescription(document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text);
                ppPoint2.SetPhotoURL("http://maps.uky.edu/campusmap/images/uk_walk.gif");
                slCrowFlies.AddShape(ppPoint2);
                stop1TF = 1;
            }
            if (document.getElementById('stop2Bldg').value != "none") {
                var stop2V = getPointLoc(document.getElementById('stop2Bldg').value);
                var point3 = new VELatLong(stop2V.latV, stop2V.longV);
                var point3b = new VELatLong(stop2V.latV, stop2V.longV);
                var point3c = new VELatLong(stop2V.latV, stop2V.longV);
                
                var ppPoint3 = new VEShape(VEShapeType.Pushpin, point3);
                ppPoint3.SetCustomIcon("<div class='pinStyleRedPP'></div>");
                ppPoint3.SetTitle('Intermediate Location:<br /><br />' );
                ppPoint3.SetDescription(document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text);
                ppPoint3.SetPhotoURL("http://maps.uky.edu/campusmap/images/uk_walk.gif");
                slCrowFlies.AddShape(ppPoint3);
                stop2TF = 1;
            }
//            var distP1;
//            var distP2;
//            var distPe;
//            var distP1;
//            var distP2;
            
            var points;
            var point1 = new VELatLong(startV.latV, startV.longV);
            var point1b = new VELatLong(startV.latV, startV.longV);
            var point1c = new VELatLong(startV.latV, startV.longV);

            var point4 = new VELatLong(endV.latV, endV.longV);
            var point4b = new VELatLong(endV.latV, endV.longV);
            var point4c = new VELatLong(endV.latV, endV.longV);
            
            var ppPoint1 = new VEShape(VEShapeType.Pushpin, point1);
            ppPoint1.SetCustomIcon("<div class='pinStyleRedPP'></div>");
            ppPoint1.SetTitle('Starting Location:<br /><br />' );
            ppPoint1.SetDescription(document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text);
            ppPoint1.SetPhotoURL("http://maps.uky.edu/campusmap/images/uk_walk.gif");
            var ppPoint4 = new VEShape(VEShapeType.Pushpin, point4);
            ppPoint4.SetCustomIcon("<div class='pinStyleRedPP'></div>");
            ppPoint4.SetTitle('Ending Location:<br /><br />' );
            ppPoint4.SetDescription(document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text);
            ppPoint4.SetPhotoURL("http://maps.uky.edu/campusmap/images/uk_walk.gif");
            slCrowFlies.AddShape(ppPoint1);
            slCrowFlies.AddShape(ppPoint4);

// ppBldg9983.SetCustomIcon("<div class='pinStyle7'><div class='text'>9983</div></div>"); ppBldg9983.SetTitle('College of Medicine Bldg'); ppBldg8633.SetDescription('138 Leader Ave<br />Lexington KY 40506 <br />Building #9983 <br /> Registrar Code:  [not assigned]'); ppBldg9983.SetPhotoURL("http://maps.uky.edu/campusmap/bldg/9983.jpg");

            var conversionV = null;
            
            if (stop1TF == 1) {
                if (stop2TF == 1) {
                    points = generatePolylinePointsWithArrow([point1, point2, point3, point4]);
                }
                else {
                    points = generatePolylinePointsWithArrow([point1, point2, point4]);
                }
            }
            else if (stop2TF == 1){
                points = generatePolylinePointsWithArrow([point1, point3, point4]);
            }
            else {                
                points = generatePolylinePointsWithArrow([point1, point4]);

            }

            

            polyline = new VEShape(VEShapeType.Polyline, points);

            polyline.HideIcon();
            polyline.SetLineColor(new VEColor(255, 0, 0, 1));
            polyline.SetFillColor(new VEColor(0, 0, 0, 0));
            polyline.SetLineWidth(4);
            slCrowFlies.AddShape(polyline);
            slCrowFlies.Show();
            map.SetMapView(points);


            var conversionV = null;

            if (stop1TF == 1) {
                if (stop2TF == 1) {
                    // [point1, point2, point3, point4]
                    var distanceP1P2 = getDistance(point1, point2);

                    if (distanceP1P2 < .25) {
                        var calV = distanceP1P2.toFixed(2) * 1760;
                        //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                        conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                    }
                    else {
                        //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles ";
                        conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles ";

                    }
                    var distanceP2P3 = getDistance(point2b, point3b);

                    if (distanceP2P3 < .25) {
                        var calV2 = distanceP2P3.toFixed(2) * 1760;
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP2P3.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP2P3.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                    }
                    else {
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP2P3.toFixed(2) + " miles ";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP2P3.toFixed(2) + " miles ";
                    }
                    var distanceP3P4 = getDistance(point3c, point4);

                    if (distanceP3P4 < .25) {
                        var calV3 = distanceP3P4.toFixed(2) * 1760;
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles, (" + calV3.toFixed(0) + " yards )";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles, (" + calV3.toFixed(0) + " yards )";
                    }
                    else {
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles ";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles ";
                    }  
                }
                else {
                    // [point1, point2, point4]
                    var distanceP1P2 = getDistance(point1, point2);

                    if (distanceP1P2 < .25) {
                        var calV = distanceP1P2.toFixed(2) * 1760;
                        //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                        conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                    }
                    else {
                        //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles ";
                        conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P2.toFixed(2) + " miles ";
                    }
                    var distanceP2P4 = getDistance(point2b, point4);

                    if (distanceP2P4 < .25) {
                        var calV2 = distanceP2P4.toFixed(2) * 1760;
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP2P4.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP2P4.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                    }
                    else {
                        //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP2P4.toFixed(2) + " miles ";
                        conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop1Bldg').value + "')\" >" + document.getElementById('stop1Bldg').options[document.getElementById('stop1Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP2P4.toFixed(2) + " miles ";
                    }   
                }
            }
            else if (stop2TF == 1) {
                // [point1, point3, point4]

                var distanceP1P3 = getDistance(point1, point3);

                if (distanceP1P3 < .25) {
                    var calV = distanceP1P3.toFixed(2) * 1760;
                    //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P3.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                    conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P3.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                }
                else {
                    //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P3.toFixed(2) + " miles ";
                    conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P3.toFixed(2) + " miles ";

                }
                var distanceP3P4 = getDistance(point3b, point4);

                if (distanceP3P4 < .25) {
                    var calV2 = distanceP3P4.toFixed(2) * 1760;
                    //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                    conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles, (" + calV2.toFixed(0) + " yards )";
                }
                else {
                    //conversionV = conversionV + "<br /><br /><b>From: </b> " + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles ";
                    conversionV = conversionV + "<br /><br /><b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('stop2Bldg').value + "')\" >" + document.getElementById('stop2Bldg').options[document.getElementById('stop2Bldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP3P4.toFixed(2) + " miles ";
                }              
            }
            else {
                // [point1, point4]
                var distanceP1P4 = getDistance(point1, point4);

                if (distanceP1P4 < .25) {
                    var calV = distanceP1P4.toFixed(2) * 1760;
                    //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P4.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                    conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P4.toFixed(2) + " miles, (" + calV.toFixed(0) + " yards )";
                }
                else {
                    //conversionV = "<b>From: </b> " + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "<br /><b>To: </b> " + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "<br /><b>Distance: </b> " + distanceP1P4.toFixed(2) + " miles ";
                    conversionV = "<b>From: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('startBldg').value + "')\" >" + document.getElementById('startBldg').options[document.getElementById('startBldg').selectedIndex].text + "</a><br /><b>To: </b><a onclick=\"BldgZoomLatLong('" + document.getElementById('endBldg').value + "')\" >" + document.getElementById('endBldg').options[document.getElementById('endBldg').selectedIndex].text + "</a><br /><b>Distance: </b> " + distanceP1P4.toFixed(2) + " miles ";                    
                }
            }
            //document.getElementById('B2Bdistance').innerHTML = '<br /><b><center>"As the Crow Flies" Distances:</center></b><br /> ' + conversionV;
            document.getElementById('routelistinfo').innerHTML = '<br /><b><center>"As the Crow Flies" Distances:</center></b><br /> ' + conversionV + '<p><input id="deletelocation" type="button" value="Clear" onclick="DeleteBuilding();DeleteLocation();DeleteRoute();DeleteBtoBDirections();" /></p>';
            var zoom_val2 = map.GetZoomLevel();
            if (zoom_val1 == zoom_val2) {
                map.ZoomOut();
            }
        }  //else
    }
    catch (e) {
      alert(e.message);
    }
	tae(3);
    // http://www.movable-type.co.uk/scripts/latlong.html
}

// Calculate distance between two points specified by latitude/longitude using law of cosines.
// ref: http://www.movable-type.co.uk/scripts/LatLong.html
//function getDistance(p1, p2, miles) {
function getDistance(p1, p2) {

    p1.Latitude = latLonToRadians(p1.Latitude);
    p1.Longitude = latLonToRadians(p1.Longitude);

    p2.Latitude = latLonToRadians(p2.Latitude);
    p2.Longitude = latLonToRadians(p2.Longitude);

    var R = 6371; // earth's mean radius in km
    var dLat = p2.Latitude - p1.Latitude;
    var dLong = p2.Longitude - p1.Longitude;
    var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
		Math.cos(p1.Latitude) * Math.cos(p2.Latitude) * Math.sin(dLong / 2) * Math.sin(dLong / 2);
    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
    var disKm = R * c;
    var disMiles = disKm * 0.6214;
    return (disMiles);
    //return (miles ? disMiles : disKm);
}

//  convert lat/long in degrees to radians
function latLonToRadians(point) {
    return point * Math.PI / 180;
}

function generatePolylinePointsWithArrow(points) {
    //last point in polyline array 
    var anchorPoint = points[points.length - 1];
    //bearing from last point to second last point in pointline array 
    var bearing = calculateBearing(anchorPoint, points[points.length - 2]);
    //length of arrow head lines in km 
    var arrowLength = 0.02;
    //angle of arrow lines relative to polyline in degrees 
    var arrowAngle = 15;
    //calculate coordinates of arrow tips 
    var arrowPoint1 = calculateCoord(anchorPoint, bearing - arrowAngle, arrowLength);
    var arrowPoint2 = calculateCoord(anchorPoint, bearing + arrowAngle, arrowLength);
    //go from last point in polyline to one arrow tip, then back to the  
    //last point then to the second arrow tip. 
    points.push(arrowPoint1);
    points.push(anchorPoint);
    points.push(arrowPoint2);
    return points;
}
function DegtoRad(x) {
    return x * Math.PI / 180;
}
function RadtoDeg(x) {
    return x * 180 / Math.PI;
}
function calculateCoord(origin, brng, arcLength) {
    var lat1 = DegtoRad(origin.Latitude);
    var lon1 = DegtoRad(origin.Longitude);
    var centralAngle = arcLength / earthRadius;
    var lat2 = Math.asin(Math.sin(lat1) * Math.cos(centralAngle) + Math.cos(lat1) * Math.sin
(centralAngle) * Math.cos(DegtoRad(brng)));
    var lon2 = lon1 + Math.atan2(Math.sin(DegToRad(brng)) * Math.sin(centralAngle) * Math.cos(lat1), Math.cos
(centralAngle) - Math.sin(lat1) * Math.sin(lat2));
    return new VELatLong(RadtoDeg(lat2), RadtoDeg(lon2));
}
function calculateBearing(A, B) {
    var lat1 = DegtoRad(A.Latitude);
    var lon1 = A.Longitude;
    var lat2 = DegtoRad(B.Latitude);
    var lon2 = B.Longitude;
    var dLon = DegtoRad(lon2 - lon1);
    var y = Math.sin(dLon) * Math.cos(lat2);
    var x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(dLon);
    var brng = (RadtoDeg(Math.atan2(y, x)) + 360) % 360;
    return brng;
}
////////////////end 

function GetRoute()
{
	if( document.getElementById('txtStart').value == "" )
		alert( 'Please enter a start location in the "Route Start" text field.' );
	else if( document.getElementById('selrouteend').value == "none" )
		alert( 'Please select an end location from the "Route End" drop down menu.' );
	else
	{
		DeleteBuilding();DeleteLocation();DeleteBtoBDirections();
	    var selStart = document.getElementById('txtStart').value;
	    var endR = getPointLoc(document.getElementById('selrouteend').value);
	    var point1 = new VELatLong(endR.latV, endR.longV);
		//var selEnd =document.getElementById('selrouteend').value + ', Lexington, Kentucky';
		if (document.getElementById('typequickest').checked)
			routeType = VERouteType.Quickest;
		else
			routeType = VERouteType.Shortest;
		//document.getElementById('routebox').style.display="none";
		map.GetRoute(selStart, point1 , VEDistanceUnit.Miles, routeType, onGotRoute);
		//map.GetRoute(document.getElementById('txtStart').value, document.getElementById('txtEnd').value, VEDistanceUnit.Miles, routeType, onGotRoute);
		tae( 3 );
	}
}

function DeleteRoute()
{
	map.DeleteRoute();
	document.getElementById('txtStart').value = "";
	document.getElementById('routelistinfo').innerHTML='<p>Search Has Been Cleared<br />&nbsp;</p>';
	locateItem('EntireMainCampus');
}

function onGotRoute(route) {
    DeleteLocation();
	try
	{
		var routeinfo = "<p>Total distance: ";
		routeinfo += route.Itinerary.Distance;
		routeinfo += route.Itinerary.DistanceUnit + "</p>";
		var steps = "";
		var len = route.Itinerary.Segments.length;
		steps = "<p>" + route.Itinerary.Segments[0].Instruction + '<ol class="resultol">';
		//steps += route.Itinerary.Segments[1].Instruction + '</p><ol class="resultol">';
		for(var i = 1; i < len-1 ;i++)
		{
			steps += "<li>" + route.Itinerary.Segments[i].Instruction + " -- (";
			steps += route.Itinerary.Segments[i].Distance + ") ";
			steps += route.Itinerary.DistanceUnit + "</li>";
		}
		steps += "</ol><p>";
		steps += route.Itinerary.Segments[len-1].Instruction + "</p>";
		routeinfo += "Steps:<br />"+steps;
		routeinfo += '<p><input id="deletelocation" type="button" value="Clear" onclick="DeleteBuilding();DeleteLocation();DeleteRoute();DeleteBtoBDirections();" /></p>';
		//alert(routeinfo);
		//document.getElementById('routebox').style.display="block";
		document.getElementById('routelistinfo').innerHTML=routeinfo;
	}
	catch(err)
	{
		alert(err.description);
	}
}

function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    if (vars.length > 0) {
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return pair[1];
            }
        }
    }
    return 0;
    //alert('Building ' + variable + ' not found');
} 

function locateItem(itemloc)
{
	if (itemloc == 'VisitorCenter')
	{
		map.SetCenterAndZoom(new VELatLong(38.038897,-84.504815), 18);
		map.ShowInfoBox(ppVisCntr);
	}
	else if (itemloc == 'VisCenterPark')
	{
		map.SetCenterAndZoom(new VELatLong(38.041037,-84.505097), 18);
		map.ShowInfoBox(ppVisCntrPark);
	}
	else if (itemloc == 'EntireMainCampus') {
	    map.SetCenterAndZoom(new VELatLong(38.028926, -84.501643), 13);
		    }
    else if (itemloc == 'Bldg') {
        var urlBldg = getQueryVariable(itemloc);
        if (urlBldg != 0) {
           BldgZoomLatLong(urlBldg);
    }
      //  BldgZoomLatLong(getQueryVariable(itemloc));
    } 
}

function CreateMap()
{
	// If the browser is Firefox get the version number
	var ffv = 0;
	var ffn = "Firefox/"
	var ffp = navigator.userAgent.indexOf(ffn);
	if (ffp != -1)
		ffv = parseFloat(navigator.userAgent.substring(ffp + ffn.length));
	// If we're using Firefox 1.5 or above override the Virtual Earth drawing functions to use SVG
	if (ffv >= 1.5)
		Msn.Drawing.Graphic.CreateGraphic=function(f,b) { return new Msn.Drawing.SVGGraphic(f,b) }
	map = new VEMap('myMap');
	//map.SetDashboardSize(VEDashboardSize.Normal);
	//map.SetDashboardSize(VEDashboardSize.Small);
	map.SetDashboardSize(VEDashboardSize.Tiny);

	var agisve_services = null;
	var tileUrl = "http://gisweb01.uky.edu/ArcGIS/rest/services/UK_Basemap_VEGM/MapServer";
	
	// added for version 6.1   // 6-2008
	map.EnableShapeDisplayThreshold(false);
	map.onLoadMap = EventMapLoad;
	map.LoadMap(new VELatLong(38.0388845853, -84.5048834767), 17, VEMapStyle.Road, null, null, false);
	//38.0328715208, -84.5017105598
	ZoomScale();
	map.AttachEvent("onendzoom", ZoomScale);
	// map.AttachEvent("onchangeview", ViewChanged); don't need if can't change type
	map.SetMouseWheelZoomToCenter(false);

	map.AddShapeLayer(slCrowFlies);
	slCrowFlies.Hide();
	
    // atb 3-2009 add arcgis server
	//// new map instance
	//map = new VEMap('mymap');
	//var mapOptions = new VEMapOptions();
	//mapOptions.EnableBirdseye = false;
	//// load map
	//map.LoadMap(centerat, 15, VEMapStyle.Road, false, VEMapMode.Mode2D, false, 0, mapOptions);
	//// create a new layer factory
	agisve_services = new ESRI.ArcGIS.VE.ArcGISLayerFactory();
	// create the tile layer specfication using url and response function
	agisve_services.CreateLayer(tileUrl, "Basemap", GetMap);

	locateItem('Bldg');
	
}

function GetMap(tileSourceSpec, resourceInfo) {
    // set opacity of tile layer specification
    tileSourceSpec.Opacity = 1.0;
    // add layer to map using the tile layer specification
    map.AddTileLayer(tileSourceSpec, true);
	//map.ClearInfoBoxStyles();
}
// added 8-29-2009
function InitXmlHttp() {
    // Attempt to initialize xmlhttp object
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
        // Try to use different activex object
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E) {
            xmlhttp = false;
        }
    }

    // If not initialized, create XMLHttpRequest object
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    // Define function call for when Request obj state has changed
    xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
}
function FindBldgASHX() {
    DeleteRoute();
    DeleteLocation();
    if (document.getElementById('txtBldg').value == "") {
        alert('Please enter a Partial Building Name in the text box to search for.');
    }
    else{
        var txtBldgName = document.getElementById('txtBldg').value;
        //DeleteLocation(); 
        //DeleteRoute();
        //alert(txtBldgName);
        InitXmlHttp();
        xmlhttp.onreadystatechange = XMLHttpRequestCompleted;
        xmlhttp.open("GET", "" + "BldgHistSearch.ashx?BldgNameString=" + txtBldgName, true);
        //xmlhttp.send(txtBldgName);
        xmlhttp.send(null);
        tae(3);
    }
}
function XMLHttpRequestCompleted() {
    if (xmlhttp.readyState == 4) {
        try {
            document.getElementById('routelistinfo').innerHTML = xmlhttp.responseText + '<p><input id="deletelocation" type="button" value="Clear" onclick="DeleteBuilding();DeleteLocation();DeleteRoute();DeleteBtoBDirections();" /></p>';
            //alert(document.getElementById('routelistinfo').innerHTML);
            //alert(xmlhttp.responseText);
            //eval(xmlhttp.responseText);
        }
        catch (e) {
        }
    }
}
// end added 8-29-2009