



// 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 ] = 'Nets trade Jefferson to Bucks for Yi, Simmons';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Nets_63/Nets_trade_Jefferson_to_Bucks_for_Yi_Simmons.htm';
  syndicate.article_date[ syndicate.index ] = 'Jun 27, 2008 - 2:21:32 PM';
  syndicate.article_summary[ syndicate.index ] = 'The New Jersey Nets decided to part ways with the second-leading scorer in franchise history, dealing Richard Jefferson to Milwaukee hours before the draft Thursday for forwards Yi Jianlian and Bobby Simmons.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Kidd returns to Mavs in 8-player trade';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Kidd_returns_to_Mavs_in_8-player_trade.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 19, 2008 - 6:06:26 PM';
  syndicate.article_summary[ syndicate.index ] = 'Jason Kidd is a member of the Dallas Mavericks. Again. Finally. The long-discussed, once-scuttled and ultimately reconfigured deal to bring Kidd from New Jersey back to the team that drafted him was finalized Tuesday. He was reintroduced in Dallas 14 years after the Mavericks made him the No. 2 pick.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Nets ink Vince Carter to multiyear deal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Nets_63/Nets_ink_Vince_Carter_to_multiyear_deal.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 13, 2007 - 4:03:53 PM';
  syndicate.article_summary[ syndicate.index ] = 'The New Jersey Nets signed a deal with guard Vince Carter on Friday that will keep the eight-time All-Star in New Jersey at least through the 2010-11 season.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Nets, Carter agree to $60M over 4 years';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Nets_63/Nets_Carter_agree_to_60M_over_4_years.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 1, 2007 - 7:38:46 PM';
  syndicate.article_summary[ syndicate.index ] = 'Vince Carter and the New Jersey Nets have the framework in place for a four-year contract that guarantees the All-Star more than $60 million, according to a person with knowledge of the deal.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Cavs reach 1st Eastern final since 1992';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/Cavs_reach_1st_Eastern_final_since_1992.htm';
  syndicate.article_date[ syndicate.index ] = 'May 18, 2007 - 10:02:40 PM';
  syndicate.article_summary[ syndicate.index ] = 'LeBron James came back just in time to make sure the New Jersey Nets couldn\'t. James, who had a long stint on the bench with foul trouble, scored 23 points, and the Cleveland Cavaliers advanced to the Eastern Conference finals for the first time in 15 years by beating the Nets 88-72 Friday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Nets fight off elimination, beat Cavs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Nets_63/Nets_fight_off_elimination_beat_Cavs.htm';
  syndicate.article_date[ syndicate.index ] = 'May 17, 2007 - 5:05:53 AM';
  syndicate.article_summary[ syndicate.index ] = 'They had overcome numerous injuries, trade rumors and talk of an eventual breakup for months. So with their season on the line, the New Jersey Nets did what they\'ve always done. Survived. \"This has been the makeup of this team,\" Jason Kidd said. \"We were counted out.\" On Wednesday night, they got up off the mat again.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'James, Cavs close in on East finals';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/James_Cavs_close_in_on_East_finals.htm';
  syndicate.article_date[ syndicate.index ] = 'May 14, 2007 - 10:22:17 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Cleveland Cavaliers regained control of the Eastern Conference semifinals by making New Jersey\'s Big Three look awfully small. LeBron James had 30 points, nine rebounds and seven assists, and the Cavaliers moved one victory from their first conference finals appearance in 15 years by beating the Nets 87-85 in Game 4 on Monday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'LeBron means business as Cavs cut Nets';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/LeBron_means_business_as_Cavs_cut_Nets.htm';
  syndicate.article_date[ syndicate.index ] = 'May 9, 2007 - 4:22:31 AM';
  syndicate.article_summary[ syndicate.index ] = 'Wearing a menacing scowl, LeBron James stomped toward Cleveland\'s jubilant bench, celebrating another of his big baskets. He wasn\'t about to flash that multimillion-dollar smile. Not now. This wasn\'t the time or the place.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Cavaliers defeat Nets in series opener';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/Cavaliers_defeat_Nets_in_series_opener.htm';
  syndicate.article_date[ syndicate.index ] = 'May 6, 2007 - 3:55:46 PM';
  syndicate.article_summary[ syndicate.index ] = 'LeBron James had a nasty head cold. The New Jersey Nets had a bigger headache. Cleveland\'s defense kept New Jersey\'s Big 3 from getting into an offensive flow and James sniffled his way to 21 points as the Cavaliers opened the Eastern Conference semifinals with an 81-77 victory over the Nets on Sunday.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Jefferson carries Nets into 2nd round';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Nets_63/Jefferson_carries_Nets_into_2nd_round.htm';
  syndicate.article_date[ syndicate.index ] = 'May 5, 2007 - 12:03:52 AM';
  syndicate.article_summary[ syndicate.index ] = 'Richard Jefferson\'s ankle injury was one of the many reasons the New Jersey Nets underachieved this season. Watching Jefferson rise for the go-ahead basket and leap for the clinching steal was a reminder that he\'s healthy — and the Nets look pretty good, too.';
  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');

