var browsercheck = navigator.appVersion;

function gotobild(bild)
{
	if (bild < max-1)
	{
		preload=bild+1;
	}
	else
	{
		preload=1;
	}
	
	if (document.getElementById)
	{
		if (browsercheck.indexOf("MSIE") != -1){document.getElementById('dispimage').filters.blendTrans.Apply();}
		document.getElementById('dispimage').src = fotogalerie[bild].src;
		if (browsercheck.indexOf("MSIE") != -1){document.getElementById('dispimage').filters.blendTrans.Play();}
		document.getElementById('fotogalerie_detail_fototitel').innerHTML = fototitel[bild];
	}
	else if (document.all && !document.getElementById)
	{
		if (browsercheck.indexOf("MSIE") != -1){document.images['dispimage'].filters.blendTrans.Apply();}
		document.images['dispimage'].src = fotogalerie[bild].src;
		if (browsercheck.indexOf("MSIE") != -1){document.images['dispimage'].filters.blendTrans.Play();}
		document['fotogalerie_detail_fototitel'].innerHTML = fototitel[bild];
	}
}

function next()
{
	current = current + 1;
	if (current >= max)
	{
		current = 1;
	}
	gotobild(current);
}

function prev()
{
	current = current - 1;
	if (current == 0)
	{
		current = max-1;
	}
	gotobild(current);
}

function diashow()
{
	next();
	window.setTimeout("diashow()", 4000);
}
