묻고답하기

<html><head><script language="JavaScript">
<!--

song = new Array(3);
song[0] = 't2.mp3'
song[1] = 't3.mp3'
song[2] = 't1.mp3'

title = new Array(3);
title[0] = '헬 마치'
title[1] = '투낙투낙 툰'
title[2] = '제너럴 o.s.t'

index = Math.floor(Math.random() * song.length);
document.write("<embed src="+song[index]+" autostart=true hidden=true loop=infinite>");
document.write(title[index]);

//-->
</script></body></html>
이곳을 둘러보던 중에 이 태그를 써 봐서 음악을 랜덤으로 돌려보려고 했는데 랜덤하게 나오긴 하지만 음악이 하나 끝나면 더이상 나오지 않습니다. 음악이 끝나면 다른 음악을 나오게 하고 싶은데요.. 태그가 틀린건가요?