function AddRotator()
{
  this.items = new Array();
}
AddRotator.prototype.add = function(image, link)
{
  this.items[this.items.length] = new AddRotatorItem(image,link);
}
AddRotator.prototype.draw = function()
{
  index = parseInt(Math.random() * this.items.length);
  var item = this.items[index];

  var htm = "<a href=\"{link}\"><img border=0 src=\"{image}\"></a>";
  htm = htm.replace(/{link}/, item.link).replace(/{image}/, item.image);
  document.write(htm);
}
function AddRotatorItem(image, link)
{
  this.image = image;
  this.link = link || "#";
}
