



// 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 ] = 'Magic knock off Cavs 99-88, end Cleveland\'s streak';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Magic_knock_off_Cavs_99-88_end_Cleveland_s_streak.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 30, 2009 - 7:35:45 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Orlando Magic are looking more and more like a contender in the Eastern Conference.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'James, Gibson help Cavs tame Bobcats';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/James_Gibson_help_Cavs_tame_Bobcats.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 30, 2008 - 10:27:28 PM';
  syndicate.article_summary[ syndicate.index ] = 'LeBron James scored 22 points, Daniel Gibson had 20 of his 25 in the first half and the Cleveland Cavaliers won their home opener 96-79 over Charlotte on Thursday night, spoiling well-traveled coach Larry Brown\'s debut with the Bobcats.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Banner 17, win No. 1 for NBA champion Celtics';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Banner_17_win_No_1_for_NBA_champion_Celtics.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 28, 2008 - 10:04:39 PM';
  syndicate.article_summary[ syndicate.index ] = 'Banner No. 17 is up in the rafters, and win No. 1 is in the books.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Cavaliers sign Gibson to 5-year deal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/Cavaliers_sign_Gibson_to_5-year_deal.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 16, 2008 - 5:49:19 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Cavaliers finally made a move this offseason, signing sharpshooter Daniel Gibson to a five-year contract Wednesday. Bringing back Gibson, a restricted free agent, was one of Cleveland\'s top priorities. Financial terms of the deal were not disclosed.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Pierce scores 41 to lead Celtics to Eastern finals';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Pierce_scores_41_to_lead_Celtics_to_Eastern_finals.htm';
  syndicate.article_date[ syndicate.index ] = 'May 19, 2008 - 6:42:55 AM';
  syndicate.article_summary[ syndicate.index ] = 'Paul Pierce returned home and made sure the Celtics would play there again. Boston\'s captain scored 41 points - and still lost a shootout with LeBron James with 45 - but led the team with the NBA\'s best regular season record to a 97-92 victory over the Cleveland Cavaliers on Sunday in Game 7 of the Eastern Conference semifinals.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Celtics beat Cavs 96-89 to take 3-2 lead in series';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Celtics_beat_Cavs_96-89_to_take_3-2_lead_in_series.htm';
  syndicate.article_date[ syndicate.index ] = 'May 15, 2008 - 7:14:00 AM';
  syndicate.article_summary[ syndicate.index ] = 'Someone is going to have to win in Boston to keep the Celtics from winning their 17th NBA title. Cleveland hopes for one more chance.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'James, Cavs batter Celtics to even series at 2-2';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/James_Cavs_batter_Celtics_to_even_series_at_2-2.htm';
  syndicate.article_date[ syndicate.index ] = 'May 13, 2008 - 7:37:49 AM';
  syndicate.article_summary[ syndicate.index ] = 'Back to even, and back to Boston - with authority. LeBron James scored 21 points, jamming in a powerhouse dunk over a defenseless Kevin Garnett in the final two minutes, as the Cleveland Cavaliers beat the homesick Celtics 88-77 in Game 4 on Monday night to tie the best-of-seven series at 2-2.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Pierce, Allen lead Celtics to 89-73 Game 2 win over Cavs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Pierce_Allen_lead_Celtics_to_89-73_Game_2_win_over_Cavs.htm';
  syndicate.article_date[ syndicate.index ] = 'May 9, 2008 - 2:42:52 AM';
  syndicate.article_summary[ syndicate.index ] = 'Paul Pierce and Ray Allen found their shooting touch. LeBron James can only hope he left his in Cleveland. Pierce scored 19 points, Kevin Garnett added 13 with 12 rebounds, and Allen broke out of a seven-quarter scoring drought with 16 points to help the Boston Celtics beat the Cavaliers 89-73 on Thursday night and take a 2-0 lead in the Eastern Conference semifinals.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Celtics hold James to 12 points to edge Cavs 76-72 in Game 1';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Celtics_hold_James_to_12_points_to_edge_Cavs_76-72_in_Game_1.htm';
  syndicate.article_date[ syndicate.index ] = 'May 7, 2008 - 7:32:40 AM';
  syndicate.article_summary[ syndicate.index ] = 'LeBron James couldn\'t make a basket down the stretch - or at virtually any other time - and the Boston Celtics eked out a 76-72 victory over the Cleveland Cavaliers on Tuesday night in the opener of the Eastern Conference semifinals.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Celtics rout Hawks in Game 7 to set up matchup with Cavs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Boston_Celtics_61/Celtics_rout_Hawks_in_Game_7_to_set_up_matchup_with_Cavs.htm';
  syndicate.article_date[ syndicate.index ] = 'May 4, 2008 - 5:20:24 PM';
  syndicate.article_summary[ syndicate.index ] = 'Kevin Garnett took a behind-the-back pass from Paul Pierce, slammed in the dunk to make the lead three dozen points and then slashed his hand across his throat to signal what the Atlanta Hawks already knew. \"It\'s over,\" he told the crowd. The game. The series. The surprising little scare Atlanta put into the NBA\'s best.';
  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');

