// JavaScript to interpolate random images into a page. var ic = 4; // 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] = "header_06.jpg"; pic1cap[0] = "Photo courtesy of Chris Eyre and Scott Garen"; pic1[1] = "header_07.jpg"; pic1cap[1] = "Lapowinsa, Chief of the Lenape"; pic1[2] = "header_08.jpg"; pic1cap[2] = "Mohegan sun at dusk, posted by grendelkhan"; pic1[3] = "header_05.jpg"; pic1cap[3] = "Image of Stephen Talkhouse"; 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.write(''); document.write('
'); document.write(''); document.write('
'+pic1cap[choice1]+'
'); function addCh(str) { document.getElementById('comment').value+=str; // document.form.comment.focus(); }