



// 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 ] = 'Heat swap Shawn Marion for Jermaine O\'Neal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Heat_swap_Shawn_Marion_for_Jermaine_O_Neal.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 13, 2009 - 4:40:15 PM';
  syndicate.article_summary[ syndicate.index ] = 'Shawn Marion\'s most memorable play with the Miami Heat was his last. Hours after Marion\'s last-second dunk lifted the Heat past the Chicago Bulls, he was traded Friday to the Toronto Raptors in exchange for Jermaine O\'Neal, ending a weeks-long saga involving the expected deal. NBA officials approved the swap Friday afternoon by conference call, the Heat said.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Heat GM Randy Pfund resigns, Pat Riley takes over';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Heat_GM_Randy_Pfund_resigns_Pat_Riley_takes_over.htm';
  syndicate.article_date[ syndicate.index ] = 'Sep 29, 2008 - 9:38:30 PM';
  syndicate.article_summary[ syndicate.index ] = 'Heat general manager Randy Pfund, who helped Miami win the 2006 NBA championship as the highlight of his 13 years with the franchise, resigned Monday.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Round 1 to Beasley: His Heat top Rose\'s Bulls';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Round_1_to_Beasley_His_Heat_top_Rose_s_Bulls.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 7, 2008 - 9:58:47 PM';
  syndicate.article_summary[ syndicate.index ] = 'Michael Beasley stood in the doorway to the gym an hour before gametime, iPod in his left hand, head bobbing slightly as he chatted with new Miami Heat teammate Mario Chalmers.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Dwyane Wade\'s season over';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Dwyane_Wade_s_season_over.htm';
  syndicate.article_date[ syndicate.index ] = 'Mar 11, 2008 - 5:03:07 AM';
  syndicate.article_summary[ syndicate.index ] = 'For a month, the Miami Heat wondered when the time would come to shut an ailing Dwyane Wade down for the season.';
  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 ] = 'James powers Cavaliers past Heat 96-82';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Cleveland_Cavaliers_70/James_powers_Cavaliers_past_Heat_96-82.htm';
  syndicate.article_date[ syndicate.index ] = 'Dec 25, 2007 - 7:19:34 PM';
  syndicate.article_summary[ syndicate.index ] = 'LeBron James\' helpers showed up on Christmas. James scored 25 points, Drew Gooden 18, Daniel Gibson 16 and Cleveland\'s defense arrived in time for the holiday, sparking the struggling Cavaliers to a 96-82 win over the Miami Heat on Tuesday.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Injury may end Mourning\'s career';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Injury_may_end_Mourning_s_career.htm';
  syndicate.article_date[ syndicate.index ] = 'Dec 20, 2007 - 2:37:50 AM';
  syndicate.article_summary[ syndicate.index ] = 'Alonzo Mourning refused to leave what might have been the last game of his career on a stretcher. After tearing the patellar tendon in his right knee in Miami\'s game against Atlanta on Wednesday night, the 37-year-old Heat center was placed on the stretcher, but he refused the ride.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Heat trade Antoine Walker to Wolves';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Heat_trade_Antoine_Walker_to_Wolves.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 25, 2007 - 6:55:39 AM';
  syndicate.article_summary[ syndicate.index ] = 'Antoine Walker\'s turbulent time with the Miami Heat is over. The Heat traded the three-time All-Star forward to the Minnesota Timberwolves on Wednesday in a five-player deal that came one day after Miami completed a winless preseason.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Riley commits to 3 more years with Heat';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Riley_commits_to_3_more_years_with_Heat.htm';
  syndicate.article_date[ syndicate.index ] = 'Aug 13, 2007 - 6:29:24 PM';
  syndicate.article_summary[ syndicate.index ] = 'Pat Riley vowed months ago to demand a bigger commitment from the Miami Heat this coming season. And he didn\'t just mean from the players, either.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Heat give Penny Hardaway comeback chance';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Miami_Heat_62/Heat_give_Penny_Hardaway_comeback_chance.htm';
  syndicate.article_date[ syndicate.index ] = 'Aug 9, 2007 - 10:52:57 PM';
  syndicate.article_summary[ syndicate.index ] = 'Penny Hardaway and Shaquille O\'Neal are together again. The 36-year-old Hardaway, who last played an NBA game in November 2005, signed with the Miami Heat on Thursday and is reuniting with O\'Neal — his former Orlando Magic teammate back in the mid-1990s.';
  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');

