// JavaScript to interpolate random images into a page. var ic = 9; // Number of alternative images var pic1 = new Array(ic); // Array to hold filenames var pic1cap = new Array (ic); // Array to hold caption // var pic2 = new Array(ic); // Array to hold filenames pic1[0] = "image_1.jpg"; pic1[1] = "image_2.jpg"; pic1[2] = "image_3.jpg"; pic1[3] = "image_4.jpg"; pic1[4] = "image_2.jpg"; pic1[5] = "image_10.jpg"; pic1[6] = "image_4.jpg"; pic1[7] = "image_8.jpg"; pic1[8] = "image_9.jpg"; // pic1[9] = "image_6.jpg"; // pic1[10] = "image_7.jpg"; pic1cap[0] = "Photos taken by members of CPPNJ and FDU Web Operations"; //pic2[0] = "headergraphic01.jpg"; function pickRandom(range) { if (Math.random) return Math.round(Math.random() * (range-1)); else { var now = new Date(); return (now.getTime() / 1000) % range; } } // Write out an IMG tag, using a randomly-chosen image name. var choice1 = pickRandom(ic); document.writeln('Photos taken by members of CPPNJ and FDU Web Operations'); function addCh(str) { document.getElementById('comment').value+=str; // document.form.comment.focus(); }