var icon_ville1 = new GIcon();
icon_ville1.image = "http://www.LePetitDragonRouge.com/images/map/push_rouge.png";
icon_ville1.iconSize = new GSize(16, 28);
icon_ville1.iconAnchor = new GPoint(8, 28);
icon_ville1.infoWindowAnchor = new GPoint(8, 8);

var icon_ville2 = new GIcon();
icon_ville2.image = "http://www.LePetitDragonRouge.com/images/map/push_bleu.png";
icon_ville2.iconSize = new GSize(14, 24);
icon_ville2.iconAnchor = new GPoint(7, 24);
icon_ville2.infoWindowAnchor = new GPoint(7, 7);

var icon_photo = new GIcon();
icon_photo.image = "http://www.LePetitDragonRouge.com/images/map/photo.png";
icon_photo.iconSize = new GSize(18, 18);
icon_photo.iconAnchor = new GPoint(9, 18);
icon_photo.infoWindowAnchor = new GPoint(9, 9);

var icon_photo2 = new GIcon();
icon_photo2.image = "http://www.LePetitDragonRouge.com/images/map/photo2.png";
icon_photo2.iconSize = new GSize(25, 25);
icon_photo2.iconAnchor = new GPoint(12, 25);
icon_photo2.infoWindowAnchor = new GPoint(12, 12);

var icon_hotel = new GIcon();
icon_hotel.image = "http://www.LePetitDragonRouge.com/images/map/hotel_gg.gif";
icon_hotel.iconSize = new GSize(33, 33);
icon_hotel.iconAnchor = new GPoint(16, 16);
icon_hotel.infoWindowAnchor = new GPoint(16, 16);

var icon_parking = new GIcon();
icon_parking.image = "http://www.LePetitDragonRouge.com/images/map/parking_gg.gif";
icon_parking.iconSize = new GSize(21, 21);
icon_parking.iconAnchor = new GPoint(10, 10);
icon_parking.infoWindowAnchor = new GPoint(10, 10);

var icon_gare = new GIcon();
icon_gare.image = "http://www.LePetitDragonRouge.com/images/map/gare_gg.gif";
icon_gare.iconSize = new GSize(21, 21);
icon_gare.iconAnchor = new GPoint(10, 10);
icon_gare.infoWindowAnchor = new GPoint(10, 10);

var icon_aero = new GIcon();
icon_aero.image = "http://www.LePetitDragonRouge.com/images/map/aero_gg.gif";
icon_aero.iconSize = new GSize(21, 21);
icon_aero.iconAnchor = new GPoint(10, 10);
icon_aero.infoWindowAnchor = new GPoint(10, 10);

var icon_porte = new GIcon();
icon_porte.image = "http://www.LePetitDragonRouge.com/images/map/porte_gg.gif";
icon_porte.iconSize = new GSize(21, 21);
icon_porte.iconAnchor = new GPoint(10, 10);
icon_porte.infoWindowAnchor = new GPoint(10, 10);

var icon_metro = new GIcon();
icon_metro.image = "http://www.LePetitDragonRouge.com/images/map/metro_gg.gif";
icon_metro.iconSize = new GSize(21, 21);
icon_metro.iconAnchor = new GPoint(10, 10);
icon_metro.infoWindowAnchor = new GPoint(10, 10);

var icon_annonce = new GIcon();
icon_annonce.image = "http://www.LePetitDragonRouge.com/images/map/push_bleu.png";
icon_annonce.iconSize = new GSize(14, 24);
icon_annonce.iconAnchor = new GPoint(7, 24);
icon_annonce.infoWindowAnchor = new GPoint(7, 7);

var icon_poly = new GIcon();
//icon_poly.image = "http://www.LePetitDragonRouge.com/images/map/icon10.png";
icon_poly.image = "http://www.LePetitDragonRouge.com/images/map/icon2.png";
icon_poly.iconSize = new GSize(32, 32);
icon_poly.iconAnchor = new GPoint(16, 16);
icon_poly.infoWindowAnchor = new GPoint(16, 16);

var icon_drapeau = new GIcon();
icon_drapeau.image = "http://www.LePetitDragonRouge.com/images/map/drapeau.png";
icon_drapeau.iconSize = new GSize(21, 32);
icon_drapeau.iconAnchor = new GPoint(1, 32);
icon_drapeau.infoWindowAnchor = new GPoint(10, 10);

var icon_tour_paris = [];
for(var h=1; h<=15; h++){
	icon_tour_paris[h] = new GIcon();
	icon_tour_paris[h].image = "http://www.LePetitDragonRouge.com/images/map/paris_c" + h + ".png";
	icon_tour_paris[h].iconSize = new GSize(18, 18);
	icon_tour_paris[h].iconAnchor = new GPoint(9, 18);
	icon_tour_paris[h].infoWindowAnchor = new GPoint(9, 9);
}

var map;
function myzoom(a) {
	a > 0 ? map.zoomIn('', false, true): map.zoomOut('', true);
}

function mymove(a,b) {
	map.panDirection(a,b);
}

function affiche_marker(i) {
	map.panTo(aMarkers[i].getPoint());
	aMarkers[i].openInfoWindowHtml(aMarkersHtml[i]);
	aMarkers[i].setImage(icon_ville1.image);
}

function affiche_marker2(i) {
	map.panTo(aMarkers[i].getPoint());
	aMarkers[i].openInfoWindowHtml(aMarkersHtml[i]);
}

function revert_marker(i) {
	aMarkers[i].setImage(icon_annonce.image);
}

function wheelZoom(a) {
	if (!a) a = window.event; 
	if (a.preventDefault) a.preventDefault(); 
	a.returnValue = false; 

	//if(a.cancelable){
	//	a.preventDefault();
	//}
	//(a.detail || -a.wheelDelta) < 0 ? map.zoomIn('', false, true): map.zoomOut('', true);
	//return false;
}

function changeType(a){
	if(a=='satellite'){
		map.setMapType(G_SATELLITE_MAP);
	}

	if(a=='map'){
		map.setMapType(G_NORMAL_MAP);
	}

	if(a=='hybrid'){
		map.setMapType(G_HYBRID_MAP);
	}
}

function createMarker(point, contenu_html, vide, index_gg, type_icon) {
	var marker = new GMarker(point, type_icon);
	GEvent.addListener(marker, "mouseover", function() {
		marker.openInfoWindowHtml(contenu_html);
	});
	return marker;
}



function createMarker2(point, contenu_html, vide, index_gg, type_icon) {
	var marker = new GMarker(point, type_icon);
	GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(contenu_html);
	});
	aMarkers[index_gg] = marker;
	aMarkersHtml[index_gg] = contenu_html;
	return marker;
}
var aMarkers = new Array();
var aMarkersHtml = new Array();

function createDragMarker(point, contenu_html, vide, index_gg, type_icon) {
	var marker = new GMarker(point, {draggable: true});
	GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(contenu_html);
	});
	return marker;
}

var icon_prov = new Array();
for(var i=0; i<=28; i++){
	icon_prov[i] = new GIcon();
	icon_prov[i].image = "http://www.LePetitDragonRouge.com/images/map/" + i + ".png";
	icon_prov[i].iconSize = new GSize(18, 18);
	icon_prov[i].iconAnchor = new GPoint(9, 9);
	icon_prov[i].infoWindowAnchor = new GPoint(9, 9);
}




