

var slideshow=new Array()
slideshow[0]=""

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION STARTS HERE
///////////////////////////////////////////////////////////////////////////

// FIRST SLIDESHOW

slideshow[1]=new Array(
					   "images/slides/001.jpg|",
					   "images/slides/002.jpg|",
					   "images/slides/003.jpg|",
					   "images/slides/004.jpg|",
					   "images/slides/005.jpg|",
					   "images/slides/006.jpg|",
					   "images/slides/007.jpg|",
					   "images/slides/008.jpg|",
					   "images/slides/009.jpg|",
					   "images/slides/010.jpg|",
					   "images/slides/011.jpg|",
					   "images/slides/012.jpg|",
					   "images/slides/013.jpg|",
					   "images/slides/014.jpg|",
					   "images/slides/015.jpg|",
					   "images/slides/016.jpg|",
					   "images/slides/017.jpg|",
					   "images/slides/018.jpg|",
					   "images/slides/019.jpg|",
					   "images/slides/020.jpg|",
					   "images/slides/021.jpg|",
					   "images/slides/022.jpg|",
					   "images/slides/023.jpg|",
					   "images/slides/024.jpg|",
					   "images/slides/025.jpg|",
					   "images/slides/026.jpg|",
					   "images/slides/027.jpg|",
					   "images/slides/028.jpg|",
					   "images/slides/029.jpg|",
					   "images/slides/030.jpg|",
					   "images/slides/031.jpg|",
					   "images/slides/032.jpg|",
					   "images/slides/033.jpg|",
					   "images/slides/034.jpg|",
					   "images/slides/035.jpg|",
					   "images/slides/036.jpg|",
					   "images/slides/037.jpg|",
					   "images/slides/038.jpg|",
					   "images/slides/039.jpg|",
					   "images/slides/040.jpg|",
					   "images/slides/041.jpg|",
					   "images/slides/042.jpg|",
					   "images/slides/043.jpg|",
					   "images/slides/044.jpg|",
					   "images/slides/045.jpg|",
					   "images/slides/046.jpg|",
					   "images/slides/047.jpg|",
					   "images/slides/048.jpg|",
					   "images/slides/049.jpg|"
					   )

// SECOND SLIDESHOW

slideshow[2]=new Array("samplewomen01.jpg|My last friend.","samplewomen02.jpg|My new friend.","samplewomen03.jpg|My next friend.")

// THIRD SLIDESHOW

slideshow[3]=new Array("images/fotos/cdlaufwerk.jpg|CD-Laufwerk","images/fotos/tasten.jpg|Tasten","images/fotos/timer.jpg|Timer")

// MORE SLIDESHOWS?
// Just add more slideshow-blocks as seen above.

// the font-family of the messages
var fntfamily="Verdana"

// the font-size of the messages (ranging from 1 to 6)
var fntsize=1

// the font-color of the messages
// instead of "yellow" you also could write "FFFF00"
var fntcolor="yellow"

// the URL of the player (the skin-image beneath your slides)
var playerurl="sampleplayer.gif"

// the width of the player-image (pixel)
var playerwidth=179

// the height of the player-image (pixel)
var playerheight=134

// the distance of the slides to the top margin of the player (pixel)
var imgstop=0

// the distance of the slides to the left margin of the player (pixel)
var imgsleft=0

// the distance of the messages to top margin of the player (pixel)
var mestop=0

// the distance of the messages to the left margin of the player (pixel)
var mesleft=0

// the minimum interval between each slide (seconds)
var standstill=4

///////////////////////////////////////////////////////////////////////////
// CONFIGURATION ENDS HERE
///////////////////////////////////////////////////////////////////////////

// do not change the code below
var firstslide=true
var starttime
var nowtime
var imgurl=new Array()
var message=new Array()
var imgurlandmessagearray=new Array()
var imgurlandmessage
var imgpreload=new Array()
var playertop=0
var playerleft=0
var i_imgs=0
var i_loop=0
var i_preloadloop=0
var i_transition=0
var timerrotate=false
var timercheck=false
var contentimg
var contentmes

var ns6=document.getElementById&&!document.all?1:0
var standstill=standstill*1000

function init(indexofslideshow) {
    firstslide=true
    i_imgs=0
    i_loop=0
    i_preloadloop=0
    if (timerrotate) {
        clearTimeout(timerrotate)
        clearTimeout(timercheck)
    }
    imgurl=new Array
    message=new Array
    for (i=0;i<=slideshow[indexofslideshow].length-1;i++) {
        imgurlandmessage=slideshow[indexofslideshow][i].split("|")
        imgurl[i]=imgurlandmessage[0]
        message[i]=imgurlandmessage[1]
    }

    if (document.all) {
        imgs.innerHTML=""
        mes.innerHTML=""
	    document.all.imgs.style.posTop=imgstop
        document.all.imgs.style.posLeft=imgsleft
		document.all.mes.style.posTop=mestop
        document.all.mes.style.posLeft=mesleft
        checkpreloadtime()
        preloadimage()
        checkifloaded()
    }
    if (ns6) {
        document.getElementById('imgs').innerHTML=""
        document.getElementById('mes').innerHTML=""
        document.getElementById('imgs').style.top=imgstop
        document.getElementById('imgs').style.left=imgsleft
        document.getElementById('mes').style.top=mestop
        document.getElementById('mes').style.left=mesleft
        checkpreloadtime()
        preloadimage()
        checkifloaded()
    }
	if (document.layers) {
        document.topdiv.document.imgs.document.write("")
        document.topdiv.document.imgs.document.close()
        document.topdiv.document.mes.document.write("")
        document.topdiv.document.mes.document.close()
	    document.topdiv.document.imgs.top=imgstop
        document.topdiv.document.imgs.left=imgsleft
		document.topdiv.document.mes.top=mestop
        document.topdiv.document.mes.left=mesleft
        checkpreloadtime()
        preloadimage()
        checkifloaded()
    }
}

function checkifloaded() {
   if (imgpreload.complete) {
        nowtime=new Date()
        nowtime=nowtime.getTime()
        nowtime=nowtime-starttime
        var interval=standstill-nowtime
        if (interval<=0 ) {
            interval=1
        }
        if (firstslide) {
            interval=1
            firstslide=false
        }
        timerrotate=setTimeout("rotateimages()", interval)
   }
   else {
        timercheck=setTimeout("checkifloaded()", 100)
   }
}

function preloadimage() {
	imgpreload=new Image()
	imgpreload.src=imgurl[i_preloadloop]
}

function rotateimages() {
    i_preloadloop++
    if (i_preloadloop>imgurl.length-1) {i_preloadloop=0}
    checkpreloadtime()
    preloadimage()
    if (i_loop>imgurl.length-1) {i_loop=0}
    getcontent()
    if (document.all) {
        imgs.filters[i_transition].apply()
        imgs.innerHTML=contentimg
        imgs.filters[i_transition].play()
        i_transition++
        if (i_transition>21) {i_transition=0}
        mes.innerHTML=contentmes
    }
    if (ns6) {
        document.getElementById('imgs').innerHTML=contentimg
        document.getElementById('mes').innerHTML=contentmes
    }
    if (document.layers) {
        document.topdiv.document.imgs.document.write(contentimg)
        document.topdiv.document.imgs.document.close()
        document.topdiv.document.mes.document.write(contentmes)
        document.topdiv.document.mes.document.close()
    }
    i_loop++
    checkifloaded()
}

function getcontent() {
    contentimg="<img src='"+imgurl[i_loop]+"'>"
    contentmes="<font size="+fntsize+" color="+fntcolor+" face="+fntfamily+">"+message[i_loop]+"</font>"
}

if (document.all) {
    document.write('<div id="topdiv" style="position:relative;width:'+playerwidth+'px;height:'+playerheight+'px">')
    document.write('<div id="player" style="position:absolute;top:0px;left:0px;width:'+playerwidth+'px;height:'+playerheight+'px;">')
    //document.write('<img src="'+playerurl+'" width='+playerwidth+' height='+playerheight+'>')
    document.write('</div>')
    document.write('<div id="mes" style="position:absolute;"> </div>')
    document.write('<div id="imgs" style="position:absolute;filter: revealTrans(Transition=1, Duration=2) revealTrans(Transition=2, Duration=2) revealTrans(Transition=3, Duration=2)  revealTrans(Transition=4, Duration=2)  revealTrans(Transition=5, Duration=1)  revealTrans(Transition=6, Duration=2)  revealTrans(Transition=7, Duration=2)  revealTrans(Transition=8, Duration=1)  revealTrans(Transition=9, Duration=2)  revealTrans(Transition=10, Duration=1)  revealTrans(Transition=11, Duration=2)  revealTrans(Transition=12, Duration=2)  revealTrans(Transition=13, Duration=1)  revealTrans(Transition=14, Duration=2)  revealTrans(Transition=15, Duration=2)  revealTrans(Transition=16 Duration=1)  revealTrans(Transition=17, Duration=2)  revealTrans(Transition=18, Duration=2) revealTrans(Transition=19, Duration=1) revealTrans(Transition=20, Duration=2) revealTrans(Transition=21, Duration=2) revealTrans(Transition=22, Duration=2)"> </div>')
	
    document.write('</div>')
}

if (ns6) {
    document.write('<div id="topdiv" style="position:relative;width:'+playerwidth+'px;height:'+playerheight+'px">')
    document.write('<div id="player" style="position:absolute;top:0px;left:0px;width:'+playerwidth+'px;height:'+playerheight+'px">')
    //document.write('<img src="'+playerurl+'" width='+playerwidth+' height='+playerheight+'>')
    document.write('</div>')
    document.write('<div id="mes" style="position:absolute;"> </div>')
    document.write('<div id="imgs" style="position:absolute;"> </div>')
    document.write('</div>')
}

if (document.layers) {
    document.write('<ilayer name="topdiv" width='+playerwidth+' height='+playerheight+'>')
    document.write('<layer name="player" width='+playerwidth+' height='+playerheight+' align=left>')
    //document.write('<img src="'+playerurl+'" width='+playerwidth+' height='+playerheight+'>')
    document.write('</layer>')
    document.write('<layer name="mes"> </layer>')
    document.write('<layer name="imgs"> </layer>')
    document.write('</ilayer>')
}

function checkpreloadtime() {
	starttime= new Date()
	starttime=starttime.getTime()
}

function checktime() {

}

window.onresize=new Function("window.location.reload()");


