How do I modify a script like the one below? I want to use a random list, but there are 10 items and I only want 5 of them to show on the webpage at any given time.

(script)

var content=new Array() //
content[0]='aaaaaaaaa'
content[1]='bbbbbbbbb'
content[2]='ccccccccc'

function randomorder(targetarray, spacing){

var randomorder=new Array()
var the_one
var z=0
for (i=0;i<targetarray.length;i++)
randomorder[i]=i

while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
document.write(targetarray[the_one]+spacing)
targetarray[the_one]="_selected!"
z++
}
}
}

(/script)

----------------------------

(script)
//2) Call function randomorder(arrayname, space_between_content)
randomorder(content, '<br><br>')
randomorder(diffcontent, '<br>')
(/script)

Thanks!