var dictionaries = new Array(); function get_random() { var ranNum= Math.floor(Math.random()*numDicts); return ranNum; } var content =""; dictionaries.push("Really Learn 100 Phrasal Verbs##http://www.oup.com/elt/catalogue/isbn/0-19-431744-7#http://fds.oup.com/covers/019/431/0-19-431744-7_130.gif#100"); dictionaries.push("Really Learn 100 Phrasal Verbs for Business##http://www.oup.com/elt/catalogue/isbn/0-19-431696-3#http://fds.oup.com/covers/019/431/0-19-431696-3_130.gif#100"); dictionaries.push("Really Learn 100 More Phrasal Verbs##http://www.oup.com/elt/catalogue/isbn/0-19-431745-5#http://fds.oup.com/covers/019/431/0-19-431745-5_130.gif#100"); var numDicts = dictionaries.length; var myDictNum = get_random(numDicts); var thisDict = dictionaries[myDictNum].split("#"); content += '

Also available from Oxford

'; content += '' + thisDict[0] + ' cover
' + thisDict[0] + '

' + thisDict[1] + '
'; document.write (content);