    	function collapsepre()
		{
			var pres,i,allp,alla,head,newa,newp;
			pres=document.getElementsByTagName('pre');
			if(pres.length>0)
			{		
				allp=document.createElement('p');
				alla=document.createElement('a');
				alla.appendChild(document.createTextNode('Alle Beispiele anzeigen'));
				alla.onclick=function(){col('all',this);return false;};
				alla.setAttribute('href','#');
				alla.className='collink';
				allp.appendChild(alla);
				head=document.getElementsByTagName('h1')[0];	
				head.parentNode.insertBefore(allp,head.nextSibling)
			}
			for(i=0;i<pres.length;i++)
			{
				newa=document.createElement('a');
				newp=document.createElement('p');
				newa.appendChild(document.createTextNode('Beispiel anzeigen'));
				newa.tocollapse=i;
				newa.onclick=function(){col(this,this.tocollapse);return false;};
				newa.setAttribute('href','#');
				newa.className='collink';
				newp.appendChild(newa);
				
				newp.style.marginBottom='5px';
				newp.style.marginLeft='10px';
				pres[i].style.marginTop=0;
				pres[i].style.display='none';
				pres[i].parentNode.insertBefore(newp,pres[i]);
			}
		}

		function col(a,o){
			var pres,i,n;
			switch(a){
				case 'all':
					pres=document.getElementsByTagName('pre');
					for(i=0;i<pres.length;i++)
					{
						pres[i].style.display='block';
						pres[i].previousSibling.style.display='none';
					}
					o.onclick=function(){col('colall',this);return false;};
					o.firstChild.nodeValue='Alle Beispiele verstecken';
				break;
				case 'colall':
					pres=document.getElementsByTagName('pre');
					for(i=0;i<pres.length;i++)
					{
						pres[i].style.display='none';
						pres[i].previousSibling.style.display='block';
					}
					o.onclick=function(){col('all',this);return false;};
					o.firstChild.nodeValue='Alle Beispiele anzeigen';
				break;
				default:
					n=document.getElementsByTagName('pre')[o];
					n.style.display=n.style.display=='block'?'none':'block';
					a.firstChild.nodeValue=n.style.display=='block'?'Beispiel verstecken':'Beispiel anzeigen';
				break;
			}
		}
		function h3number()
		{
			var h3,i,count;
			if (document.getElementById('cleanup'))
			{
				h3s=document.getElementsByTagName('h3');
				for(i=0;i<h3s.length;i++)
				{
					count=document.createTextNode(i+1+'. ');
					h3s[i].insertBefore(count,h3s[i].firstChild);
				}
			}
		}
		function toc()
		{
			var ispage,tocgen,pagelinks,tocdiv,tocform,toclabel,tocsel,tocsubmit,newop,relatt,sel;
			pagelinks=document.getElementsByTagName('link');

			if(document.getElementById('tocdiv'))
			{
				tocdiv=document.getElementById('tocdiv');
				tocgen=false;
			} else {
				tocgen=true;
				tocdiv=document.createElement('div');
				tocdiv.setAttribute('id','tocdiv');
			}
			tocform=document.createElement('form');	
			toclabel=document.createElement('label')
			toclabel.appendChild(document.createTextNode('Direkt zu:'));
			toclabel.setAttribute('for','ts');
			tocsel=document.createElement('select')
			tocsel.setAttribute('id','ts');
			tocsubmit=document.createElement('input');
			tocsubmit.setAttribute('type','submit');
			tocsubmit.setAttribute('value','gehen');
			for(i=0;i<pagelinks.length;i++)
			{
				relatt=pagelinks[i].getAttribute('rel');
				if(!/sheet|next|prev/i.test(relatt))
				{
					newop=document.createElement('option');
					newop.appendChild(document.createTextNode(pagelinks[i].getAttribute('title')));
					newop.setAttribute('value',pagelinks[i].getAttribute('href'));
					if(document.location.href.indexOf(pagelinks[i].getAttribute('href'))!=-1){
						ispage=i;
					}
					tocsel.appendChild(newop)
				}
			}	
			tocform.onsubmit=function(){
					sel=document.getElementById('ts');
				self.location=sel.options[sel.selectedIndex].value;
				return false;
			};
			tocform.appendChild(toclabel);
			tocform.appendChild(tocsel);
			tocform.appendChild(tocsubmit);
			tocdiv.appendChild(tocform);
			if(tocgen)
			{
				document.body.insertBefore(tocdiv,document.body.firstChild);
			}
			tocsel.selectedIndex=ispage?ispage:0;
		}
		
		if(document.getElementById && document.createTextNode)
		{
			window.onload=function(){
				h3number();
				toc();
//				collapsepre();
			}
		}	
			
