



// 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 ] = 'Magic trade Bogans, cash considerations for Lue';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Magic_trade_Bogans_cash_considerations_for_Lue.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 5, 2009 - 3:03:42 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Orlando Magic didn\'t waste time filling their hole at point guard.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Magic knock off Cavs 99-88, end Cleveland\'s streak';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Magic_knock_off_Cavs_99-88_end_Cleveland_s_streak.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 30, 2009 - 7:35:45 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Orlando Magic are looking more and more like a contender in the Eastern Conference.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Turkoglu, Lewis lead Magic past Sixers 98-88';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Turkoglu_Lewis_lead_Magic_past_Sixers_98-88.htm';
  syndicate.article_date[ syndicate.index ] = 'Nov 6, 2008 - 11:12:22 PM';
  syndicate.article_summary[ syndicate.index ] = 'Hedo Turkoglu and Rashard Lewis scored 20 points apiece and the Orlando Magic overcame Dwight Howard\'s foul trouble to beat the Philadelphia 76ers 98-88 on Thursday night.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Pistons oust Magic, reach 6th straight East finals';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Detroit_Pistons_71/Pistons_oust_Magic_reach_6th_straight_East_finals.htm';
  syndicate.article_date[ syndicate.index ] = 'May 13, 2008 - 11:10:42 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Detroit Pistons made just enough shots and stops to advance to the Eastern Conference finals for a sixth straight year.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Pistons\' Billups still sore, unsure he can go in Game 4';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Detroit_Pistons_71/Pistons_Billups_still_sore_unsure_he_can_go_in_Game_4.htm';
  syndicate.article_date[ syndicate.index ] = 'May 8, 2008 - 4:35:39 PM';
  syndicate.article_summary[ syndicate.index ] = 'Chauncey Billups spent almost all Wednesday night in the trainer\'s room. He was there Thursday, when the rest of the Detroit Pistons took the court to practice. And he\'ll be there most of Friday, too.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Lewis scores 33 as Magic rout Pistons, trim deficit to 2-1';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Lewis_scores_33_as_Magic_rout_Pistons_trim_deficit_to_2-1.htm';
  syndicate.article_date[ syndicate.index ] = 'May 8, 2008 - 7:33:08 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Orlando Magic won\'t be swept by the Detroit Pistons again. Rashard Lewis made sure of it Wednesday night. Lewis scored a career playoff-high 33 points and the Magic broke down the Pistons\' stout defense in a 111-86 victory.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Billups scores 28 as Pistons edge Magic 100-93 for 2-0 lead';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Detroit_Pistons_71/Billups_scores_28_as_Pistons_edge_Magic_100-93_for_2-0_lead.htm';
  syndicate.article_date[ syndicate.index ] = 'May 6, 2008 - 2:59:45 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Detroit Pistons took advantage of what seemed to be a little help from the scorer\'s table and went on beat the Orlando Magic. Chauncey Billups scored 28 points, three on a disputed shot at the end of the third quarter, and Detroit got past Orlando for a 100-93 win Monday night and a 2-0 lead in the second-round series.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Magic, Howard agree to $85M for 5 years';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Magic_Howard_agree_to_85M_for_5_years.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 13, 2007 - 4:55:47 AM';
  syndicate.article_summary[ syndicate.index ] = 'Only 21 years old, Dwight Howard already says he wants to retire in Orlando. He committed to sticking around for a while longer Thursday, as the former No. 1 overall pick signed a five-year contract extension worth approximately $80 million.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Lewis joins Magic in sign-and-trade deal';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Lewis_joins_Magic_in_sign-and-trade_deal.htm';
  syndicate.article_date[ syndicate.index ] = 'Jul 11, 2007 - 2:50:06 PM';
  syndicate.article_summary[ syndicate.index ] = 'A few minutes before Rashard Lewis was formally announced as the newest member of the Orlando Magic, the high-scoring forward donned his white-and-blue uniform and made his way through the team\'s practice facility.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Magic hire Stan Van Gundy as coach';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Orlando_Magic_65/Magic_hire_Stan_Van_Gundy_as_coach.htm';
  syndicate.article_date[ syndicate.index ] = 'Jun 7, 2007 - 10:24:41 AM';
  syndicate.article_summary[ syndicate.index ] = 'Stan Van Gundy was hired Thursday as coach of the Orlando Magic, who acted quickly after their days-old agreement with Billy Donovan collapsed.';
  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');

