﻿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)
}

var arrTemp=self.location.href.split("?"); 
var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
var NS = (navigator.appName=="Netscape")?true:false; 
var msg;
     function FitPic() { 
       iWidth = (NS)?msg.innerWidth:msg.document.body.clientWidth; 
       iHeight = (NS)?msg.innerHeight:msg.document.body.clientHeight; 
       iWidth = msg.document.images[0].width - iWidth; 
       iHeight = msg.document.images[0].height - iHeight; 
       msg.resizeBy(iWidth, iHeight); 
       msg.focus(); 
     }; 
function popup(imm) {
  if (typeof(msg)!='undefined') msg.close();
  imm=imm.replace("s.jpg",".jpg");
  msg=open("","schermo","scrollbars=no,status=no,toolbar=no,directories=no,menubar=no,width=500,height=400,resizable=no");
  msg.document.write("<html><HEAD><TITLE><\/TITLE><\/HEAD><body style='margin: 0px'>");
  msg.document.write("<img src='"+imm+"' border='0' alt='' onload='opener.FitPic();'><\/body><\/html>");    
}

