  function PBS_ad_info (link, image, ad_id) {
    this.link = link;
    this.image = image;
    this.ad_id = ad_id;
  }

  PBS_ad_info.prototype.adLink = function (url) {
    return "/ad/" + this.ad_id + url + "redir/" + this.link;
  }

  PBS_ad_info.prototype.adHtml = function (url, homepage) {
    var curr_page = document.location.pathname;
    if(!homepage && (curr_page == url || curr_page == url + "index.html"))
      return "<!-- no ad -->"
    else
      return '<div id="adbanner" style="text-align: center; margin-top: 2px; margin-bottom: 2px;"><a href="' + this.adLink(url) + '"><img src="' + this.image + '" alt="Ad Banner" style="width: 728px; height: 90px; border: 1px solid;"></a></div>'
  }

  var PBS_ads = new Object();
PBS_ads[0] = new PBS_ad_info("http://www.pbs.org/pov/pov2005/hidingandseeking/", "/images/log/adbanners/povhs.gif", "povhs");
PBS_ads[1] = new PBS_ad_info("http://www.shoppbs.org/category/index.jsp?categoryId=1955891", "/images/log/adbanners/shopaw.gif", "shopaw");
PBS_ads[2] = new PBS_ad_info("http://www.pbs.org/historydetectives", "/images/log/adbanners/historydetemondays.gif", "historydetemondays");

