var map;
var gdir;
var point;
var marker;

/*
 * Google Map JavaScript
 */
function load() {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"));
		//center map on Vue-Craft location: (new GLatLng(43.706120,-79.476385), 15)
		map.setCenter(new GLatLng(43.707060,-79.476455), 15);
		//create zoom and center controls on map
		map.addControl(new GLargeMapControl());
		//create map, satellite, and hybrid map types
		map.addControl(new GMapTypeControl());
		//small map overview in bottom right corner
		//map.addControl(new GOverviewMapControl());

		//add a marker for Vue-Craft location: (Lat:43.706060 ; Lang:-79.476455)
		point = new GLatLng(43.706060,-79.476455);
		marker = new GMarker(point);

		//add info window on marker click
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml("<strong>Vue-Craft Products Ltd.</strong><p id=\"iWindow\">15 Colville Road<br />Toronto, ON M6M 2Y2</p>");
		});


		//add marker to map
		map.addOverlay(marker);
							
	}
}

/*
 *	Clears the input fields of the default text
 */
function clearField(el) {	
	if (el.defaultValue == el.value) {
		el.value="";
	}		
}
