
	function mostrarMarcados(cont,actual){

			for(i=0;i<cont;i++){
				$(document.getElementById('texto_marcado_'+i)).slideUp();
				document.getElementById('marcado_'+i).className = "banda_marcado";
			}


			if ($(document.getElementById('texto_marcado_'+actual)).is(":hidden")) {
			  $(document.getElementById('texto_marcado_'+actual)).slideDown("slow");
			  document.getElementById('marcado_'+actual).className = "banda_marcado_arriba";			  
			} else {
			  $(document.getElementById('texto_marcado_'+actual)).slideUp();
			}		
		
	}
	
	
	function marcarBorde(num){
		
		document.getElementById("celda_proyecto_"+num).className='contenido_proyectos_borde';
	}
	
	function quitarBorde(num){
		
		document.getElementById("celda_proyecto_"+num).className='contenido_proyectos';
	}	
	
	
	var noCate   = new Array();
	var contCate = 0;
	
	function mostarCategorias(cont,actual){

			for(i=0;i<cont;i++){
				$(document.getElementById('categoria_'+i)).slideUp();
				
				salir = 1;
				for(var j=0; j< noCate.length && salir; j++){
					if(noCate[j]==i) salir = 0;
				}
				

				if(salir)
					document.getElementById('familia_'+i).className = " ";
			}



			if ($(document.getElementById('categoria_'+actual)).is(":hidden")) {
			  $(document.getElementById('categoria_'+actual)).slideDown("slow");
			  document.getElementById('familia_'+actual).className = "fam_proyect_sel";			  
			} else {
			  $(document.getElementById('categoria_'+actual)).slideUp();
			}		
		
	}
		
		
		

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

	 var texto_datos;	 

    function initialize(tipo) {

      map = new GMap2(document.getElementById("mapa_proyecto"));
		
    	pointAdresse = new GLatLng(lat, lng);
		
		if(tipo==0)
      	map.setCenter(pointAdresse, 15,G_SATELLITE_MAP);
		else
      	map.setCenter(pointAdresse, 10,G_SATELLITE_MAP);		
		
      map.setUIToDefault();
		
	   geocoder = new GClientGeocoder();
	
	//	map.addControl(new GLargeMapControl());

		tipoMapa = 1;
		
		
		var extension = "png";
   		
		icon = new GIcon();
		if(tipo==0)
			icon.image = "http://cristaleriasoler.com/mapa." + extension;
		else
			icon.image = "http://cristaleriasoler.com/mapa." + extension;
			
		icon.iconSize = new GSize(20, 34);
		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;

}


		
		

	function mostrarAvisoLegal(cont,actual){

			for(i=0;i<cont;i++){
				$(document.getElementById('texto_'+i)).slideUp();
			}


			if ($(document.getElementById('texto_'+actual)).is(":hidden")) {
			  $(document.getElementById('texto_'+actual)).slideDown("slow");
			} else {
			  $(document.getElementById('texto_'+actual)).slideUp();
			}		
		
	}
			

function mostrasPestanyas(actual,total){
		for(i=0;i<total;i++){
			document.getElementById('pestanya_'+i+'_0').className = 'pestanya_izq';
			document.getElementById('pestanya_'+i+'_1').className = 'contenido_pestanya';
			document.getElementById('pestanya_'+i+'_2').className = 'pestanya_dcha';
			document.getElementById('contenido_pestanya_'+i).className = 'noMostrar';
		}
		document.getElementById('pestanya_'+actual+'_0').className = 'pestanya_izq pestanya_izq_s';
		document.getElementById('pestanya_'+actual+'_1').className = 'contenido_pestanya pestanya_sel';
		document.getElementById('pestanya_'+actual+'_2').className = 'pestanya_dcha pestanya_dcha_s';
		document.getElementById('contenido_pestanya_'+actual).className = '';	
		
		return false;
		
}
