



// 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 ] = 'Thrashers land Kubina from Maple Leafs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Atlanta_Thrashers_133/Thrashers_land_Kubina_from_Maple_Leafs.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 1, 2009 - 9:14:54 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Atlanta Thrashers found help for their porous defense, acquiring defenseman Pavel Kubina from Toronto in a four-player trade Wednesday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Penguins pick up Hossa, Dupuis and Gill';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Pittsburgh_Penguins_127/Penguins_pick_up_Hossa_Dupuis_and_Gill.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 26, 2008 - 8:53:37 PM';
  syndicate.article_summary[ syndicate.index ] = 'Every time Pittsburgh Penguins general manager Ray Shero analyzed his team, he came to the same conclusion. A huge missing piece was a forward talented enough to play on Sidney Crosby\'s line.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Thrashers romp to run Sabres\' skid to 6';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Atlanta_Thrashers_133/Thrashers_romp_to_run_Sabres_skid_to_6.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 6, 2008 - 4:43:32 PM';
  syndicate.article_summary[ syndicate.index ] = 'Marian Hossa broke out of a slump with two goals and Atlanta beat Buffalo 5-2 on Sunday to extend the Sabres\' longest losing streak in almost two years.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Mellanby retires after 21 years in NHL';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Atlanta_Thrashers_133/Mellanby_retires_after_21_years_in_NHL.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 24, 2007 - 4:48:53 PM';
  syndicate.article_summary[ syndicate.index ] = 'Over a career that lasted more than two decades, Scott Mellanby twice made it to the Stanley Cup finals, played in the NHL All-Star game and became one of hockey\'s most respected leaders. That said, he\'ll always be remembered for his coup de grace on a rodent.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Rangers move on with sweep of Thrashers';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_York_Rangers_125/Rangers_move_on_with_sweep_of_Thrashers.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 18, 2007 - 11:36:03 PM';
  syndicate.article_summary[ syndicate.index ] = 'The New York Rangers finally got a chance to party like it was 1997. Matt Cullen banged in a shot off the crossbar early in the third period, snapping a tie and helping New York to a 4-2 victory over the Atlanta Thrashers on Wednesday night that put the Rangers into the second round of the playoffs for the first time in a decade.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Decade drought ends: Rangers win at home';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_York_Rangers_125/Decade_drought_ends_Rangers_win_at_home.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 18, 2007 - 12:21:46 AM';
  syndicate.article_summary[ syndicate.index ] = 'The balloons had barely settled in festive Madison Square Garden when Michael Nylander and Jaromir Jagr wrecked the night for Kari Lehtonen and the visiting Atlanta Thrashers. Nylander scored the first of his three goals 32 seconds after the opening faceoff and paved the way for the Rangers\' 7-0 blowout Tuesday night that put New York within a win of the second round of the playoffs for the first time in a decade.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Shanahan hands Rangers 2-0 series lead';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_York_Rangers_125/Shanahan_hands_Rangers_2-0_series_lead.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 14, 2007 - 9:02:58 PM';
  syndicate.article_summary[ syndicate.index ] = 'Sean Avery is irritating enough any time he steps on the ice. Just imagine how the Atlanta Thrashers felt after everyone\'s No. 1 nemesis scored with an air-hockey ricochet from center ice, then rubbed salt in the wound by setting up the winning goal late in the third period.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Jagr, Rangers win and hope for good luck';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_York_Rangers_125/Jagr_Rangers_win_and_hope_for_good_luck.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 13, 2007 - 12:06:42 AM';
  syndicate.article_summary[ syndicate.index ] = 'Led by Jaromir Jagr, the New York Rangers scored the first two goals of Thursday night\'s playoff opener and held off Atlanta\'s comeback to beat the Thrashers 4-3.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Thrashers sign Kapanen to multiyear deal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Atlanta_Thrashers_133/Thrashers_sign_Kapanen_to_multiyear_deal_7161.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 20, 2006 - 2:27:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Atlanta Thrashers signed center Niko Kapanen to a multiyear contract on Thursday.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Thrashers sign 4 forwards';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Atlanta_Thrashers_133/Thrashers_sign_4_forwards_7160.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 18, 2006 - 5:31:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Atlanta Thrashers signed free-agent forward Kyle Wanvig on Tuesday and re-signed forwards Derek MacKenzie, Karl Stewart and Kevin Doell.';
  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');

