// JavaScript Document

// GLOBAL_VARIABLES

var map ;
var gmwControl ;

var MAIN_LAT = 43.65872874896846 ;
var MAIN_LNG = -79.37926769256592 ;

function load()
{
	// check browser compatibility
	if (GBrowserIsCompatible())
	{
		// browser is compatible. create map
		//create a new map object
		map = new GMap2(document.getElementById("demoMap"));
		// add control to zoom in/out and pane using buttons
		map.addControl(new GLargeMapControl());
		//add control to switch between different types of map
		map.addControl(new GMapTypeControl());
		//set the map to show ryerson campus
		map.setCenter(new GLatLng(MAIN_LAT, MAIN_LNG), 3);
		
		gmwControl = new GMouseWheelControl() ;
		map.addControl(gmwControl) ;

	}
	else
	{
		// browser is not compatible. alert the user
		alert("Sorry, the Google Maps API is not compatible with this browser");
	}
}