//Paste the following code snippets over the corresponding code in the rn.js file

divs = ['test1','test2','test3','test4','test5','test6'];

function hideDivs() {
for (var i=0; i<divs.length; i++)
document.getElementById(divs[i]).style.display = 'none';

}

function showDiv() {
hideDivs(); //hide them all before we show the next one.
var randomDiv = divs[Math.floor(Math.random()*divs.length)];
var div = document.getElementById(randomDiv).style.display =
'block';

}

function displayDIV(whichDiv) {
//first turn off starter (even if its already off)
document.getElementById("test1").style.display ="none";
//then loop through all tests and turn all off
//will need to fix the number of divs here ie there are 3 test divs
for(var i= 1; i <= 6;i++) {
document.getElementById("test" + i).style.display ="none";
}
//then turn whichDiv on
document.getElementById(whichDiv).style.display ="block";

}
