
	function sectionhandler (list) {
		var sections = list.split(',');
		var i=0;
		var anz = 0;
		while (document.getElementById("section_"+i)) {
			anz++;
			i++;
		}
		if (anz>1) {
			for (i=1;i<anz;i++)
				document.getElementById("section_"+i).className="hidden";
		}
		
		
		
		
		var show = function(id) {
			id = id.getAttribute("name");
			for (var i=0;i<anz;i++) {
				if (i.toString()==id)
					document.getElementById("section_"+i).className="";
				else
					document.getElementById("section_"+i).className="hidden";
			}
		}
		
		var shownumber = function(nr) {
			nr = parseInt(nr);
			//alert(nr);
			for (var i=0;i<anz;i++)
				if (i==nr)
					document.getElementById("section_"+i).className="";
				else
					document.getElementById("section_"+i).className="hidden";
		}
		
		
		this.sectionchange = function(newsec) {
			shownumber(newsec.replace("s",""));
		}
		
		
		
		var base = document.getElementById("letterselector");
		var ul = document.createElement("p");
		for (i=0;i<anz;i++) {
			var a = document.createElement("a");
			a.href="#s"+i;
			var text = document.createTextNode(sections[i]);
			a.appendChild(text)
			a.setAttribute("name",i);
			ul.appendChild(a);
			if (i!=anz-1) {
				var spacer = document.createTextNode("|");
				ul.appendChild(spacer);
			}
			
			
	//		li.onclick = function () { show(this); }
		}
		base.appendChild(ul);
		
		
		if (window.location.hash.length>0) {
			var old = window.location.hash.replace("#s","");
			shownumber(old);
		}
		
	}
