﻿var slideShowSpeed = 5000

var crossFadeDuration = 3

var Pic = new Array() 

Pic[0] = 'images/imm.jpg'
Pic[1] = 'images/imm2.jpg'
Pic[2] = 'images/imm1.jpg'


var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
     document.getElementById('SlideShow').filter="blendTrans(duration=2)"
        document.getElementById('SlideShow').filter="blendTrans(duration=crossFadeDuration)"
      document.getElementById('SlideShow').filters.blendTrans.Apply()      
   }
   document.getElementById('SlideShow').src = preLoad[j].src
   if (document.all){
      document.getElementById('SlideShow').filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}


 function load() {
      if (GBrowserIsCompatible()) {
      var map = new GMap2(document.getElementById("map"));
  map.addControl(new GSmallMapControl());
  map.addControl(new GMapTypeControl());
   map.setCenter(new GLatLng(43.526202, 11.041728), 13);
   
   // Our info window content
var infoTabs = [
  new GInfoWindowTab("", "Villa Aia - Loc. S.Benedetto<br> San Gimignano")

];

// Place a marker in the center of the map and open the info window
// automatically
var marker = new GMarker(map.getCenter());
GEvent.addListener(marker, "click", function() {
  marker.openInfoWindowTabsHtml(infoTabs);
});
map.addOverlay(marker);
marker.openInfoWindowTabsHtml(infoTabs);
       }
    }

