function GMap_ReadKml(filename, lat, lon, zoom)
{	// Read the data from kml file    
	GMap_removeOverlay();
	map.clearOverlays();
	
	// Create the tilelayer
	var tilelayer = new GTileLayer(new GCopyrightCollection(), 0, 17);
	
	// Set the getTileUrl to use the
	// Google KML tile processor with 	
	// our KML file 
	tilelayer.getTileUrl =  function(a,b) 
					{
						b=this.maxResolution()-b;
        					return "http://maps.google.com/mapsdt?id="+filename+"&x="+a.x+"&y="+a.y+"&zoom="+b;
					}
	tilelayer.isPng      = function() 
					{
						return true;
					} 
	
	// === add a GTileLayerOverlay to it ===
	map.setCenter(new GLatLng(lat, lon), zoom, map.getCurrentMapType()); 
	var nogentOV 	= new GTileLayerOverlay(tilelayer);
	activeOV.push(nogentOV);
	map.addOverlay( nogentOV );
}

function GMap_removeOverlay()
{
	x =  activeOV.length;
	for ( var y = 0; y < x; y++) 
	{
		map.removeOverlay(activeOV.pop());
	}
}