//<![CDATA[
           var WINDOW_HTML = '<div><strong>Camping de l\'Aigle **<\/strong><br />Quartier Saint-Pierre<br />83630 AIGUINES<br />VAR<br />Tél. : 04 94 84 23 75<\/div>';


            function placeMarker(map, myLatlng, titre,contenu) {
                var marker = new google.maps.Marker({
                    position: myLatlng,
                    map: map,
                    title:titre
                });

                var infowindow = new google.maps.InfoWindow({
                    content: contenu
                });

                google.maps.event.addListener(marker, 'click', function() {
                    infowindow.open(map,marker);
                });

                infowindow.open(map, marker);
            }

								var directionDisplay;
								var directionsService = new google.maps.DirectionsService();
								var latlng;
								
            function initialize() {
                ///map 1
                latlng = new google.maps.LatLng(43.7756451, 6.2434680); 
                var myOptions = {
                    zoom: 12,
                    center: latlng,
                    mapTypeControl:false,
                    mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},					
                    navigationControl: true,
                    navigationControlOptions: {style: google.maps.NavigationControlStyle.ZOOM_PAN,
					position: google.maps.ControlPosition.TOP_RIGHT
					
					},
					scaleControl: true,
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                };
                //var map = new google.maps.Map(document.getElementById("map"), myOptions);


								  if ($("#map_canvas").length>0) {
								  directionsDisplay = new google.maps.DirectionsRenderer();

									var mapiti = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
									placeMarker(mapiti, latlng, "Quartier Saint-Pierre, AIGUINES",WINDOW_HTML);
									directionsDisplay.setMap(mapiti);
									directionsDisplay.setPanel(document.getElementById("directionsPanel"));
									}
								}
								
								function calcRoute() {
									var start = document.getElementById("start").value;
									//var end = document.getElementById("end").value;
									var request = {
										origin:start, 
										destination:latlng,
										travelMode: google.maps.DirectionsTravelMode.DRIVING
									};
									directionsService.route(request, function(response, status) {
										if (status == google.maps.DirectionsStatus.OK) {
											directionsDisplay.setDirections(response);
										}
									});
								}
								
								$("#start").live("keypress", function(e) {
										/* ENTER PRESSED*/
										if (e.keyCode == 13) {
												$("#ok").trigger('click');
										}
								});

            //]]>
