window.onload = function() {
	sageOffice = new MQA.LatLng(38.289911, -122.457346);
	myMap = new MQA.TileMap(document.getElementById('mapWindow'),12,sageOffice,"map");
	
	// Create a new Large Zoom control
	myLZControl = new MQA.LargeZoomControl;
	//tell the map to display the control we just attached
	myMap.addControl(myLZControl);
	myMap.setMapShadowState(true);
//	myMap.addControl(new MQA.TrafficControl());
	//Create a map view type control
	myVControl = new MQA.ViewControl(myMap);
	/*
	Display control - use the Corner placement constant to specify
	which corner, plus an MQA.Size object to specify X and Y "indent"
	offset
	*/
	myMap.addControl(myVControl, new MQA.MapCornerPlacement
	(MQA.MapCorner.BOTTOM_RIGHT, new MQA.Size(20,20)));
	
	pointer = new MQA.Poi(sageOffice);
//	bubbleContent = "<div style='width: 250px; height: 115px;'><img align='right' src='/images/sageMan.gif' style='width: 108px; height: 100px;'/><div style='border: 1px none ; margin: 0pt; font-family: sans-serif; font-size: 10pt;'><span style='font-size: 11pt; font-weight: bold;'>Sage Computing</span><br/>21B Patten Street<br/>Sonoma, CA 95476<br/>Phone: (707) 939-9890<br/>Fax: (707) 581-7357<br/>M-F: 8:00am-4:30pm<br/><a href='mailto:sageservice@sagecomputing.net'>sageservice@sagecomputing.net</a></div></div>";
	bubbleContent = "<div style='width: 250px; height: 115px;'><img align='right' src='/images/sageMan.gif' style='width: 108px; height: 100px;'/><div style='border: 1px none ; margin: 0pt; font-family: sans-serif; font-size: 10pt;'><span style='font-size: 11pt; font-weight: bold;'>Sage Computing</span><br/>21B Patten Street<br/>Sonoma, CA 95476<br/>Phone: (707) 939-9890<br/>Open Most Business Hours. Please call first.<br/><div style='text-align: center;'><a href='mailto:sageservice@sagecomputing.net'>sageservice@sagecomputing.net</a></div></div>";
	pointer.setValue('infoTitleHTML','Sage Computing');
	pointer.setValue('infoContentHTML',bubbleContent);
	
	//set icon for pointer
	//myIcon = new MQA.Icon("/images/sageman.gif", 40, 40);
	//pointer.setValue("icon",myIcon);
	
	//you can set a Key value to help keep track of the POIs you put on the map
	pointer.setValue('key','1A');
	//Add the POI to the map
	myMap.addShape(pointer);
	
	MQA.EventManager.addListener(myMap, 'dblclick', recenterOnClick);
	// Function to call when recentering map on double-click
	function recenterOnClick(e)
	{
	// To animate the map panning to the new center point, use...
	myMap.panToLatLng(e.ll);
	// To instantly move the map to the new center point, use...
	// myMap.setCenter(e.ll);
	};
	
	pointer.click();
}



