﻿  function initialize() {
  
    var myLatlng = new google.maps.LatLng(46.430759,8.403168);
    var myOptions = {
      zoom: 12,
      center: myLatlng,
      navigationControl: true,      
      mapTypeId: google.maps.MapTypeId.HYBRID,
      scrollwheel:false      
    }
    
    var image = 'Immagini/Struttura/geoPointer/rifugi.png';
    
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    
    var llCoords=new Array();        
    llCoords[0] = new google.maps.LatLng(46.434766,8.428359); //maria luisa
    llCoords[1] = new google.maps.LatLng(46.423950,8.352047); //mores
    llCoords[2] = new google.maps.LatLng(46.420494,8.35315); //somma lombardo
    llCoords[3] = new google.maps.LatLng(46.423763,8.335131); //3a
    llCoords[4] = new google.maps.LatLng(46.414813,8.324901); //Claudio Bruno
    llCoords[5] = new google.maps.LatLng(46.434005,8.363128); //Busto
    llCoords[6] = new google.maps.LatLng(46.385262,8.365102); //Eugenio Margaroli
    llCoords[7] = new google.maps.LatLng(46.380940,8.389735); //Miryam
    llCoords[8] = new google.maps.LatLng(46.423851,8.403382); //Bimse

    
    var rName=new Array();
    rName[0]="Rifugio Maria Luisa";
    rName[1]="Rifugio Mores";
    rName[2]="Rifugio Somma Lombardo";
    rName[3]="Rifugio 3A";
	rName[4]="Rifugio Claudio Bruno";
	rName[5]="Rifugio Citt&agrave; Busto";
	rName[6]="Rifugio Eugenio Margaroli";
	rName[7]="Rifugio Miryam";
	rName[8]="Rifugio Bimse";

    var contentString=new Array();
    contentString[0] =	'<div><strong>'+rName[0]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[0]+'" alt="'+rName[0]+'" src="Immagini/Rifugi/marial.png" class="geoRifugiTipImage"/>'+ 
					    '<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.157 m</strong><br/> Località: <strong>lago Toggia</strong><br/> Posti letto: <strong>70</strong><br/><br/><a href="rifugi-formazza/MariaLuisa.php">Descrizione completa</a></div>'+
					    '</div>';					    
    contentString[1] =	'<div><strong>'+rName[1]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[1]+'" alt="'+rName[1]+'" src="Immagini/rifugi-formazza/mores.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.515 m</strong><br/> Località: <strong>lago dei Sabbioni</strong><br/> Posti letto: <strong>34</strong><br/><br/><a href="rifugi-formazza/CesareMores.php">Descrizione completa</a></div>'+
				    	'</div>';
    contentString[2] =	'<div><strong>'+rName[2]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[2]+'" alt="'+rName[2]+'" src="Immagini/Rifugi/sommalombardo.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.561 m</strong><br/> Località: <strong>lago dei Sabbioni</strong><br/> Posti letto: <strong>24</strong><br/><br/><a href="rifugi-formazza/SommaLombardo.php">Descrizione completa</a></div>'+
				    	'</div>';
    contentString[3] =	'<div><strong>'+rName[3]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[3]+'" alt="'+rName[3]+'" src="Immagini/Rifugi/3A.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.960 m</strong><br/> Località: <strong>ghiacciaio del Siedel</strong><br/> Posti letto: <strong>90</strong><br/><br/><a href="rifugi-formazza/3A.php">Descrizione completa</a></div>'+
				    	'</div>';	
    contentString[4] =	'<div><strong>'+rName[4]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[4]+'" alt="'+rName[4]+'" src="Immagini/Rifugi/claudiob.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.710 m</strong><br/> Località: <strong>ghiacciaio degli Stralgrat</strong><br/> Posti letto: <strong>90</strong><br/><br/><a href="rifugi-formazza/ClaudioBruno.php">Descrizione completa</a></div>'+
				    	'</div>';
    contentString[5] =	'<div><strong>'+rName[5]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[5]+'" alt="'+rName[5]+'" src="Immagini/Rifugi/busto.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.480 m</strong><br/> Località: <strong>piano dei Camosci</strong><br/> Posti letto: <strong>52</strong><br/><br/><a href="rifugi-formazza/busto.php">Descrizione completa</a></div>'+
				    	'</div>';
    contentString[6] =	'<div><strong>'+rName[6]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[6]+'" alt="'+rName[6]+'" src="Immagini/Rifugi/margaroli.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.194 m</strong><br/> Località: <strong>lago Vannino</strong><br/> Posti letto: <strong>50</strong><br/><br/><a href="rifugi-formazza/busto.php">Descrizione completa</a></div>'+
				    	'</div>';
    contentString[7] =	'<div><strong>'+rName[7]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[7]+'" alt="'+rName[7]+'" src="Immagini/Rifugi/Miryam.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>2.050 m</strong><br/> Località: <strong>valle del Vannino</strong><br/> Posti letto: <strong>50</strong><br/><br/><a href="rifugi-formazza/Miryam.php">Descrizione completa</a></div>'+
				    	'</div>';
	contentString[8] =	'<div><strong>'+rName[8]+'</strong></div><div><img style="width:200px; height:100px" title="'+rName[8]+'" alt="'+rName[8]+'" src="Immagini/Rifugi/Bimse.png" class="geoRifugiTipImage"/>'+ 
				    	'<div style="font-size:11px; padding-top:9px" >Altitudine: <strong>1.800 m</strong><br/> Località: <strong>lago Morasco</strong><br/> Posti letto: <strong>21</strong><br/><br/><a href="rifugi-formazza/bimse.php">Descrizione completa</a></div>'+
				    	'</div>';

        
    var infowindow =new Array();    
    var marker=new Array(); 
    
    for(var i=0; i<llCoords.length; i++){
    	infowindow[i]=new google.maps.InfoWindow({content: contentString[i]});
	}
 
    for(var i=0; i<llCoords.length; i++){   
    	marker[i]=new google.maps.Marker({position: llCoords[i], map: map, title: rName[i], icon: image});
    }

	google.maps.event.addListener(marker[0], 'click', function() {infowindow[0].open(map,marker[0]);});
    google.maps.event.addListener(marker[1], 'click', function() {infowindow[1].open(map,marker[1]);});
    google.maps.event.addListener(marker[2], 'click', function() {infowindow[2].open(map,marker[2]);});
	google.maps.event.addListener(marker[3], 'click', function() {infowindow[3].open(map,marker[3]);});
	google.maps.event.addListener(marker[4], 'click', function() {infowindow[4].open(map,marker[4]);});
	google.maps.event.addListener(marker[5], 'click', function() {infowindow[5].open(map,marker[5]);});
	google.maps.event.addListener(marker[6], 'click', function() {infowindow[6].open(map,marker[6]);});
	google.maps.event.addListener(marker[7], 'click', function() {infowindow[7].open(map,marker[7]);});
	google.maps.event.addListener(marker[8], 'click', function() {infowindow[8].open(map,marker[8]);});
  }



è(window, 'load', function(){
	initialize();
	hilight('rifugiM');
});