

//Use the following variable to specify 
//the number of random words

var NoofWhere = 33

var where = new BuildArray(NoofWhere)

//Use the following variables to 
//define your random words:

where[1] = "on a bus"
where[2] = "on a train"
where[3] = "on a plane"
where[4] = "on a boat"
where[5] = "in the park"
where[6] = "at the fair"
where[7] = "in a car"
where[8] = "at home"
where[9] = "at work"
where[10] = "in a cave"
where[11] = "at the roadside"
where[12] = "in a field"
where[13] = "by a river"
where[14] = "by a lake"
where[15] = "by a pond"
where[16] = "in a taxi"
where[17] = "on a bike"
where[18] = "underwater"
where[19] = "on a mountain"
where[20] = "in a gully"
where[21] = "on the beach"
where[22] = "in a palace"
where[23] = "in a far off galaxy"
where[24] = "in a hotel"
where[25] = "in a retirement home"
where[26] = "at sea"
where[27] = "in a tent"
where[28] = "at an oasis"
where[29] = "in the desert"
where[30] = "in a club"
where[31] = "at a swimming pool"
where[32] = "in the library"
where[33] = "up a tree"

function BuildArray(size){
    this.length = size
    for (var i = 1; i <= size; i++){
        this[i] = null}
    return this
}

function PickRandomWhere(frm) {
    // Generate a random number between 1 and NoofWhere
    var rnd = Math.ceil(Math.random() * NoofWhere)

    // Display the word inside the text box
    frm.WhereBox.value = where[rnd]
}


