var theImages = new Array(); theImages[0] = "

"; theImages[1] = "

"; theImages[2] = "

"; theImages[3] = "

"; theImages[4] = "

"; theImages[5] = "

"; theImages[6] = "

"; theImages[7] = "

"; theImages[8] = "

"; theImages[9] = "

"; theImages[10] = "

"; theImages[11] = "

"; theImages[12] = "

"; theImages[13] = "

"; theImages[14] = "

"; theImages[15] = "

"; theImages[16] = "

"; theImages[17] = "

"; theImages[18] = "

"; function showImage() { document.getElementById("imageRotator").innerHTML = GenerateString(); setTimeout(showImage, 10000); } function GenerateString() { var str = ""; var p = theImages.length; for (var i = 0; i < 5; i++) { var whichQuote = Math.round(Math.random()*(p-1)); if (str.indexOf(theImages[whichQuote]) == -1) str += theImages[whichQuote]; else i = i - 1 } return str; }