	curfoto=0;
	curswap=1;
	nfotos = 0;
	var play = false;
	function ss(start){
		if(!(play==true&&start==true)){
			if(start){
				document.getElementById("knipper").style.left = '-25px';
				play = true;
			}
			if(play){
				if(start==false) nextfoto(1);
				setTimeout("ss(false)", 3000);
			}
		}
	}

	function stop(){ 
		play = false; document.getElementById("knipper").style.left = '0px';
	}

	function toonfoto(n,txt){
		curfoto=n;
		t = document.getElementById('pft');
		c = document.getElementById('del');
		A = document.getElementById('pfi'+(curswap==1?2:1));
		B = document.getElementById('pfi'+(curswap==1?1:2));
		document.getElementById('txt').innerHTML = txt;
		if(n>0){
			s = document.getElementById('fotoinfo'+n).value.split(';');
			t.style.display = '';
			c.style.display = '';
			B.style.width = s[1] + 'px';
			document.getElementById('txt').style.width = (s[1]-4)+'px';
			document.getElementById('del').style.width = (s[1]-4)+'px';
			B.style.height = s[2];
			B.src = s[0];
		}else{
			A.style.display = 'none';
			B.style.display = 'none';
			play = false;
			t.style.display = 'none';
			c.style.display = 'none';
		}
	}

	function nextfoto(n){
		n = curfoto+n;
		if(n>nfotos) n = 1;
		if(n<1) n = nfotos;
		toonfoto(n);
	}

	function swapto(ref){
		other = ref.id=='pfi1'?'pfi2':'pfi1';
		document.getElementById(other).style.display = 'none';
		ref.style.display='block';
	}

