﻿// JScript File

// This depends on the Google Maps API and will NOT work if the wrong Domain Key is used
// (Make sure to switch the key for the live site when we go live!)

function load() {
 if (GBrowserIsCompatible()) {
   var map = new GMap2(document.getElementById("map"));
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());
	map.addControl(new GScaleControl());
	map.addControl(new GOverviewMapControl());
	var point = new GLatLng(41.939526,-87.681499);
	map.setCenter(point, 16);
	
	// Our info window content
	var addressTab = document.getElementById("address");
	var infoTabs = [
	  new GInfoWindowTab("Leonie's", addressTab)
	];

	// Place a marker in the center of the map and open the info window
	var marker = new GMarker(map.getCenter());
	GEvent.addListener(marker, "click", function() {
	  marker.openInfoWindowTabs(infoTabs);
	});
	map.addOverlay(marker);
	map.setCenter(new GLatLng(41.940204,-87.681327), 16);
	marker.openInfoWindowTabs(infoTabs);		
 }
}