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, 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)

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

Any help appreciated. Cheers.