var GEO_PRV_CARTE = null;
var URL_IMAGE = "http://www.iag-agi.org/_rsc/images/geolocalisation/";

function GEO_InitCarte() {
	GEO_PRV_CARTE = new YMap(document.getElementById('GEO_ID_CARTE'));
	GEO_PRV_CARTE.setMapType(YAHOO_MAP_REG);
	GEO_PRV_CARTE.addZoomLong();
	GEO_PRV_CARTE.addPanControl();
        GEO_PRV_CARTE.drawZoomAndCenter(new YGeoPoint(7.10992,17.90625), 15);
}

function GEO_CreateMarqueur(lat, lon, titre,nombre,code) {
        var geoPoint = new YGeoPoint(lat, lon);
        var image1 = new YImage(URL_IMAGE + "marqueur-normal.png",new YSize(20,20), new YCoordPoint(11,21),new YCoordPoint(-8,4));
        var image2 = new YImage(URL_IMAGE +  "marqueur-actif.png",new YSize(20,20), new YCoordPoint(11,21),new YCoordPoint(-8,4));
        var marqueur = new YMarker(geoPoint, image1);
        marqueur.disableAutoContain();
        //marqueur.setSmartWindowColor("green");
        YEvent.Capture(marqueur, EventsList.MouseClick,
                   function(){  
                   zoomPays(code);  
        });
        YEvent.Capture(marqueur, EventsList.MouseOut,
                   function(){  
                   marqueur.changeImage(image1);
                   marqueur.closeSmartWindow();
                   
        });
        YEvent.Capture(marqueur, EventsList.MouseOver,
                   function(){  
                   marqueur.changeImage(image2);
                   marqueur.openSmartWindow(titre);
        });
       // var marqueur = new YMarker(geoPoint);
       marqueur.addLabel("<span style=\"color: white; font-weight: normal;\"/>" + nombre + "</span>");
        //marqueur.addAutoExpand(titre);
        GEO_PRV_CARTE.addOverlay(marqueur);
}


