Cut'n'paster, very slow... failed so far to adapt scripts which show images or get quotes.

I have a random number generator for nos. 6-9:
Math.floor(Math.random() * (max - min + 1) + min)

Math.floor(Math.random() * (3 + 1) + 4)

A link is to activate one of a pair of functions, odd numbers activating functionA(), evens functionB().

This process is reiterated 5 times, each iteration calling one of a new pair of functions: but I think I can handle that part once the basics are ok.

Functions A and B nd the rest are primitive, but they work: see
http://www-personal.usyd.edu.au/~ctillam/changesBox.htm, script at /engine.js.

Can someone help with the steps? I'm thinking...

make the random function, eg:

function get69() {
var yinyang = Math.floor(Math.random() * (3 + 1) + 4);
return yinyang}

function getLine1() {
var whichLine=get69();

var line=new Array(4)
line[0]="yin1()";
line[1]="yang1()";
line[2]="yin1()";
line[3]="yang1()";

Anything else needed,or can we go straight to the link in the body?
link:
<a href="#" onClick="getLine1(); return false">link</a>

Any help appreciated. Cheers.