



// 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 ] = 'Devils goalie Martin Brodeur to undergo surgery';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_goalie_Martin_Brodeur_to_undergo_surgery.htm';
  syndicate.article_date[ syndicate.index ] = 'Nov 4, 2008 - 10:42:51 PM';
  syndicate.article_summary[ syndicate.index ] = 'For the next three to four months, the New Jersey Devils are going to learn about life without Martin Brodeur. The 36-year-old Brodeur, a four-time Vezina Trophy winner who is on the verge of becoming the NHL\'s all-time winningest goaltender, will be sidelined until at least February after tearing a distal biceps in his left elbow last weekend.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Devils hire Brent Sutter as coach';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_hire_Brent_Sutter_as_coach.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 13, 2007 - 1:52:23 PM';
  syndicate.article_summary[ syndicate.index ] = 'Brent Sutter was hired as the coach of the three-time Stanley Cup champion New Jersey Devils on Friday, taking over one of the NHL\'s least secure jobs.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Devils sign G Weekes';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_sign_G_Weekes.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 5, 2007 - 3:21:01 PM';
  syndicate.article_summary[ syndicate.index ] = 'The New Jersey Devils signed Kevin Weekes on Thursday to back up record-setting goaltender Martin Brodeur.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Senators beat Devils to make East final';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Ottawa_Senators_131/Senators_beat_Devils_to_make_East_final.htm';
  syndicate.article_date[ syndicate.index ] = 'May 5, 2007 - 10:55:31 PM';
  syndicate.article_summary[ syndicate.index ] = 'First Sid the Kid and the Pittsburgh Penguins. Now Martin Brodeur and the New Jersey Devils. All in 10 games. The Ottawa Senators are finally delivering in the playoffs after a decade of disappointing failures.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Sens\' fluky goal brings Devils to brink';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Ottawa_Senators_131/Sens_fluky_goal_brings_Devils_to_brink.htm';
  syndicate.article_date[ syndicate.index ] = 'May 3, 2007 - 6:11:52 AM';
  syndicate.article_summary[ syndicate.index ] = 'If the Ottawa Senators keep scoring unusual goals on Martin Brodeur, they\'ll go as deep in the playoffs as they\'ve ever been. Dany Heatley set up Daniel Alfredsson\'s goal, then scored unassisted, leading Ottawa to a 3-2 win over the New Jersey Devils on Wednesday night for a 3-1 edge in their playoff series.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Emery, Sens beat Devils to take 2-1 lead';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Ottawa_Senators_131/Emery_Sens_beat_Devils_to_take_2-1_lead.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 30, 2007 - 9:00:19 PM';
  syndicate.article_summary[ syndicate.index ] = 'Ray Emery stopped 25 shots for his second playoff shutout and Tom Preissing scored 4:46 into the third period, leading the Ottawa Senators to a 2-0 win over the New Jersey Devils in Game 3 of their playoff series Monday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Devils even Senators series with 2OT win';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_even_Senators_series_with_2OT_win.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 29, 2007 - 3:00:28 AM';
  syndicate.article_summary[ syndicate.index ] = 'The New Jersey Devils owned the first period and very little else. That is until Jamie Langenbrunner put a quick end to double overtime.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Senators start fast, hold off Devils 5-4';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Ottawa_Senators_131/Senators_start_fast_hold_off_Devils_5-4.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 26, 2007 - 9:45:43 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Ottawa Senators got to Martin Brodeur and the New Jersey Devils early and often and then held on. Jason Spezza scored 90 seconds into the game, and the Senators jumped to a 4-0 first-period lead from which the Devils could not recover in a 5-4 victory Thursday night in Game 1 of their Eastern Conference semifinal.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Devils top Lightning, gain 2nd round';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_top_Lightning_gain_2nd_round.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 22, 2007 - 5:54:55 PM';
  syndicate.article_summary[ syndicate.index ] = 'A bounce here, a bounce there. The way Martin Brodeur sounded, the New Jersey Devils were fortunate to close out the Tampa Bay Lightning.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Devils even series on Gomez\'s OT goal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Jersey_Devils_123/Devils_even_series_on_Gomez_s_OT_goal.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 19, 2007 - 3:30:15 AM';
  syndicate.article_summary[ syndicate.index ] = 'Just when it looked like New Jersey might be in danger of falling to the brink of playoff elimination, Martin Brodeur showed why the Devils always feel they have a chance to win when he\'s on the ice.';
  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');

