  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 + '?log=1" 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/independentlens/mirrordance/", "/images/log/adbanners/ilmirror.gif", "ilmirror");
PBS_ads[1] = new PBS_ad_info("http://www.shoppbs.org/product/index.jsp?productId=2139075", "/images/log/adbanners/shopstorm.gif", "shopstorm");
PBS_ads[2] = new PBS_ad_info("http://www.shoppbs.org/product/index.jsp?productId=2132090", "/images/log/adbanners/shopmyth.gif", "shopmyth");
