window.moveTo(0,0); window.resizeTo(window.screen.availWidth,window.screen.availHeight); 
window.focus()
      var map;
      function load() {
        if (GBrowserIsCompatible()) {
          map = new GMap2(document.getElementById("map"));
       	map.setCenter(new GLatLng(40.76500,8.850743), 11);
		 map.setMapType(G_HYBRID_MAP);
		  map.addControl(new GNavLabelControl());
		  map.addControl(new GLargeMapControl3D());
		  var bottomRight = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(20,20));
		  map.addControl(new GMapTypeControl(), bottomRight);
		   map.enableGoogleBar();
	  var mapOptions = {
      googleBarOptions : {
      style : "new",
      adsOptions: {
      client: "pub-5123340828110826",
      channel: "6280403079",
      adsafe: "high",
      language: "en"
		
      }
    }
  }
var publisher_id = 	'ca-pub-5123340828110826';

var adsManagerOptions = {
  maxAdsOnMap : 10,
  style: G_ADSMANAGER_STYLE_ADUNIT,
  channel: '7220438796',
  position: new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(20,60))
};

adsManager = new GAdsManager(map, publisher_id, adsManagerOptions);
adsManager.enable();


		var tinyIcon = new GIcon();
		tinyIcon.image = "../../../_krpano/red_marker.png";
		
		tinyIcon.iconSize = new GSize(10, 10);
		tinyIcon.iconAnchor = new GPoint(0, 0);
		tinyIcon.infoWindowAnchor = new GPoint(2, -5);
	
		// Set up our GMarkerOptions object literal
		markerOptions = { icon:tinyIcon };
		
		var styleOpts = {};
		var otherOpts = {};
		styleOpts.opacity = 0.4;
		styleOpts.border = '2px solid #900';
		otherOpts.backButtonEnabled = true;
		otherOpts.buttonZoomingHTML = 'Select Area';
		otherOpts.buttonStyle = {background: '#717f82'};
		otherOpts.buttonZoomingStyle = {background: '#FF0'};
		otherOpts.buttonStartingStyle = {width: '80px', border: '1px solid black', padding: '2px'};
		var zcontrol = new DragZoomControl(styleOpts, otherOpts, {});
		var posizionezoom = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(70,10));
		map.addControl(zcontrol,posizionezoom);
		
		
		marker = new GMarker( new GLatLng(40.644544,8.892435), tinyIcon );
          
         GEvent.addListener(marker, 'mouseover', function(){ 
            marker.openExtInfoWindow(
              map, 
              "infowindow",
              "<div class='title'>Sardinia 360° - Romanesque Churches</div>"+ 
              "<div class='section1'><p><img src='../../../sardegna-virtual-tour/sardegna-romanica/_immagini/romanica01gm.jpg' alt='antioco bisarcio belltower'/></p></div>"+
			  "<div class='td_testo'>Sant’Antioco di Bisarcio with the truncated Belltower</div>"+
			  "<div class='section2'><a href='belltower-san-antioco-of-bisarcio.html'>View the 360° Virtual Panorama</a></div>",
              {beakOffset: 3}
            ); 
          });		 
		 map.addOverlay(marker);
		 
		 marker2 = new GMarker( new GLatLng(40.644715,8.892435), tinyIcon );
          
         GEvent.addListener(marker2, 'mouseover', function(){ 
            marker2.openExtInfoWindow(
              map, 
              "infowindow",
              "<div class='title'>Sardinia 360° - Romanesque Churches</div>"+ 
              "<div class='section1'><p><img src='../../../sardegna-virtual-tour/sardegna-romanica/_immagini/romanica02gm.jpg' alt='antioco bisarcio façade'/></p></div>"+
			  "<div class='td_testo'>Sant’Antioco of Bisarcio - Main Façade</div>"+
			  "<div class='section2'><a href='portico-san-antioco-of-bisarcio.html'>View the 360° Virtual Panorama</a></div>",
              {beakOffset: 3}
            ); 
          });		 
		 map.addOverlay(marker2);
		 
		  marker3 = new GMarker( new GLatLng(40.835441,8.850743), tinyIcon );
          
         GEvent.addListener(marker3, 'mouseover', function(){ 
            marker3.openExtInfoWindow(
              map, 
              "infowindow",
              "<div class='title'>Sardinia 360° - Romanesque Churches</div>"+ 
              "<div class='section1'><p><img src='../../../sardegna-virtual-tour/sardegna-romanica/_immagini/romanica03gm.jpg' alt='pietro crucefix'/></p></div>"+
			  "<div class='td_testo'>San Pietro of the Crucifix - Bulzi</div>"+
			  "<div class='section2'><a href='san-pietro-of-the-crucifix.html'>View the 360° Virtual Panorama</a></div>",
              {beakOffset: 3}
            ); 
          });		 
		 map.addOverlay(marker3);
		 
		 marker4 = new GMarker( new GLatLng(40.871071,8.720291), tinyIcon );
          
         GEvent.addListener(marker4, 'mouseover', function(){ 
            marker4.openExtInfoWindow(
              map, 
              "infowindow",
              "<div class='title'>Sardinia 360° - Romanesque Churches</div>"+ 
              "<div class='section1'><p><img src='../../../sardegna-virtual-tour/sardegna-romanica/_immagini/romanica04gm.jpg' alt='our lady tergu'/></p></div>"+
			  "<div class='td_testo'>Our Lady of Tergu - Sassari</div>"+
			  "<div class='section2'><a href='our-lady-of-tergu.html'>View the 360° Virtual Panorama</a></div>",
              {beakOffset: 3}
            ); 
          });		 
		 map.addOverlay(marker4);
    }
}

