google.load("maps","2");
var NomSociete = 'Camping la Prairie';
var Adresse = '146 Rue du Moulin Cassé';
var CodePostal = '85160 ';
var Ville = 'Saint Jean de Monts ';
var Tel= '02 51 58 16 04';
var Dept="Vend&eacute;e";
var LatitudeDestination = '46.804231';
var LongitudeDestination = '-2.092981';
var formulaire_itineraire ='<div style="width:350px; height:200px; border: 1px solid #ccc; text-align:center;  font: 14px \'trebuchet ms\',verdana, helvetica, sans-serif;">' +
		'<br /><b>Indiquez votre adresse de départ ci-dessous : </b>' +
		'<form action="http://maps.google.com/maps" method="get" target="_blank" style="margin:0;padding;0">' +
		'<input type="text" name="saddr" id="saddr" value="" style="width:300px; height:20px; border:1px solid grey;" /><br />' +
		'<b>Adresse d\'arriv&eacute;e : </b><br />'+NomSociete+'<br />'+Adresse+'<br />'+CodePostal+' '+Ville+'<br />'+Tel+'<br />'+Dept+'<br />' +
		'<input value="votre itinéraire avec Google Maps" type="submit">' +
		'<input type="hidden" name="daddr" value="'+LatitudeDestination+','+LongitudeDestination+'"/>'+
		'</form>' +
		'</div>';
 
/* Fonction permettant la création du marker */
function createMarker(point) {
	var marker = new google.maps.Marker(point);
// formulaire_itineraire
		
		
	google.maps.Event.addListener(marker, 'click', function() {
		
		marker.openInfoWindowHtml(formulaire_itineraire);
	});
	return marker;
 
}
 
function initialize() {
if (google.maps.BrowserIsCompatible()) {
var MaCarte = new google.maps.Map2(document.getElementById('map'));
MaCarte.addControl(new google.maps.SmallMapControl());
MaCarte.addControl(new google.maps.MenuMapTypeControl());
MaCarte.setCenter(new google.maps.LatLng(LatitudeDestination,LongitudeDestination), 12);
var point = new google.maps.LatLng(LatitudeDestination,LongitudeDestination);
var Mar = createMarker(point)
MaCarte.addOverlay(Mar);
Mar.openInfoWindowHtml(formulaire_itineraire);
}else{
alert("Désolé, mais votre navigateur n\'est pas compatible avec Google Maps");
}
}

google.setOnLoadCallback(initialize);
