Почему не работает такой код
<div id="yu">
<img src="Smail/1.gif" width="20" height="24" title="smail:-)" />
<img src="Smail/2.gif" width="28" height="23" title="laughing out lou" />
<img src="Smail/5.gif" width="30" height="26" title="tank you" />
</div>
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
var cont=document.getElementById('yu');
var arr=[];
for (var x=cont.firstChild;x!=null;x=x.nextSibling)
{ var y=x.getAttribute('title') ;
arr.push(y);}
var kl=arr[0] ;
alert(kl);
/*]]>*/
</script>