
////////////////////////////////
//Créateur : Yves Prince		yprince@odacia-studio.com
//Dernière Mise à jour : 4 décembre 2007
//Par : Yves Prince		yprince@odacia-studio.com
//
//Google map
////////////////////////////////

var mapNo=0;
function loadMap(lang,path)
{
	if(GBrowserIsCompatible())
	{
		var name='R&eacute;cr&eacute;ath&egrave;que';

		if(lang=='fr'){
			var startAddress='Adresse de d&eacute;part';
			var tel='T&eacute;l';
			var tollfree='Sans frais';
		}
		else{
			var startAddress='Start address';
			var tel='Tel';
			var tollfree='Toll free';
		}

        var map = new GMap2(document.getElementById('c_map'));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
        map.setCenter(new GLatLng(45.544512,-73.748321), 15);	//LAT LNG du point central de la carte, zoom
		var point = new GLatLng(45.541112,-73.748721);			//LAT LNG de la location voulu
		
		var icon = new GIcon();
		icon.image = path+'images/map/pointeur.png';
		icon.shadow = path+'images/map/ombre.png';
		icon.iconSize = new GSize(60.0, 81.0);
		icon.shadowSize = new GSize(100.0, 86.0);
		icon.iconAnchor = new GPoint(35.0, 75.0);
		icon.infoWindowAnchor = new GPoint(35.0, 75.0);
		
		var marker = new GMarker(point, icon);
		map.addOverlay(marker);
		
		texte='<b>La R&eacute;cr&eacute;ath&egrave;que</b>'+
		'<br/><br/>'+
		'900, boul. Cur&eacute;-Labelle<br/>'+
		'Laval, Qc, H7V 2V5<br/>'+
		tel+'. : 450.688.8880<br/>'+
		tollfree+' : 1.877.PLAISIR';
		
		texte += '<br/><br/><b>Directions: </b>' +
		'<br/><font size="2" face="Arial">'+startAddress+':</font>' +
		'<form action="http://maps.google.com/maps" method="get" target="_blank">' +
		'<input type="text" SIZE=30 MAXLENGTH=100 name="saddr" id="saddr" value="" />' +
		'<INPUT value="Go" TYPE="SUBMIT">' +
		'<input type="hidden" name="daddr" value="'+point.lat()+','+point.lng()+'('+name+')"/>' +
		'</form>';
		
		GEvent.addListener(marker, 'click', function(){
		marker.openInfoWindowHtml(texte);
		})
		
		mapNo++;
	}
}