var map1;
function body_onload() {
   map1 = new PGMappy({nameContainer: 'mapcontainer', mapWidth:437, mapHeight:400, lon:7.6867, lat:45.0706, mapType:PGMAP_TYPE_ORTO});
   map1.setZoom(0);
   map1.addRadar({right:9, top:20, width:120, height:100});

   more_point ();
}

function rimuovi_tutto(){
   map1.removeAllPoints();
}
		
function set_center(){		
   map1.setCenterAndZoom();
}
		
function center_point(latit, longit){
   map1.setCenterPoint(pgPoint);
   map1.removeAllPoints();
}
				  
function add_point(latit, longit, text, id){
   var point1 = new PGPoint({ 
      lon:longit, 
      lat:latit, 
      html:"<div style='width:34px; height:22px; background: url(livio_files/img/point.gif) no-repeat;'><div style='height:4px;'>&nbsp;</div> <div style='color:#fff; font-size:10px; text-align: center;'>&nbsp;&nbsp;<b>" + id + "</b></div></div>",
				txt:text, 
				title:text  ,               
                   opened:{
                       html: "<div style='padding:2px;'><div style='width:148px; height:77px; padding:8px; background:url(livio_files/img/pop.gif); border:0px solid #fff; color: #000;'><br/>"+text+"</div></div>",
                       offsetX:-5,
                       offsetY:-80
				}
   });
   map1.pointAdder(point1);
}

function more_point (){
   for (xx=0; xx< latit.length; xx++){
      add_point(longit[xx],latit[xx], addr[xx], xx);
   }
   set_center()
}
