			var aantalStappen = 0;
			var timeOutCounter = 0;
			var multiplier = 1;
			var timeOut = null;
			
			function slideDown(ele,  maxlength, minlength){
				
				if(this.timeOut ==null){
					
					document.getElementById("main").style.minHeight = document.getElementById("main").offsetHeight + (maxlength-minlength) +"px";
					
					this.aantalStappen = 0;
					this.timeOutCounter = 0;
					this.multiplier = 1;
				
					eleimg = document.getElementById(ele+"_image");
					eleimg.onmouseover = function(){
						 document.getElementById(ele+"_image").src = "./template/image/focus-opened-over.gif";
					}
					
					eleimg.onmouseout = function(){
						 document.getElementById(ele+"_image").src = "./template/image/focus-open.gif";
					}
				
				
					if(eleimg){
						eleimg.src ='./template/image/focus-open.gif';
						eleimg.onclick = function(){
							slideUp(ele, maxlength, minlength);
						}
					}
				
					this.aantalStappen = Math.round((maxlength - minlength)/5);
					this.timeOut = setTimeout("doSlideDown('"+ele+"',"+ maxlength+", "+ minlength +")", 200);
				}
			}
			
			function doSlideDown(ele, maxlength, minlength){
				
				var myPlus = navigator.appName!= "Microsoft Internet Explorer" ? 4:	8;
				tmpEle = document.getElementById(ele);
				
				
				
				if(tmpEle.offsetHeight >= maxlength){
					window.clearTimeout();
					clearTimeout(this.timeOut);
					tmpEle.style.height =  maxlength+'px';
					this.timeOut = null;
				}else{
					
					if(Math.round((100/this.aantalStappen) *this.multiplier) > 50){
						
						plus = myPlus;
						this.timeOutCounter = (Math.round(this.multiplier/this.aantalStappen / this.multiplier++));
					
					}else{
						
					
						this.timeOutCounter = (Math.round(this.multiplier/this.aantalStappen * this.multiplier++));
						plus = myPlus;
					}
					
					tmpEle.style.height = tmpEle.offsetHeight+plus+'px';
					this.timeOut = setTimeout("doSlideDown('"+ele+"',"+ maxlength+","+minlength+")", this.timeOutCounter );
				}
			}
			
		
		
			function slideUp(ele, maxlength, minlength){
				
				this.timeOutCounter = 2;
				this.multip = 1.5;
				
				if(this.timeOut ==null){
					
					document.getElementById("main").style.minHeight = document.getElementById("main").offsetHeight - (maxlength-minlength) +"px";
				
					
					this.aantalStappen = 0;
					this.timeOutCounter = 0;
					this.multiplier = 1;
				
					eleimg = document.getElementById(ele+"_image");
					
					eleimg.onmouseover = function(){
						 document.getElementById(ele+"_image").src = "./template/image/focus-closed-over.gif";
					}
					
					eleimg.onmouseout = function(){
						 document.getElementById(ele+"_image").src = "./template/image/focus-close.gif";
					}
				
				
					if(eleimg){
						eleimg.src ='./template/image/focus-close.gif';
						eleimg.onclick = function(){
							slideDown(ele, maxlength, minlength);
						}
					}
					this.aantalStappen = Math.round((maxlength - minlength)/5);
					setTimeout("doSlideUp('"+ele+"',"+ maxlength+","+minlength+")", 100 );
				}
						
			}
			
			function doSlideUp(ele, maxlength, minlength){
				
				var myPlus = navigator.appName!= "Microsoft Internet Explorer" ? 4: 8;
				tmpEle = document.getElementById(ele);
				
				//alert(this.aantalStappen);
				
				if(tmpEle.offsetHeight <= plus+1 || tmpEle.offsetHeight <= minlength){
										
					clearTimeout(this.timeOut);
					window.clearTimeout();
					
					tmpEle.style.height =  minlength+'px';
					this.timeOut = null;
					
				}else{
								
					if(Math.round((100/this.aantalStappen) *this.multiplier) < 60){
						
						plus = myPlus;
						this.timeOutCounter = (Math.round(this.multiplier/this.aantalStappen / this.multiplier++));
					
					}else{
						plus = myPlus;
						this.timeOutCounter = (Math.round(this.multiplier/this.aantalStappen * this.multiplier++));
					}
					
					tmpEle.style.height = (tmpEle.offsetHeight-plus)+'px';
					this.timeOut = setTimeout(function(){doSlideUp(ele,maxlength,minlength)}, this.timeOutCounter );
				
				}
			}