



// 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 ] = 'Suns fire Porter after 4 months on the job';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/Suns_fire_Porter_after_4_months_on_the_job.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 16, 2009 - 5:01:34 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Phoenix Suns have fired coach Terry Porter, just four months into his first season with the club and the sputtering team barely in playoff contention. Assistant Alvin Gentry was appointed interim coach.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Paul, Hornets spoil Suns\' homer opener';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/New_Orleans_Hornets_74/Paul_Hornets_spoil_Suns_homer_opener.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 31, 2008 - 7:16:55 AM';
  syndicate.article_summary[ syndicate.index ] = 'Chris Paul had 20 points, 10 assists and eight rebounds and the New Orleans Hornets held off a rally, then pulled away to beat Phoenix 108-95 Thursday night and spoil the home debut of new Suns coach Terry Porter.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Phoenix Suns introduce new head coach Terry Porter';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/Phoenix_Suns_introduce_new_head_coach_Terry_Porter.htm';
  syndicate.article_date[ syndicate.index ] = 'Jun 9, 2008 - 6:10:57 PM';
  syndicate.article_summary[ syndicate.index ] = 'It didn\'t take Terry Porter long to understand the expectations facing him as he takes over the Phoenix Suns.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Heat send Shaq to Suns for Marion, Banks';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Heat_send_Shaq_to_Suns_for_Marion_Banks.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 6, 2008 - 10:00:04 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Phoenix Suns acquired Shaquille O\'Neal in a stunning, blockbuster deal that sent four-time All-Star Shawn Marion and Marcus Banks to the Miami Heat. The improbable pairing of the speedy Suns and the slow but once-mighty O\'Neal became official when he cleared a physical exam Wednesday.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Suns\' Hill could miss at least 2 weeks';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/Suns_Hill_could_miss_at_least_2_weeks.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 9, 2008 - 6:11:12 PM';
  syndicate.article_summary[ syndicate.index ] = 'Suns forward Grant Hill was scheduled to undergo an appendectomy Wednesday evening and is expected to miss at least two weeks.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Bryant scores 38 points, Lakers top Suns';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Los_Angeles_Lakers_86/Bryant_scores_38_points_Lakers_top_Suns.htm';
  syndicate.article_date[ syndicate.index ] = 'Dec 25, 2007 - 8:20:19 PM';
  syndicate.article_summary[ syndicate.index ] = 'Kobe Bryant asked to be traded last spring in part because he wanted to play for a team that could contend for a championship. He just might have gotten his wish by staying put.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Short-handed Suns lose Game 5 to Spurs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/Short-handed_Suns_lose_Game_5_to_Spurs.htm';
  syndicate.article_date[ syndicate.index ] = 'May 17, 2007 - 7:39:19 AM';
  syndicate.article_summary[ syndicate.index ] = 'Facing elimination after a heartbreaking loss, the Phoenix Suns are conceding nothing. They believe they can win Game 6 on Friday night and bring the tense, taut series back to the desert for Game 7. Phoenix nearly won Game 5 despite playing without All-Star center Amare Stoudemire and key reserve Boris Diaw, leading most of the way before losing 88-85 Wednesday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'D\'Antoni rips Suns players\' suspensions';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/D_Antoni_rips_Suns_players_suspensions.htm';
  syndicate.article_date[ syndicate.index ] = 'May 16, 2007 - 10:25:13 PM';
  syndicate.article_summary[ syndicate.index ] = 'Amare Stoudemire and Boris Diaw accepted their one-game suspension with little criticism on Wednesday. Their coach had plenty to say.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Suns top Spurs to even NBA series 1-1';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Phoenix_Suns_87/Suns_top_Spurs_to_even_NBA_series_1-1.htm';
  syndicate.article_date[ syndicate.index ] = 'May 9, 2007 - 7:26:39 AM';
  syndicate.article_summary[ syndicate.index ] = 'With Kurt Thomas assigned to guard Tim Duncan one-on-one and Shawn Marion shutting down Tony Parker, the Suns squared the best-of-seven Western Conference semifinal series at a game apiece with a 101-81 victory.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Duncan leads Spurs past Suns in Game 1';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/San_Antonio_Spurs_82/Duncan_leads_Spurs_past_Suns_in_Game_1.htm';
  syndicate.article_date[ syndicate.index ] = 'May 7, 2007 - 12:01:00 AM';
  syndicate.article_summary[ syndicate.index ] = 'With blood spewing from a cut on his nose, Steve Nash could only watch from the bench while the San Antonio Spurs put away Game 1 of the Western Conference semifinals.';
  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');

