var texts = new Array() texts[1] = "any code here" texts[2] = "any code here" texts[3] = "any code here" texts[4] = "any code here" var ry = Math.floor(Math.random() * texts.length) if (ry == 0) { ry = 1 } document.write(texts[ry]);