
// Calling Example:
// randomImage(['0.gif','http://www.alfred.edu/','1.gif','http://www.alfred.edu/its/','2.gif','http://www.somethingelse.com/']); 

function randomNumber(limit){
  return Math.floor(Math.random()*limit);
}

function randomImage(imgArr)
{
  var imgSrc, imgW, imgH, r;
  rn = randomNumber(imgArr.length / 2);
  
  imgName = imgArr[rn * 2];
  imgHref = imgArr[(rn * 2) + 1];

  document.write('<a href="'+imgHref+'"><img src="'+imgName+'" width="480" height="70" border="0"></a>');
}
