/*	Javascript Picture Viewer for automatic or manual slideshow
	(c) 2003 by Reinhold Wehrle, El Holdis Research+Development, 8049 Zurich, Switzerland
	this script may be used free by any person, company or organisation, as long as this copyright-message (all 5 lines) stays intact.
	commercial use, e.g. the sale of this script as single application or as part of a package is not allowed
	the use on sites with erotic, pornographic, violent or rassistic content is STRICTLY PROHIBITED   */

var TPlay=5
var PicList=new Array()
var PicNo=0
var PlayStarted=0

//---- fill the array with the filenames of the pictures -- Array mit den Dateinamen der Bilder füllen ----

PicList[0]="../images/schnydrig1.jpg"
PicList[1]="../images/schnydrig2.jpg"
PicList[2]="../images/schnydrig3.jpg"
PicList[3]="../images/schnydrig4.jpg"
PicList[4]="../images/schnydrig5.jpg"
PicList[5]="../images/schnydrig6.jpg"
PicList[6]="../images/schnydrig7.jpg"


window.status="image no. " + (xi=PicNo+1) + " of  " + PicList.length

function GoBack(){
if (PicNo>0){
PicNo--
document.images.PicViewer.src=PicList[PicNo]
window.status="manual play, image no. " + (xi=PicNo+1) + " of  " + PicList.length
}
}

function GoNext(){
if (PicNo<PicList.length-1){
PicNo++
document.images.PicViewer.src=PicList[PicNo]
window.status="manual play, image no. " + (xi=PicNo+1)+ " of  " + PicList.length
}
}

function GoFirst(){
PicNo=0
document.images.PicViewer.src=PicList[PicNo]
window.status="manual play, image no. " + (xi=PicNo+1)+ " of  " + PicList.length
}

function GoLast(){
PicNo=PicList.length-1
document.images.PicViewer.src=PicList[PicNo]
window.status="manual play, image no. " + (xi=PicNo+1) + " of  " + PicList.length
}

function PlayADSL(){
if (PlayStarted>0){
clearTimeout(TimerID)
}
TPlay=6
AutoPlay()
}

<!--

function AutoPlay() {
//If  PicNo is in the array show it, if not go to the first one

TimerID=setTimeout("AutoPlay()",TPlay*1000)
PlayStarted=TPlay

if (PicNo<PicList.length){
PicNo++
document.images.PicViewer.src=PicList[PicNo]
}
if (PicNo==PicList.length) {
PicNo=0
document.images.PicViewer.src=PicList[PicNo]
}
window.status="automatic play, intervall " + TPlay + " seconds, image no. " + (xi=PicNo+1) + " of  " + PicList.length
}

//---- Activate the following 2 Lines to AutoPlay Slides from opening of page -- Folgende 2 Zeilen aktivieren um die Diashow beim Laden der Seite zu starten ----
//if (document.images)
//AutoPlay()
//-->
		
