// irongut_news.js v2.1
// JavaScript for About Delphi Headlines on IDP http://www.paranoia.clara.net
// Uses JavaScript feed from About Delphi http://delphi.about.com
// v2.1 uses HTML 4.01 Strict with CSS
// Written by Dave Murray. Copyright (c) 2003 Conspiracy Software

//  REQUIRES: http://z.about.com/6/g/delphi/b/b.js

// function AboutDelphiDate() - displays datestamp of current headlines
// function ADItems(t,u,d) - display headline item
// function AboutDelphiHeadlines(c) - displays current headlines in a table


function AboutDelphiDate(){
  // displays datestamp of current headlines
  document.writeln('<span class="rssChannelDate">'+zIBlg[3]+'</span>')
  }

function ADItems(t,u,d){
  // display headline item
  while (d.indexOf("\"") != -1){
    d = d.replace("\"", "");
    }
  document.writeln('<dt class="rssItem"><a href="'+u+'" title="Read this on About Delphi">'+t+'</a></dt><dd class="rssItem">'+d+'</dd>');
  }

function AboutDelphiHeadlines(c){
  // displays current headlines
  var i = 0;                        //counter
  var l = this.zIBlgI.length - 1;   //length of the item array
  var c = (c)?(c*3)-1:29;           //calculate how many to display[default 10] 
  if (c && l > c) l = c;            //ensure items to display < number of items
  document.writeln('<div class="rssChannel">');
  while (i < l) {
    document.writeln('<dl class="rssItem">');
    ADItems(this.zIBlgI[i++], this.zIBlgI[i++], this.zIBlgI[i++]);
    document.writeln('</dl>');
    }
  document.writeln('</div>');
  }


