Janek: kleine Javascript gallerie

Beitrag lesen

also das ist mein html:

<div id="gallerie">

<div id="thumbs">
                    <img src="img/thb/thb_1.jpg" alt="thumb_1.jpg" />
                    <img src="img/thb/thb_2.jpg" alt="thumb_2.jpg" />
                    <img src="img/thb/thb_3.jpg" alt="thumb_3.jpg" />
                    <img src="img/thb/thb_4.jpg" alt="thumb_4.jpg" />
                    <img src="img/thb/thb_5.jpg" alt="thumb_5.jpg" />
                    <img src="img/thb/thb_6.jpg" alt="thumb_6.jpg" />
                    <img src="img/thb/thb_7.jpg" alt="thumb_7.jpg" />
                    <img src="img/thb/thb_8.jpg" alt="thumb_8.jpg" />
                    <img src="img/thb/thb_9.jpg" alt="thumb_9.jpg" />
                    <img src="img/thb/thb_10.jpg" alt="thumb_10.jpg" />
                </div>
                        <span id="span"> <!--<div id="big" style="display:none;"> --> </span></div>

</div>

das ist mein javascript:

document.observe('dom:loaded',init);

function init() {

var eins = $$('#thumbs img');  
  
for (i=0; i<eins.length; i++){  
  
eins[i].onclick = fade\_in;  
  
}  

};

function fade_in () {

$('span').innerHTML = '<div id="big" style="display:none;">' ;  
  
var zwei = this.alt;  
  
var drei = zwei.slice(6);  
  
var div= $('big');  
  
var bild = '<img src="img/original/'+drei+'">';  
  
div.innerHTML = bild;  
  
div.appear();  

};

function schreib() {
$('span').innerHTML = '<div id="big" style="display:none;">' ;
};

danke für die hilfe.