function FadeSlides()
{
	var SlideContainer = document.getElementById('LOCR_SLIDE_CONTAINER');		

	if(slide_break)return;
	else if(pause) return;
	else if(firstcall)
	{
		ShowPoint(currentPhoto);
		pause = true;
		setTimeout("pause = false",showtime);
		firstcall = false;
		return;
	}

	if(changeOver == true)
	{
		currentOpacity[currentPhoto] -= intervall_step;
		currentOpacity[secondPhoto] += intervall_step;
	} else
	if(changeOver == false)
	{
		currentOpacity[currentPhoto] = 0;
		currentOpacity[secondPhoto] = 100;
	}

	document.getElementById(currentPhoto).style.filter = "alpha(opacity=" + currentOpacity[currentPhoto] + ")";
	document.getElementById(currentPhoto).style.MozOpacity = currentOpacity[currentPhoto]/100;
	document.getElementById(currentPhoto).style.opacity = currentOpacity[currentPhoto]/100;

	document.getElementById(secondPhoto).style.visibility = 'visible';

	document.getElementById(secondPhoto).style.filter = "alpha(opacity=" + currentOpacity[secondPhoto] + ")";
	document.getElementById(secondPhoto).style.MozOpacity = currentOpacity[secondPhoto]/100;
	document.getElementById(secondPhoto).style.opacity = currentOpacity[secondPhoto]/100;

	if(currentOpacity[secondPhoto]/100 >= .98)
	{
		currentPhoto = secondPhoto;
		secondPhoto++;

		if(secondPhoto == slide_length)
			setTimeout("DoReload()",showtime);

		ShowPoint(currentPhoto);

		pause = true;
		xInterval = setTimeout("pause = false",showtime);
	}
}

function changeChangeOver(action)
{
	var CookieExpireDate = new Date();
	var OneYear = CookieExpireDate.getTime() + (365 * 24 * 60 * 60 * 1000);
	CookieExpireDate.setTime(OneYear);

	if(action == 'stop')
	{
		changeOver = false;
		document.getElementById('changeOver').href = 'javascript:changeChangeOver(\'start\');';
		document.getElementById("changeOverImg").removeAttribute('class');
		var Class = document.createAttribute('class');
		Class.nodeValue = 'slideshow_changeover';
		document.getElementById("changeOverImg").setAttributeNode(Class);
		document.getElementById('changeOver').title = 'Changeover';
		document.getElementById('changeOverImg').alt = 'Changeover';
		document.cookie = 'locr_slideshow_changeover=no_changeover; expires='+CookieExpireDate.toGMTString();
	}
	else
	if(action == 'start')
	{
		changeOver = true;
		document.getElementById('changeOver').href = 'javascript:changeChangeOver(\'stop\');';
		document.getElementById("changeOverImg").removeAttribute('class');
		var Class = document.createAttribute('class');
		Class.nodeValue = 'slideshow_no_changeover';
		document.getElementById("changeOverImg").setAttributeNode(Class);
		document.getElementById('changeOver').title = 'No Changeover';
		document.getElementById('changeOverImg').alt = 'No Changeover';
		document.cookie = 'locr_slideshow_changeover=changeover; expires='+CookieExpireDate.toGMTString();
	}
}
