﻿var map;
var churchPinLocation = new VELatLong(35.756781, -83.971579);
function body_OnLoad()
{
	map = new VEMap("map");
	map.LoadMap(churchPinLocation, 17);
	map.AttachEvent("onobliqueenter", OnObliqueEnterHandler); 
	
	// Pushpin for the church
	map.AddPushpin(new VEPushpin(
		1, 
		new VELatLong(35.756900, -83.971400),
		null,
		"Grace Community Church",
		"161 East Harper Avenue<br/>Maryville, TN 37802",
		"virtualEarthMarkerStyle"));
	
	// Pushpin for the church
	map.AddPushpin(new VEPushpin(
		2, 
		new VELatLong(35.757300, -83.971250),
		"../Common/Images/Icons/Parking1.png",
		"Parking Lot 1",
		"Just east of the church. On McAmmon facing the Greenbelt",
		"virtualEarthMarkerStyle"));
	
	// Pushpin for the parking lot 2
	map.AddPushpin(new VEPushpin(
		3, 
		new VELatLong(35.756400, -83.972100),
		"../Common/Images/Icons/Parking2.png",
		"Parking Lot 2",
		"First Tennessee parking area. On the corner of Harper and Calderwood",
		"virtualEarthMarkerStyle"));
	
	// Pushpin for the parking lot 2
	map.AddPushpin(new VEPushpin(
		4, 
		new VELatLong(35.756600, -83.971350),
		"../Common/Images/Icons/Parking3.png",
		"Parking Lot 3",
		"On Harper across from the townhouses",
		"virtualEarthMarkerStyle"));

}

function OnObliqueEnterHandler() {
	if (map.IsBirdseyeAvailable()) {
		map.SetBirdseyeScene(churchPinLocation);
	}
}

if (window.attachEvent)
{
	window.attachEvent("onload", body_OnLoad);
}
