I have found (from what I can see) a good javascript slider that does what I need it to in a simple and effective way. However, it opens the first of the sliding sections on pageload and I was wondering if anyone would be able to show me which part of the code I should change to keep them all shut when the page is loaded?

I'm not very good with javascript and the code I have here confuses me.
I take no credit for its creation. I obtained it from here under the creative commons licence.

If you think this code is useless then please do say so. It appears to work in the browsers I have tested it in (ie, ff, chrome). I had tried using MooTools and jQuery before but found it too hard to set up and when they do start working too easy to break with other conflicting scripts.

Thanks in advance to all you wonderful people that take a look for me.

Javascript:
Code:
var slider=function(){
	var array=[]; var speed=10; var timer=10;
	return{
		init:function(t,c){
			var s,ds,l,i,y;
			s=document.getElementById(t); ds=s.getElementsByTagName('div'); l=ds.length; i=y=0;
			for(i=0;i<l;i++){
				var d,did; d=ds[i]; did=d.id;
				if(did.indexOf("header")!=-1){
					y++; d.onclick=new Function("slider.process(this)");
				}else if(did.indexOf("content")!=-1){
					array.push(did.replace('-content','')); d.maxh=d.offsetHeight;
					if(c!=y){d.style.height='0px'; d.style.display='none'}
					else{d.style.display='block'}
				} 
			}
		},
		process:function(d){
			var cl,i; cl=array.length; i=0;
			for(i;i<cl;i++){
				var s,h,c,cd;
				s=array[i]; h=document.getElementById(s+'-header');
				c=s+'-content'; cd=document.getElementById(c); clearInterval(cd.timer);
				if(h==d&&cd.style.display=='none'){
					cd.style.display='block'; this.islide(c,1);
				}else if(cd.style.display=='block'){this.islide(c,-1)}
			}
		},
		islide:function(i,d){var c,m; c=document.getElementById(i); m=c.maxh; c.direction=d; c.timer=setInterval("slider.slide('"+i +"')",timer)},
		slide:function(i){
			var c,m,h,dist; c=document.getElementById(i); m=c.maxh; h=c.offsetHeight;
			dist=(c.direction==1)?Math.round((m-h)/speed):Math.round(h/speed);
			if(dist<=1){dist=1}
			c.style.height=h+(dist*c.direction)+'px'; c.style.opacity=h/c.maxh; c.style.filter='alpha(opacity='+(h*100/c.maxh)+')';
			if(h<2&&c.direction!=1){
				c.style.display='none'; clearInterval(c.timer);
			}else if(h>(m-2)&&c.direction==1){clearInterval(c.timer)}
		}
};}();
HTML:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>JavaScript Slider Example</title>

<link rel="stylesheet" href="slider.css" type="text/css" />

<script type="text/javascript" src="slider.js"></script>

</head>

<body onload="slider.init('slider',1)">

<div id="slider">

  <div class="header" id="one-header">Header One</div>

  <div class="content" id="one-content">

    <div class="text">

      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris mollis cursus dolor. Vivamus sapien nunc, vestibulum eget, facilisis vel, luctus at, nunc. Nam ullamcorper volutpat elit. Vivamus sapien nunc, vestibulum eget, facilisis vel, luctus at, nunc. Nam ullamcorper volutpat elit.

    </div>

  </div>

  <div class="header" id="two-header">Header Two</div>

  <div class="content" id="two-content">

    <div class="text">

      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris mollis cursus dolor. Vivamus sapien nunc, vestibulum eget, facilisis vel.

    </div>

  </div>

  <div class="header" id="three-header">Header Three</div>

  <div class="content" id="three-content">

    <div class="text">

      Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris mollis cursus dolor. Vivamus sapien nunc, vestibulum eget, facilisis vel, luctus at, nunc. Nam ullamcorper volutpat elit. Vivamus sit amet velit eu sapien dignissim mattis. 

    </div>

  </div>

</div>

</body>

</html>
CSS:
Code:
#slider {}

.header {

	padding:8px; 

	font-weight:bold; 

	margin-top:5px; 

	cursor:pointer;

	background-color:#cceeff;

}

.header:hover {

	background-color:#ccccff;

}

.content {overflow:hidden}

.text { 

	padding:15px

}