// Based on a script by Hypergurl
// http://www.hypergurl.com

// JavaScript to interpolate random images into a page.

var ic = 2;                // Number of alternative images
var xoxo = new Array(ic);  // Array to hold filenames
var alts = new Array(ic);  // Text to put in the ALT attribute
var heights = new Array(ic);  
var widths  = new Array(ic);  
        
xoxo[0] = "Pic/me1.jpg";
xoxo[1] = "Pic/me2.jpg";

heights[0] = 320;
heights[1] = 205;

widths[0]  = 240;
widths[1]  = 308;

alts[0] = "Marco resting";
alts[1] = "Marco resting";


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 choice = pickRandom(ic);

function showIt() {
  document.writeln('<IMG SRC="' + xoxo[choice] + '" HEIGHT=184 WIDTH=120 ALT="' + alts[choice] + '" >');
}



