function Map(id_map, option, controleurs) {
	
	
	this.map = null;
	this.cursorScroll_id = "";
	this.fondScroll_id = "";
	this.max_zoom = 19;
	this.dragZoomControl = null;
	this.controlMeteo = null;
	this.stylesIconeRegroup = [];
		
	this.controlReperageDiv = false;
		
	this.dragZoom = null;
	this.controlDragZoom = false;
	this.dragZoomButtonID = null ;
	
	this.map_id = id_map;
			
			try
			{
				this.map = new google.maps.Map2(document.getElementById(this.map_id), {backgroundColor:"#9CB2CE"});
				this.map.setCenter(new GLatLng(45.4673, 5.9951), 5);
				
				var parent = this;
				GEvent.addListener(this.map, 'zoomend', function(oldLevel, newLevel) {
					parent.placeCursorScroll(newLevel);
				});
			
			
		
		if(option != null && typeof(option) == 'object'){
			if(typeof(option.sroll) != 'undefined'){
				if(option.sroll){
					this.map.enableScrollWheelZoom();
				}
				else{
					this.map.disableScrollWheelZoom();
				}
			}
			
			if(typeof(option.doubleClick) != 'undefined'){
				if(option.doubleClick){
					this.map.enableDoubleClickZoom() ;
				}
				else{
					this.map.disableDoubleClickZoom() ;
				}
			}
		}
			
			
		if(controleurs != null && typeof(controleurs) == 'object'){
			if(typeof(controleurs.large) != 'undefined'){
				if(controleurs.large){
					this.map.addControl(new GLargeMapControl());
					
				}
				
			}
			
			if(typeof(controleurs.small) != 'undefined'){
				if(controleurs.small){
					this.map.addControl(new GSmallMapControl());
					
				}
				
			}
			if(typeof(controleurs.zoom) != 'undefined'){
				if(controleurs.zoom){
					this.map.addControl(new GSmallZoomControl());
					
				}
				
			}
			if(typeof(controleurs.scale) != 'undefined'){
				if(controleurs.scale){
					this.map.addControl(new GScaleControl());
					
				}
				
			}
			if(typeof(controleurs.controltype) != 'undefined'){
				if(controleurs.controltype){
					this.map.addControl(new GMapTypeControl());
					
				}
				
			}
			if(typeof(controleurs.miniMap) != 'undefined'){
				if(controleurs.miniMap){
					this.map.addControl(new GOverviewMapControl());
				}
				
			}
		}
			
		
			
			
				
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter sur l'initialisation de la Gmap (class gmapNQ)",e)
			}
			
}


	
		Map.prototype.set = function (map) 
		{
			 this.map = map;
		}



	Map.prototype.desactiveDragZoom = function ()
	{
		this.controlDragZoom = false;
		//document.getElementById('rect_crop_zoom').className = "btn_crop_map ie6fix";
		
	}



		Map.prototype.initZoom = function (id_zoom_plus, id_zoom_moins)
		{
			//GEvent.addListener(id_zoom_plus, 'click', function() { alert('ok')});
				var parent = this;
				if(id_zoom_plus != null ){GEvent.addDomListener(document.getElementById(id_zoom_plus), 'click', function() { parent.zoom('plus'); })};
				if(id_zoom_moins != null ){GEvent.addDomListener(document.getElementById(id_zoom_moins), 'click', function() { parent.zoom('moins'); })};
		}
		
		Map.prototype.initMove = function (id_gauche_depla,id_haut_depla,id_droite_depla,id_bas_depla)
		{
			var parent = this;
				if(id_droite_depla != null ){GEvent.addDomListener(document.getElementById(id_droite_depla), 'click', function() { parent.deplace('right'); })};
				if(id_gauche_depla != null ){GEvent.addDomListener(document.getElementById(id_gauche_depla), 'click',  function() { parent.deplace('left'); })};
				if(id_haut_depla != null ){GEvent.addDomListener(document.getElementById(id_haut_depla), 'click',  function() { parent.deplace('up'); })};
				if(id_bas_depla != null ){GEvent.addDomListener(document.getElementById(id_bas_depla), 'click',  function() { parent.deplace('down'); })};
		}
		
		Map.prototype.initType = function (id_sat,id_physic,id_hybride,id_normal, dragZoomButton)
		{
			var parent = this;
				if(id_sat != null ){GEvent.addDomListener(document.getElementById(id_sat), 'click',function() { parent.changeType('sattellite'); })};
				if(id_physic != null ){GEvent.addDomListener(document.getElementById(id_physic), 'click', function() { parent.changeType('physic'); })};
				if(id_hybride != null ){GEvent.addDomListener(document.getElementById(id_hybride), 'click', function() { parent.changeType('hybride'); })};
				if(id_normal != null ){GEvent.addDomListener(document.getElementById(id_normal), 'click', function() { parent.changeType('normal'); })};
			
				if(dragZoomButton != null ){GEvent.addDomListener(document.getElementById(dragZoomButton), 'click', function() {  parent.dragZoomControlleur(); })};
				if(dragZoomButton != null ){this.dragZoomButtonID  = dragZoomButton};
			
		}
		
		Map.prototype.initScrollZoom = function(id_scroll, id_fond)
		{
				var parent = this;
				this.cursorScroll_id = id_scroll;
				this.fondScroll_id = id_fond;
				this.placeCursorScroll(-1);
				GEvent.addDomListener(document.getElementById(id_fond), 'click', function(e){parent.clickFond(e,parent)});

		}
		
	
	

	Map.prototype.dragZoomControlleur = function()
	{
		if(!this.controlDragZoom)
		{
			this.dragZoom.initiateZoom();
			this.controlDragZoom = true;
			
		}
		else
		{
			this.dragZoom.initiateZoom();
			this.controlDragZoom = false;
			
		}
	}
	
		Map.prototype.clickFond = function(e,classParent) 
		{ 
			try
			{
				
				var hauteur_fond = document.getElementById(classParent.fondScroll_id).offsetHeight;
			   
			   var bord_haut_fond = utilsNQ.getY(classParent.fondScroll_id);
			   
			   var bord_haut_curseur= null ; 
			  if(typeof(e.pageY) != 'undefined')
			  {
			   	bord_haut_curseur = e.pageY;
			  }
			  else
			  {
				  bord_haut_curseur = e.clientY;
			  }
			   var delta = (hauteur_fond)-(parseInt(bord_haut_curseur) - parseInt(bord_haut_fond));
			   
			   var zoomSuiv = Math.abs(delta *19 / hauteur_fond);
		   		//alert(bord_haut_fond+"   "+bord_haut_curseur);
					
					//alert(delta+" *"+classParent.max_zoom+" / "+hauteur_fond);
					classParent.map.setZoom(parseInt(zoomSuiv));
					classParent.placeCursorScroll(parseInt(zoomSuiv));
				
				
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter le calcul du zoom quand on clique sur le scroll de la carte (class gmapNQ)",e)
			}
		}
		
		Map.prototype.placeCursorScroll = function(zoomParticulier)
		{
			try
			{
				
				var zoomEncour = 0;
				if(zoomParticulier == -1)
				{
					zoomEncour = this.map.getZoom();
				}
				else
				{
					zoomEncour = zoomParticulier;
				}
				
				if(this.fondScroll_id != null && this.fondScroll_id != "" && typeof(document.getElementById(this.fondScroll_id)) != 'undefined'){
					var hauteurFond = document.getElementById(this.fondScroll_id).offsetHeight;
			   
					var hauteurJauge = (hauteurFond/19)*zoomEncour;
					document.getElementById(this.cursorScroll_id).style.height = hauteurJauge+'px';
					
				}
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter durant l'affectation d'un zoom nouveau au scroll (class gmapNQ)",e)
			}
			
		}
		
		Map.prototype.zoom =function (type)
		{
			try
			{
				if(this.map.getZoom() > 0 && this.map.getZoom() < 19)
				{
					if(type == 'plus') { this.map.zoomIn();} else { this.map.zoomOut(); };
				}
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter durant le zoom sur la carte (class gmapNQ)",e)
			}
			
				this.placeCursorScroll(-1);
			
		}

		Map.prototype.deplace = function (type)
		{
			try
			{
				switch(type)
				{
					case 'up':
						deplacement = new GSize(0,100);
						break;
					case 'down':
						deplacement = new GSize(0,-100);
						break;
					case 'left':
						deplacement = new GSize(100,0);
						break;
					case 'right':
						deplacement = new GSize(-100,0);
						break;
				}
				this.map.panBy(deplacement);
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter durant le deplacement de la carte (class gmapNQ)",e)
			}
			
		}

		Map.prototype.changeType = function (type)
		{
			try
			{
				switch(type)
				{
					case 'hybride':
						this.map.setMapType(G_HYBRID_MAP);
						break;
					case 'normal':
						this.map.setMapType(G_NORMAL_MAP);
						break;
					case 'sattellite':
						this.map.setMapType(G_SATELLITE_MAP);
						//G_SATELLITE_3D_MAP
						break;
					case 'physic':
						this.map.setMapType(G_PHYSICAL_MAP);
						break;
				}
			}
			catch(e)
			{
				utilsNQ.debug("Une erreur a été detecter durant le changement de type de la carte (class gmapNQ)",e)
			}
		}
		
		Map.prototype.getMap = function ()
		{
			return this.map;
		}
		
		Map.prototype.LocaliseEntreprise = function(texte, lat, long, zoom, ic){
			
			var kiconImg = new GIcon();
			kiconImg.image = ic.img;
			kiconImg.iconSize = new GSize(ic.width,ic.height);
			kiconImg.shadowSize= new GSize(0,0);
			kiconImg.iconAnchor = new GPoint(ic.x,ic.y);
			kiconImg.infoWindowAnchor = new GPoint(0,0);
			this.map.setCenter(new GLatLng(lat,long));
			this.map.setZoom(zoom);
			var marker = new GMarker(new GLatLng(lat, long),{icon:kiconImg});	
			marker.texte = texte;
			
			var parent = this;
			GEvent.addListener(marker, 'click', function()  {
				this.openInfoWindow(this.texte);										 
			});
			this.map.addOverlay(marker);
			marker.openInfoWindow(texte);		
			
		}
