



// 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 ] = 'Nabokov leads Sharks past Stars, 1-0';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Nabokov_leads_Sharks_past_Stars_1-0.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 23, 2009 - 10:32:37 PM';
  syndicate.article_summary[ syndicate.index ] = 'Devin Setoguchi scored with 12:05 remaining, Evgeni Nabokov stopped 29 shots for his 45th career shutout, and the San Jose Sharks extended their winning streak to four games with a 1-0 victory over the Dallas Stars on Monday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Sharks hire Detroit assistant McLellan as coach';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Sharks_hire_Detroit_assistant_McLellan_as_coach.htm';
  syndicate.article_date[ syndicate.index ] = 'Jun 11, 2008 - 8:32:18 PM';
  syndicate.article_summary[ syndicate.index ] = 'The San Jose Sharks hired former Detroit Red Wings assistant Todd McLellan as their head coach on Wednesday, bringing in a leader with Stanley Cup winning credentials to replace the fired Ron Wilson.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Sharks fire coach Ron Wilson after another ouster';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Sharks_fire_coach_Ron_Wilson_after_another_ouster.htm';
  syndicate.article_date[ syndicate.index ] = 'May 12, 2008 - 10:24:14 PM';
  syndicate.article_summary[ syndicate.index ] = 'The San Jose Sharks fired coach Ron Wilson on Monday after his club followed another outstanding regular season with yet another early exit from the Stanley Cup playoffs.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Stars beat Sharks in 4 OTs to clinch series';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Stars_148/Stars_beat_Sharks_in_4_OTs_to_clinch_series.htm';
  syndicate.article_date[ syndicate.index ] = 'May 5, 2008 - 7:30:34 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Dallas Stars have finally made it back to the Western Conference finals. It took the eighth longest game in NHL history to do it. Brenden Morrow scored a power play goal 9:03 into the fourth overtime as the Stars eliminated the pesky San Jose Sharks 2-1 in a game that ended early Monday morning - the longest game in the NHL playoffs this season, and the longest in San Jose history.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Michalek\'s goal helps Sharks stay alive with win over Stars';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Michalek_s_goal_helps_Sharks_stay_alive_with_win_over_Stars.htm';
  syndicate.article_date[ syndicate.index ] = 'May 1, 2008 - 7:11:03 AM';
  syndicate.article_summary[ syndicate.index ] = 'Back to the Shark Tank. Milan Michalek scored on a power play with 16:34 left and San Jose beat Dallas 2-1 on Wednesday night to avoid being swept in the Western Conference semifinals.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Sabres, Sharks swap Campbell for Bernier';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Buffalo_Sabres_129/Sabres_Sharks_swap_Campbell_for_Bernier.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 26, 2008 - 6:00:30 PM';
  syndicate.article_summary[ syndicate.index ] = 'Last week in New York City, Brian Campbell happened into a restaurant where a few San Jose Sharks were having dinner during their road trip. Buffalo\'s All-Star defenseman said hello to several acquiantances, including childhood buddy Joe Thornton.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Milan Michalek scores twice to lead San Jose over Calgary 4-1';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Milan_Michalek_scores_twice_to_lead_San_Jose_over_Calgary_4-1.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 23, 2007 - 1:25:42 AM';
  syndicate.article_summary[ syndicate.index ] = 'Milan Michalek came up big with San Jose shorthanded.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'San Jose Sharks sign veteran Jeremy Roenick for one more run at Cup';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/San_Jose_Sharks_sign_veteran_Jeremy_Roenick_for_one_more_run_at_Cup.htm';
  syndicate.article_date[ syndicate.index ] = 'Sep 4, 2007 - 6:35:45 PM';
  syndicate.article_summary[ syndicate.index ] = 'Jeremy Roenick thinks he still has the skills and the desire to help the San Jose Sharks\' next run at the Stanley Cup.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Sharks ink Thornton to 3-year extension';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Jose_Sharks_151/Sharks_ink_Thornton_to_3-year_extension.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 1, 2007 - 4:16:13 PM';
  syndicate.article_summary[ syndicate.index ] = 'Although Joe Thornton might have made a bit more money elsewhere next year, the San Jose Sharks\' star center thinks he looks good in teal.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Red Wings top Sharks to advance in NHL';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Detroit_Red_Wings_139/Red_Wings_top_Sharks_to_advance_in_NHL.htm';
  syndicate.article_date[ syndicate.index ] = 'May 8, 2007 - 7:36:02 AM';
  syndicate.article_summary[ syndicate.index ] = 'Mikael Samuelsson scored two first-period goals, Dominik Hasek posted his 13th career playoff shutout and the Red Wings rolled into the conference finals with three straight victories in their second-round series, beating the deflated San Jose Sharks 2-0 in Game 6 on Monday night.';
  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');

