// hypercube.js
// Include this js file only if you've defined an image with id="Hyper".

gifs = new Array(
  "rotating hypercube a.gif",
  "rotating hypercube b.gif",
  "rotating hypercube c.gif",
  "rotating hypercube d.gif",
  "rotating hypercube e.gif",
  "rotating hypercube f.gif"
  )
  gifcount = gifs.length;
  randomNum = 0;
  function SelectGif() {
   randomNum = Math.floor((Math.random() * gifcount));
   h=document.getElementById("Hyper");
   h.src = "images/" + gifs[randomNum];
   h.alt = gifs[randomNum];
  }
  function NextGif() {
   ++randomNum;
   randomNum %= gifcount;
   h=document.getElementById("Hyper");
   h.src = "images/" + gifs[randomNum];
   h.alt = gifs[randomNum];
   //document.Hyper.src = "images/" + gifs[randomNum]
   //document.Hyper.alt = gifs[randomNum]
  }
  
