//var index = 0;
//var timer = 0;
//var im = null;

	function PlacePicture(anchor) {
		var el = getElementById("foto");
		HideAll("page");
		if(el.src != anchor.href) {
			el.src = anchor.href;
			document.getElementById("Lspecial").innerHTML = anchor.name;
			}
		return false;
		}

	function scroller(cs) {
		cs.doScroll();
		}

	function contentScroller(name, visible, total) { // Constructor
		this.speed = 1; // number of pixels in each animation step
		this.leftpos = 0; // offset of the inner block relative to the outer block
		this.total = total //totale breedte van fotostrip
		this.visible = visible // breedte van het zichtbare gedeelte
		this.stap = 7; //bepaald de snelheid
		this.beweging = 0; //om de richting te bepalen
		this.domEl = getElementById(name);

		// set up methods
		this.doScroll = doScroll;
		this.scrollBack = scrollBack;
		this.scrollForward = scrollForward;
		this.stopScroll = stopScroll;
		}

	function doScroll() {
		this.leftpos = this.leftpos - this.beweging;
		this.domEl.style.left = this.leftpos+"px";
		if(this.leftpos > 0) {
			this.leftpos = 0;
			window.clearInterval(this.timerID);
			this.timerID = 0;
			}
		if(this.leftpos <= -this.total + this.visible) {
			this.leftpos = -this.total + this.visible;
			window.clearInterval(this.timerID);
			this.timerID = 0;
			}
		}

	function scrollBack() {
		if(this.leftpos >= -this.total + this.visible-3) {
			this.beweging = -this.stap;
			this.timerID = window.setInterval("scroller(cs)", this.speed);
			}
		}

	function scrollForward() {
		if(this.leftpos <= 3) {
			this.beweging = this.stap;
			this.timerID = window.setInterval("scroller(cs)", this.speed);
			}
		}


	function stopScroll(){
		window.clearInterval(this.timerID);
		this.timerID = 0;
	}
			
	function getElementById(elementID) {
		retVal = null;
		if(document.getElementById) {
			retVal = document.getElementById(elementID);
			return retVal;
			}
		if(document.all) {
			retVal = document.all.item(elementID);
			return retVal;
			}
		return retVal;
		}
	function HideAll(className) {
		var els = document.getElementsByTagName("div");
		var cnt = els.length
		for(i=0; i<cnt; i++) {
			var el = els[i];
			if(el.className == className)
				el.style.display = "none";
			}
		}
	function ShowPart(anchor) {
		var href = anchor.href;
		var name = href.substr(1+href.indexOf("#"));
		var el = getElementById(name);
		HideAll(el.className);
		el.style.display = "block";
		return false;
		}
		


