<html>
<head>
<title>test</title>
<SCRIPT type=text/javascript>
// The list of images to display in the slideshow
//creating a array of the image object
var image=new Array(<%if not RSobjekter("img1") = "intet-billede.jpg" then%>"images/objekter/<%=(RSobjekter("img1").Value)%>"<%end if%>
<%if not RSobjekter("img2") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img2").Value)%>"<%end if%>
<%if not RSobjekter("img3") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img3").Value)%>"<%end if%>
<%if not RSobjekter("img4") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img4").Value)%>"<%end if%>
<%if not RSobjekter("img5") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img5").Value)%>"<%end if%>
<%if not RSobjekter("img6") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img6").Value)%>"<%end if%>
<%if not RSobjekter("img7") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img7").Value)%>"<%end if%>
<%if not RSobjekter("img8") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img8").Value)%>"<%end if%>
<%if not RSobjekter("img9") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img9").Value)%>"<%end if%>
<%if not RSobjekter("img10") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img10").Value)%>"<%end if%>
<%if not RSobjekter("img11") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img11").Value)%>"<%end if%>
<%if not RSobjekter("img12") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img12").Value)%>"<%end if%>
<%if not RSobjekter("img13") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img13").Value)%>"<%end if%>
<%if not RSobjekter("img14") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img14").Value)%>"<%end if%>
<%if not RSobjekter("img15") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img15").Value)%>"<%end if%>
<%if not RSobjekter("img16") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img16").Value)%>"<%end if%>
<%if not RSobjekter("img17") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img17").Value)%>"<%end if%>
<%if not RSobjekter("img18") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img18").Value)%>"<%end if%>
<%if not RSobjekter("img19") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img19").Value)%>"<%end if%>
<%if not RSobjekter("img20") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img20").Value)%>"<%end if%>
)
//variable that will increment through the images
var num=0
// set the delay between images
var timeDelay
//preload the images in the cache so that the images load faster
//create new instance of images in memory
var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}
//function to get the previous image in the array
function previous_image()
{
//code to execute only when the automatic slideshow is disabled
if (slideshow.checked==false)
{
if (num>0)
{
num--
//set the SRC attribute to let the browser load the preloaded images
document.images.slideShow.src=image[num]
}
if (num==0)
{ //if first image is displayed
num=image.length
num--
document.images.slideShow.src=image[num]
}
}
}
//function to get the next image in the array
function next_image()
{
//code to execute only when the automatic slideshow is disabled
if (slideshow.checked==false)
{
if (num<image.length)
{
num++
//if last image is reached,display the first image
if (num==image.length)
num=0
//set the SRC attribute to let the browser load the preloaded images
document.images.slideShow.src=image[num]
}
}
}
//for automatic Slideshow of the Images
function slideshow_automatic()
{
if (slideshow.checked)
{
if (num<image.length)
{
num++
//if last image is reached,display the first image
if (num==image.length)
num=0
//sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
timeDelay=setTimeout("slideshow_automatic()",6000)
document.images.slideShow.src=image[num]
}
}
if (slideshow.checked==false)
{
//Cancels the time-out that was set with the setTimeout method.
clearTimeout(timeDelay)
}
}
</SCRIPT>
</head>
<body>
<div align="center">
<br />
<SCRIPT>
document.write('<img src="'+image[0]+'" name="slideShow" style="filter:revealTrans(duration=2,transition=23)" width=425 border=0>')
</SCRIPT></center>
<p align="center"><strong><span class="indholdstekst">
<input type="hidden" name="slideshow" value="OFF" onClick="slideshow_automatic()">
</span></strong>
<input name="Previous" type="button" class="bundtekst" onclick="previous_image();return false" value=" << " />
<input name="Next" type="button" class="bundtekst" onClick="next_image();return false" value=" >> "></div>
</body>
</html>
|