<script language="javascript">
var number = 4
var txt = new Array(number+1)
txt[0]="Текст 1"
txt[1]="Текст 2"
txt[2]="Текст 3"
txt[3]="Текст 4"
txt[4]="Текст 5"
function randomtxt(){
var randscript = -1
while (randscript < 0 || randscript > number || isNaN(randscript)){
randscript = parseInt(Math.random()*(number+1)) }
return randscript }
quo = randomtxt()
quox = txt[quo]
document.write(quox)
</script>