	function cambiaOpcion(tipo){


		if(tipo=="cte"){
			document.getElementById("cuota_anual").className     = "noMostrar";
			document.getElementById("cuota_cte").className       = "texto_tituloG";
			document.getElementById("cuota_creciente").className = "textoGrisClaro";
		}
		else if(tipo=="creciente"){
			document.getElementById("cuota_anual").className     = "fila_cal";
			document.getElementById("cuota_cte").className       = "textoGrisClaro";
			document.getElementById("cuota_creciente").className = "texto_tituloG";
				
		}
		
	}
	
	
	function abrePDF(enlace){
		window.open("img/promociones/planos/"+enlace);
	}
	


    var map;
    var geocoder;
    var address;
	 var tipoMapa = 0;

	 var texto_datos;	 

    function initialize(tipo) {

      map = new GMap2(document.getElementById("map_canvas"));
		
    	pointAdresse = new GLatLng(lat, lng);
		
		if(tipo==0)
      	map.setCenter(pointAdresse, 12,G_HYBRID_MAP);
		else if(tipo==1)
      	map.setCenter(pointAdresse, 10,G_NORMAL_MAP);		
		else 
		map.setCenter(pointAdresse, 10,G_NORMAL_MAP);	
		
      map.setUIToDefault();
	  map.disableScrollWheelZoom()
		
	   geocoder = new GClientGeocoder();
	
	//	map.addControl(new GLargeMapControl());

		tipoMapa = 1;
		
		
		var extension = "png";
   		
		icon = new GIcon();
		if(tipo==1)
			icon.image = "http://www.maisa.es/img/icon_map2." + extension;			
		else
			icon.image = "http://www.maisa.es/img/icon_map1." + extension;
		icon.iconSize = new GSize(36, 44);
		icon.shadowSize = new GSize(38, 34);
		icon.iconAnchor = new GPoint(10, 34);
		icon.infoWindowAnchor = new GPoint(5, 1);

    	map.checkResize();
            
    //	addMarker(lat, lng, icon);

      geocoder = new GClientGeocoder();
            
      map.checkResize();
            
        
	}
	
	    function createMarker(latlng,img) {
	      number++;
	      var marker = new GMarker(latlng,{ icon:img });
			bounds.extend(marker.getPoint());


	      return marker;
		}
	
		function addMarker(latGM,lngGM,img) {
		    var latlng = new GLatLng(latGM, lngGM);
			 var marker =  createMarker(latlng,img);
		    map.addOverlay(marker); 

	 
			 return marker;
		}
		
		function toggleMarker(nomMarker,opt) {

			if (markers[nomMarker]){ //vérifier que le marker existe ! sinon erreur javascript
				if(opt == "hide")
					markers[nomMarker].hide();
				else if(opt == "show"){
					markers[nomMarker].show();
				}
			}
	    }



var direccion = "";
function obtenerDatos(marker,point,id,nombre){
	
	

//	marker.openInfoWindowHtml(nombre);
	document.location = 'ficha_promocion.php?id='+id;

}



