var slideShowSpeed = 2500

var crossFadeDuration = 3

var Pic = new Array()

if (hotel=='saturno') {
 Pic[0] = 'rotate/saturno01.jpg'
 Pic[1] = 'rotate/saturno02.jpg'
 Pic[2] = 'rotate/saturno03.jpg'
 Pic[3] = 'rotate/saturno04.jpg'
}
if (hotel=='castell') {
 Pic[0] = 'rotate/castell01.jpg'
 Pic[1] = 'rotate/castell02.jpg'
 Pic[2] = 'rotate/castell03.jpg'
 Pic[3] = 'rotate/castell04.jpg'
}
if (hotel=='bazzanega') {
 Pic[0] = 'rotate/bazzanega01.jpg'
 Pic[1] = 'rotate/bazzanega02.jpg'
 Pic[2] = 'rotate/bazzanega03.jpg'
 Pic[3] = 'rotate/bazzanega04.jpg'
}
if (hotel=='prince') {
 Pic[0] = 'rotate/prince01.jpg'
 Pic[1] = 'rotate/prince02.jpg'
 Pic[2] = 'rotate/prince03.jpg'
 Pic[3] = 'rotate/prince04.jpg'
}
if (hotel=='pier') {
 Pic[0] = 'rotate/pier01.jpg'
 Pic[1] = 'rotate/pier02.jpg'
 Pic[2] = 'rotate/pier03.jpg'
 Pic[3] = 'rotate/pier04.jpg'
}
if (hotel=='eden') {
 Pic[0] = 'rotate/eden01.jpg'
 Pic[1] = 'rotate/eden02.jpg'
 Pic[2] = 'rotate/eden03.jpg'
 Pic[3] = 'rotate/eden04.jpg'
}
if (hotel=='ambra') {
 Pic[0] = 'rotate/ambra01.jpg'
 Pic[1] = 'rotate/ambra02.jpg'
}
if (hotel=='prealzo') {
 Pic[0] = 'rotate/prealzo01.jpg'
 Pic[1] = 'rotate/prealzo02.jpg'
 Pic[2] = 'rotate/prealzo03.jpg'
}
if (hotel=='limone') {
 Pic[0] = 'rotate/limone01.jpg'
 Pic[1] = 'rotate/limone02.jpg'
 Pic[2] = 'rotate/limone03.jpg'
}
if (hotel=='riva') {
 Pic[0] = 'rotate/riva01.jpg'
 Pic[1] = 'rotate/riva02.jpg'
 Pic[2] = 'rotate/riva03.jpg'
}
if (hotel=='tremosine') {
 Pic[0] = 'rotate/tremosine01.jpg'
}
if (hotel=='malcesine') {
 Pic[0] = 'rotate/malcesine01.jpg'
 Pic[1] = 'rotate/malcsesine02.jpg'
}


isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){m
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

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.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();      
   }
   if (!isN4) document.images.SlideShow.src = preLoad[j].src;
   if (isN4) document.layers['theLayer'].document.images['SlideShow'].src = preLoad[j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}
