

//Use the following variable to specify 
//the number of random words

var NoofWhat2 = 28

var what2 = new BuildArray(NoofWhat2)

//Use the following variables to 
//define your random words:

what2[1] = "book"
what2[2] = "note pad"
what2[3] = "pencil"
what2[4] = "wrench"
what2[5] = "torch"
what2[6] = "screwdriver"
what2[7] = "cat"
what2[8] = "horse"
what2[9] = "car"
what2[10] = "wheel"
what2[11] = "lorry"
what2[12] = "CD"
what2[13] = "personal stereo"
what2[14] = "radio"
what2[15] = "watch"
what2[16] = "jewelry"
what2[17] = "ghost"
what2[18] = "gift"
what2[19] = "piano"
what2[20] = "broom"
what2[21] = "file"
what2[22] = "dust"
what2[23] = "champagne glass"
what2[24] = "cashew nuts"
what2[25] = "footprint"
what2[26] = "letter"
what2[27] = "tablets"
what2[28] = "email"

function BuildArray(size){
    this.length = size
    for (var i = 1; i <= size; i++){
        this[i] = null}
    return this
}

function PickRandomWhat2(frm) {
    // Generate a random number between 1 and NoofWhat2
    var rnd = Math.ceil(Math.random() * NoofWhat2)

    // Display the word inside the text box
    frm.WhatBox2.value = what2[rnd]
}

