var imagedelay = 4000
var imagesize = 500
var num=0
var timeDelay
 
var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
	imagePreload[i]=new Image()
	imagePreload[i].src=image[i]
}

function slideshow()
{ 
	if (num<image.length)
	{
	    if (document.all){
		slideShowImg.filters.revealTrans.Transition=Math.floor(Math.random()*24)
		slideShowImg.filters.revealTrans.apply()
		slideShowImg.filters.revealTrans.play()
	    }

	num++
	if (num==image.length) num=0
	    tmpimg=new Image()
	    tmpimg.src=image[num]
	    if (tmpimg.width>tmpimg.height){
		newwidth=imagesize
		newheight=parseInt(imagesize/(tmpimg.width/tmpimg.height))
	    }else {
		newwidth=parseInt(imagesize*(tmpimg.width/tmpimg.height))
		newheight=imagesize
	    }
	    if (newwidth>imagesize){
		newwidth=imagesize
		newheight=parseInt(imagesize/(tmpimg.width/tmpimg.height))
	    }
	    if (newheight>imagesize){
		newwidth=parseInt(imagesize*(tmpimg.width/tmpimg.height))
		newheight=imagesize
	    }
	    document.images.slideShowImg.width=newwidth
	    document.images.slideShowImg.height=newheight
	    document.images.slideShowImg.src=image[num]
  	    
	    timeDelay=setTimeout("slideshow()",imagedelay) 
	}
}
