var titel  = ""
var anzahl = 0
var which=0 
var photos=new Array() 
var text=new Array() 

function init(aTitel, aAnzahl)
{ 
	titel  = aTitel
	anzahl = aAnzahl
    which = 0 
	for (var i=0; i < anzahl; i++)
  	{
  	if (i < 10)       { photos[i] = "foto/foto00" + i + ".jpg" }
  	else if (i < 100) { photos[i] = "foto/foto0" + i + ".jpg" }
  	else              { photos[i] = "foto/foto"  + i + ".jpg" }
  	text[i]   = titel + " " + (i+1) + "/" + anzahl;
  	} 
} 

function first()
{ 
    which = 0 
	document.images.photoslider.src=photos[which] 
	document.getElementById("bildlink").href=photos[which] 
	document.getElementById("bildtext").innerHTML = text[which]; 
} 

function last()
{ 
    which = anzahl-1 
	document.images.photoslider.src=photos[which] 
	document.getElementById("bildlink").href=photos[which] 
	document.getElementById("bildtext").innerHTML = text[which]; 
} 

function backward()
{ 
if (which>0)
	{ 
	window.status='' 
	which-- 
	document.images.photoslider.src=photos[which] 
	document.getElementById("bildlink").href=photos[which] 
	document.getElementById("bildtext").innerHTML = text[which]; 
	} 
else  
	{ 
	window.status='Anfang der Bilder' 
	} 
} 

function forward()
{ 
	if (which<photos.length-1)
	{ 
	which++ 
	document.images.photoslider.src=photos[which] 
	document.getElementById("bildlink").href=photos[which] 
	document.getElementById("bildtext").innerHTML = text[which]; 
	} 
else 
	{ 
	window.status='Ende der Bilder' 
	//which=1;backward();return false 
	} 
} 

