
    <!-- Hide script
     function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
		
		//var center = new GPoint( (myLngHigh+myLngLow)/2, (myLatHigh+myLatLow)/2 );
		//var delta = new GSize( myLngHigh-myLngLow+1, myLatHigh-myLatLow+1);
		
		//var center = new GPoint( 43.660618, -79.49205 );
		//var delta = new GSize( 1, -1);
		
		//document.write (delta);
        //document.write (center);

		
		



		//var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize);

		//map.centerAndZoom(center, minZoom); 
		

		map.setCenter(new GLatLng(0, 0), 0);
		map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
		map.setMapType(G_HYBRID_MAP);
		var bounds = new GLatLngBounds();
		 
		
		// Create our "tiny" marker icon
	var blueIcon = new GIcon(G_DEFAULT_ICON);
	blueIcon.image = "bluedot3sm.png";
	blueIcon.shadowSize = new GSize(1, 1);
                
	// Set up our GMarkerOptions object
	markerOptions = { icon:blueIcon };



function createMarker(point, number,theLat,theLng,theSpd,theTS,thePic,theWidth,theHeight) {
  var marker = new GMarker(point);
 
  marker.value = number;
  GEvent.addListener(marker, "click", function() { 
    var myHtml = "<b>#" + number + "</b>" + "<img src=\"" + thePic + "\" width=" +theWidth+" height="+theHeight+"><br>" +"<br>Date/Time: " + theTS + "<br>Lat: "+ theLat + "<br>Lng: " + theLng  +"<br>Spd: " + theSpd;
    map.openInfoWindowHtml(point, myHtml);
  });
  return marker;
}



function createOMarker(point, number,theLat,theLng,theSpd,theTS,moptions) {
  var marker = new GMarker(point, moptions);
 
  marker.value = number;
  GEvent.addListener(marker, "click", function() { 
    var myHtml = "<b>#" + number + "</b><br/>" +"<br>Date/Time: " + theTS + "<br>Lat: "+ theLat + "<br>Lng: " + theLng  +"<br>Spd: " + theSpd;
    map.openInfoWindowHtml(point, myHtml);
  });
  return marker;
}





       
		for (var i = (myNumPoints-1); i >=0 ; i--) {
          var point = new GLatLng(myLats[i],myLngs[i]);
		  bounds.extend(point);
		 if (i>0) { var polyline = new GPolyline([new GLatLng(myLats[i-1],myLngs[i-1]),new GLatLng(myLats[i],myLngs[i])], "#ff0000", 10);
map.addOverlay(polyline);
			}
								  						  
			if (i==0) {
			map.addOverlay(createMarker(point, i + 1,myLats[i],myLngs[i],mySpds[i],myTS[i],mypict,mypicw,mypich));
			}
			else {
			
			map.addOverlay(createOMarker(point, i + 1,myLats[i],myLngs[i],mySpds[i],myTS[i],markerOptions));
			
			}
		
        }
      
	  
	// ===== determine the zoom level from the bounds =====
          //map.setZoom(map.getBoundsZoomLevel(bounds)-1);
		   map.setZoom(map.getBoundsZoomLevel(bounds)-myViewScale);  

          // ===== determine the centre from the bounds ======
          map.setCenter(bounds.getCenter());
		  //map.setCenter(new GmyLats[0],myLngs[0]);

	   //Plot any GeoFences
//	for (var j = 0; j < myNumGeos; j++) {
	 
//	 var lat = myGeosLats[j+1];
//  var lon = myGeosLngs[j+1];
  //
//  if (myGeoSizes[j+1]==100) {
//  var latOffset = 0.0005;  //100m
//  var lonOffset = 0.0005;}  //100m
//   if (myGeoSizes[j+1]==500) {
//  var latOffset = 0.0025;  //500m
//  var lonOffset = 0.0025;}  //500m
//   if (myGeoSizes[j+1]==1000) {
//  var latOffset = 0.005;  //1000m
//  var lonOffset = 0.005;}  //1000m
//  
//  var polygon = new GPolygon([
//    new GLatLng(lat, lon - lonOffset),
//    new GLatLng(lat + latOffset, lon),
//    new GLatLng(lat, lon + lonOffset),
//    new GLatLng(lat - latOffset, lon),
//    new GLatLng(lat, lon - lonOffset)
//  ], "#f33f00", 5, 1, "#ff0000", 0.2);
//  map.addOverlay(polygon);
 
//	}   // end of Geofences for loop
	  
	  
	  }
    }
	//stop hiding -->

    
	

	

