



// Create arrays of articles
syndicate.article_title = new Array;
syndicate.article_url = new Array;
syndicate.article_date = new Array;
syndicate.article_summary = new Array;
syndicate.article_content = new Array;

// This section of the script is published by the software
syndicate.index = 0;
  syndicate.article_title[ syndicate.index ] = 'Steelers beat the odds; Big Ben update';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Steelers_beat_the_odds_Big_Ben_update_3754.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 11, 2005 - 9:40:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'For now, the uncertainty of Roethlisberger’s knee will have many panicking, Cowher said thus far he is not taking Ben out of the game this Sunday. Also, Steelers beat the odds against the Chargers this Monday. Mike Toxic with the inside story.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Steelers in Trouble?';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Steelers_in_Trouble_3682.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 5, 2005 - 8:56:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'With Clarke Haggans out for five weeks, and nine players\' status up in the air, including Bettis and Ward, will this effect the Steelers game against the Chargers this Monday?  With the Chargers having the one of the best offenses in the NFL, should the Steelers be worried?  Mike Toxic with the inside story.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Steelers ready for the bye';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Steelers_ready_for_the_bye_3648.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 3, 2005 - 3:00:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Pittsburgh Steelers lost to the New England Patriots setting their record at 2-1.  The best game of Steelers linebacker Clark Haggans‘ career will be his last game for at least five weeks and possibly longer.  How does the Steelers\' future look?  All this and more.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Roethlisberger Named Rookie Of Year';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Roethlisberger_Named_Rookie_Of_Year_1741.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 3, 2005 - 11:13:00 PM';
  syndicate.article_summary[ syndicate.index ] = '\'Big Ben\' has been named Rookie of the Year as announced by the Associated Press earlier this week.  He is the first quarterback and the fourth Steeler to receive the honor.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Despite Snowstorm, Bitter Temperatures, Steeler Fans Rev Up for Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Despite_Snowstorm_Bitter_Temperatures_Steeler_Fans_1629.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 22, 2005 - 3:17:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'Think some bitter cold and a snowstorm would stop and average Steeler fan? Think again! Fans both new and old are fired up for Sunday\'s game vs. New England. Also included: a list of weekend pre-game activities for fans.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Roethlisberger Flushing Stereotypes Down the Drain';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Roethlisberger_Flushing_Stereotypes_Down_the_Drain_1133.htm';
  syndicate.article_date[ syndicate.index ] = 'Nov 7, 2004 - 1:06:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'Steelers rookie QB just keeps on winning..but can it continue into today\'s \"Battle of Pennsylvania\" game vs. the Eagles?  Many tend to think so.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Former Steeler Dies in Crash Following Police Chase';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Steelers_267/Former_Steeler_Dies_in_Crash_Following_Police_Chas_857.htm';
  syndicate.article_date[ syndicate.index ] = 'Sep 30, 2004 - 4:28:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'Former Pittsburgh Steelers lineman Justin Strzelczyk was pronounced dead at the scene Thursday morning from injuries sustained in a firey car crash following a police chase.';
  syndicate.index++;




// Set defaults for arguments if user hasn't set them
if (syndicate.title_fontface == null)    { syndicate.title_fontface = 'Geneva, Arial, sans-serif'; }
if (syndicate.title_fontsize == null)    { syndicate.title_fontsize = '2'; }
if (syndicate.title_fontcolor == null)   { syndicate.title_fontcolor = '#003366'; }
if (syndicate.title_fontbold == null)    { syndicate.title_fontbold = true; }
if (syndicate.title_fontital == null)    { syndicate.title_fontital = false; }
if (syndicate.date_fontface == null)     { syndicate.date_fontface = 'Geneva, Arial, sans-serif'; }
if (syndicate.date_fontsize == null)     { syndicate.date_fontsize = '1'; }
if (syndicate.date_fontcolor == null)    { syndicate.date_fontcolor = '#6699cc'; }
if (syndicate.date_fontbold == null)     { syndicate.date_fontbold = false; }
if (syndicate.date_fontital == null)     { syndicate.date_fontital = false; }
if (syndicate.date_fontunder == null)    { syndicate.date_fontunder = false; }
if (syndicate.summary_fontface == null)  { syndicate.summary_fontface = 'Geneva, Arial, sans-serif'; }
if (syndicate.summary_fontsize == null)  { syndicate.summary_fontsize = '2'; }
if (syndicate.summary_fontcolor == null) { syndicate.summary_fontcolor = '#6699cc'; }
if (syndicate.summary_fontbold == null)  { syndicate.summary_fontbold = false; }
if (syndicate.summary_fontital == null)  { syndicate.summary_fontital = false; }
if (syndicate.summary_fontunder == null) { syndicate.summary_fontunder = false; }

if (syndicate.title_maxlength == null)   { syndicate.title_maxlength = 0; }
if (syndicate.summary_maxlength == null) { syndicate.summary_maxlength = 0; }

if (syndicate.bgcolor == null)           { syndicate.bgcolor = '#ffffff'; }
if (!syndicate.max_articles)             { syndicate.max_articles = syndicate.article_title.length; }  // !syndicate.max_articles catches null and zero
if (syndicate.display_date == null)      { syndicate.display_date = true; }
if (syndicate.display_summaries == null) { syndicate.display_summaries = true; }


// Don't allow user to display too many articles
if (syndicate.max_articles > syndicate.article_title.length) {
  syndicate.max_articles = syndicate.article_title.length;
}

/*
//Function to crop text on word boundaries
function crop_text(text, max_length) {

  // If the string is already small enough, return it unscathed
  if (text.length <= max_length) { return( text ); }

  // If the user has specified a length of 0, it means he wants the whole thing
  if (max_length == 0) { return( text ); }

  // Start looking for a space, leaving space for an elipsis on the end
  var test_length = (max_length - 3);
  if (test_length < 1) { return( '...' ); }   // max_length too small
  while (text.charAt(test_length) != ' ') {
    test_length--;

    // If we didn't find any spaces to break on, return the string broken at max_length
    if (test_length == 0) { return( text.substring(0, max_length - 3) + '...' ); }
  }

  return text.substring(0, test_length) + '...';
}
*/

// List our articles, stopping if the user doesn't want any more
for ( syndicate.index = 0; syndicate.index < syndicate.max_articles ; syndicate.index++ ) {

  /*syndicate.article_title[syndicate.index] = crop_text(syndicate.article_title[syndicate.index], syndicate.title_maxlength);
  syndicate.article_summary[syndicate.index] = crop_text(syndicate.article_summary[syndicate.index], syndicate.summary_maxlength);*/

  document.write('<tr><td bgcolor="' + syndicate.bgcolor + '">');
  document.write('<a href="' + syndicate.article_url[syndicate.index] + '">');
  if (syndicate.title_fontbold)  { document.write('<b>'); }
  if (syndicate.title_fontital)  { document.write('<i>'); }
  document.write('<font color="' + syndicate.title_fontcolor + '" face="' + syndicate.title_fontface + '" size="' + syndicate.title_fontsize + '"');
  if (syndicate.title_style)     { document.write(' style="' + syndicate.title_style + '"'); }
  document.write('>');
  document.write(syndicate.article_title[syndicate.index]);
  document.write('<br></font>');
  if (syndicate.title_fontital)  { document.write('</i>'); }
  if (syndicate.title_fontbold)  { document.write('</b>'); }
  document.write('</a>');

  if (syndicate.display_date) {
    if (syndicate.date_fontbold)  { document.write('<b>'); }
    if (syndicate.date_fontital)  { document.write('<i>'); }
    if (syndicate.date_fontunder) { document.write('<u>'); }
    document.write('<font color="' + syndicate.date_fontcolor + '" face="' + syndicate.date_fontface + '" size="' + syndicate.date_fontsize + '"');
    if (syndicate.date_style)     { document.write(' style="' + syndicate.date_style + '"'); }
    document.write('>');
    document.write(syndicate.article_date[syndicate.index]);
    document.write('<br></font>');
    if (syndicate.date_fontunder) { document.write('</u>'); }
    if (syndicate.date_fontital)  { document.write('</i>'); }
    if (syndicate.date_fontbold)  { document.write('</b>'); }
  }

  if (syndicate.display_summaries) {
    if (syndicate.summary_fontbold)  { document.write('<b>'); }
    if (syndicate.summary_fontital)  { document.write('<i>'); }
    if (syndicate.summary_fontunder) { document.write('<u>'); }
    document.write('<font color="' + syndicate.summary_fontcolor + '" face="' + syndicate.summary_fontface + '" size="' + syndicate.summary_fontsize + '"');
    if (syndicate.summary_style)     { document.write(' style="' + syndicate.summary_style + '"'); }
    document.write('>');
    document.write(syndicate.article_summary[syndicate.index]);
    document.write('<br></font>');
    if (syndicate.summary_fontunder) { document.write('</u>'); }
    if (syndicate.summary_fontital)  { document.write('</i>'); }
    if (syndicate.summary_fontbold)  { document.write('</b>'); }
  }

  document.write('<br></td></tr>\n');
}

// If you want your Webfeeds to be branded, uncomment the following lines.
// To do this, remove the // at the beginning of the next five lines:

//document.write('<tr><td bgcolor="' + syndicate.bgcolor + '">');
//document.write('<a href="#" target="_blank">');
//document.write('<font color="' + syndicate.title_fontcolor + '" face="Verdana, Arial, Helvetica, sans-serif" size="1">');
//document.write('<p><b>Powered by YourSite.com</b></font></a>');
//document.write('<br><br></b></font></td></tr>\n');

