<!--

function image(_name, _width, _height) {
  this.name = _name;
  this.width = _width;
  this.height = _height;
}

// create array of image objects
jslogo = new Array();
jslogo[0] = new image("assets/background/back_horticulture.jpg", 452, 117);
jslogo[1] = new image("assets/background/back_turf.jpg", 452, 117);
jslogo[2] = new image("assets/background/back_gardens.jpg", 452, 117);


// This function returns an image tag that can be written to the html document
function randomImageTag(imgs) {
  // index to the selected image
  var idx = Math.floor(Math.random() * imgs.length);

  var tag = "<img src=\"" + imgs[idx].name + "\"";

  // if image width is defined
  if (imgs[idx].width != 0)
    tag += " width=" + imgs[idx].width;

  // if image height is defined
  if (imgs[idx].height != 0)
    tag += " height=" + imgs[idx].height;
 
  tag += ">";

  return tag;
}

// -->