<!--
function fader(fotos, photoview0, photoview1) {	
	this.fotos = fotos;
	this.photoview0 = photoview0;
	this.photoview1 = photoview1;
	
	// Set fadeSpeed (number of milliseconds to wait between 5% changes in opacity)
	var fadeSpeed = (arguments.length > 3 && !isNaN(arguments[3]) ? arguments[3] : 50);
	
	var fadeT;
	var fadeOpacity = 0;
	var preloadLength = fotos.length
	
	var preloadpics = new Array();
	var j = preloadLength - 1;
	for (var i = 0; i < preloadLength; i++) {
		if (i > j) break;
		preloadpics[i] = new Image();
		preloadpics[i].src = fotos[i][0];
		preloadpics[j] = new Image();
		preloadpics[j].src = fotos[j][0];
		j--;
	
	}
	
	var cur_foto = 0;
	var tot_fotos = fotos.length - 1;
	var to;
	
	this.scroll_photo = scroll_photo;
	this.scroll_photo2 = scroll_photo2;
	this.fadeIn = fadeIn;
	
	function scroll_photo(i) {
		if (fadeOpacity > 0) return;
		if (to) clearTimeout(to);
		to = setTimeout(function() { scroll_photo2(i); }, 50);
	}
	
	function scroll_photo2(i) {
		cur_foto = cur_foto + i;
		if (cur_foto < 0) cur_foto = tot_fotos;
		if (cur_foto > tot_fotos) cur_foto = 0;
		
		document.getElementById(photoview1).style.top =  (fotos[cur_foto][2] * 1 > 71 ? "-" + Math.ceil((fotos[cur_foto][2] - 71) / 2) : 0) + "px";
		document.getElementById(photoview1).style.left = (fotos[cur_foto][1] * 1 > 94 ? "-" + Math.ceil((fotos[cur_foto][1] - 94) / 2) : 0) + "px";
		document.getElementById(photoview1).innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="94" height="71"><tr><td align="center"><img src="' + fotos[cur_foto][0] + '" width="' + fotos[cur_foto][1] + '" height="' + fotos[cur_foto][2] + '" border="0"></td></tr></table>';
	
		fadeT = setTimeout(function() { fadeIn(); }, fadeSpeed);
	}
	
	function fadeIn() {
		fadeOpacity = fadeOpacity + 5;
		var fade_top_object = document.getElementById(photoview1);
		var fade_bottom_object = document.getElementById(photoview0);
	
		if (fadeOpacity <= 100) {
			var tmpOpacity = (fadeOpacity == 100 ? 99.999 : fadeOpacity);
			if (fade_top_object.filters) fade_top_object.filters.alpha.opacity = tmpOpacity;
			if (fade_top_object.style.MozOpacity) fade_top_object.style.MozOpacity = tmpOpacity / 100;
			if (fade_top_object.style.opacity) fade_top_object.style.opacity = tmpOpacity / 100;
			if (fade_top_object.style.KHTMLOpacity) fade_top_object.style.KHTMLOpacity = tmpOpacity / 100;
			if (fadeOpacity == 100)	{
				fade_bottom_object.style.top = fade_top_object.offsetTop + "px";
				fade_bottom_object.style.left = fade_top_object.offsetLeft + "px";
				fade_bottom_object.innerHTML = fade_top_object.innerHTML;
			}
			fadeT = setTimeout(function() { fadeIn(); }, fadeSpeed);
		} else {
			if (fade_top_object.filters) fade_top_object.filters.alpha.opacity = 0;
			if (fade_top_object.style.MozOpacity) fade_top_object.style.MozOpacity =0;
			if (fade_top_object.style.opacity) fade_top_object.style.opacity = 0;
			if (fade_top_object.style.KHTMLOpacity) fade_top_object.style.KHTMLOpacity = 0;
			fadeOpacity = 0;
		}
	}	
}
-->
