var roomspeed=2000
var roomimages=new Array("images/king.jpg","images/suite.jpg","images/king2.jpg")
var roomlinks=new Array("index.html","index.html","index.html")

var whichlink=0
var whichimage=0
var imgobj, filtersupport, blenddelay
var imageholder=new Array()
for (i=0;i<roomimages.length;i++){ //preload images
imageholder[i]=new Image()
imageholder[i].src=roomimages[i]
}

function gotoshow(){
window.location=roomlinks[whichlink]
}

function roomit(){
if (filtersupport)
imgobj.filters[0].apply()
imgobj.src=imageholder[whichimage].src
if (filtersupport)
imgobj.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<roomimages.length-1)? whichimage+1 : 0
setTimeout("roomit()", roomspeed+blenddelay)
}
window.onload=function(){
imgobj=document.getElementById("roomshow") //access img obj
filtersupport=imgobj.filters //check for support for filters
blenddelay=(filtersupport)? imgobj.filters[0].duration*1000 : 0
roomit()
}




//  below is script to include links with roomshow
//<a href="javascript:gotoshow()"><img src="802691.jpg" id="roomshow" border=0 style="filter:progid:DXImageTransform.Microsoft.Fade(duration=2)" width="97" height="100" /></a>




//  below is script to include links with slideshow
//<a href="javascript:gotoshow()"><img src="802691.jpg" id="slideshow" border=0 style="filter:progid:DXImageTransform.Microsoft.Fade(duration=2)" width="97" height="100" /></a>


