index = new Array(10);
image=new Array(25); var i=0;
image[i++] = new Array("Titus_Lucretius_Carus","c. 99-55 BCE","http://www.humanistictexts.org/lucretius.htm");
image[i++] = new Array("Voltaire","1694-1778","http://en.wikipedia.org/wiki/Voltaire");
image[i++] = new Array("David_Hume","1711-1776","http://en.wikipedia.org/wiki/David_Hume");
image[i++] = new Array("Baron_d'Holbach","1723-1789","http://en.wikipedia.org/wiki/Baron_d'Holbach");
image[i++] = new Array("Jeremy_Bentham","1749-1832","http://en.wikipedia.org/wiki/Jeremy_Bentham");
image[i++] = new Array("Mary_Wollstonecraft","1759-1797","http://en.wikipedia.org/wiki/Mary_Wollstonecraft");
image[i++] = new Array("Thomas_Paine","1773-1809","http://en.wikipedia.org/wiki/Thomas_Paine");
image[i++] = new Array("Percy_Bysshe_Shelley","1792-1822","http://en.wikipedia.org/wiki/Percy_Bysshe_Shelley");
image[i++] = new Array("John_Stuart_Mill","1806-1873","http://en.wikipedia.org/wiki/John_Stuart_Mill");
image[i++] = new Array("Charles_Darwin","1808-1882","http://en.wikipedia.org/wiki/Charles_darwin");
image[i++] = new Array("George_Holyoake","1817-1906","http://en.wikipedia.org/wiki/Gj_holyoake");
image[i++] = new Array("Thomas_Huxley","1825-1895","http://en.wikipedia.org/wiki/Thomas_Huxley");
image[i++] = new Array("Charles_Bradlaugh","1833-1891","http://www.secularism.org.uk/charlesbradlaugh.html");
image[i++] = new Array("Thomas_Hardy","1840-1928","http://en.wikipedia.org/wiki/Thomas_Hardy");
image[i++] = new Array("George_William_Foote","1850-1915","http://en.wikipedia.org/wiki/George_William_Foote");
image[i++] = new Array("Bertrand_Russell","1872-1970","http://plato.stanford.edu/entries/russell/");
image[i++] = new Array("Hermann_Bondi","1919-2005","http://en.wikipedia.org/wiki/Hermann_Bondi");
image[i++] = new Array("Barbara_Smoker","1923-","http://www.barbara.smoker.freeuk.com/");
image[i++] = new Array("Claire_Rayner","1931-","http://en.wikipedia.org/wiki/Claire_Rayner");
image[i++] = new Array("Richard_Dawkins","1941-","http://www.simonyi.ox.ac.uk/dawkins/WorldOfDawkins-archive/Dawkins/Biography/bio.shtml");
image[i++] = new Array("Daniel_Dennett","1942-","http://en.wikipedia.org/wiki/Daniel_Dennett");
image[i++] = new Array("Keith_Porteous_Wood","1947-","http://www.philosopedia.org/index.php?title=Keith_Porteous_Wood");
image[i++] = new Array("Simon_Blackburn","1944-","http://www.phil.cam.ac.uk/~swb24/");
image[i++] = new Array("Linda_Smith","1958-2006","http://en.wikipedia.org/wiki/Linda_Smith_(comedian)");
image[i++] = new Array("Muriel_Gray","1959-","http://en.wikipedia.org/wiki/Muriel_Gray");
// New images

Nimages = i;

function newRandom(i) {
  do {  
    var j = Math.floor(Math.random()*Nimages);
    for(var k=0; k<i; k++) if (index[k] == j) break;
  } while (k<i);
  return j;
}
function changeImage(Ndisplay) {
  document.form1.newbutton.disabled = document.form1.select.selectedIndex != 0;
  var imgs = document.form1.getElementsByTagName("img");
  var caps = document.form1.elements;
  var v = Math.min((document.form1.select.selectedIndex-1)*Ndisplay, Nimages-Ndisplay);
  for (var i=0; i<Ndisplay; i++) {
    var j = (v < 0)?newRandom(i):v++;
    index[i] = j;
    caps[i].value=image[j][0].replace(/_/g," ")+"\n"+image[j][1];
    imgs[i].src="/gallery/"+image[j][0]+".jpg";
  }
}
function getInfo(k) {
  window.open(image[index[k]][2],"_top");
}
