



// 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 ] = 'Kidd, Mavericks hold on late to beat Knicks';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Kidd_Mavericks_hold_on_late_to_beat_Knicks.htm';
  syndicate.article_date[ syndicate.index ] = 'Jan 9, 2009 - 12:49:36 AM';
  syndicate.article_summary[ syndicate.index ] = 'With Dirk Nowitzki not feeling his best, Jason Kidd did something Thursday night that he prefers to leave to others.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'SEC charges Mark Cuban with insider trading';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/SEC_charges_Mark_Cuban_with_insider_trading.htm';
  syndicate.article_date[ syndicate.index ] = 'Nov 17, 2008 - 2:40:39 PM';
  syndicate.article_summary[ syndicate.index ] = 'Federal regulators on Monday charged Dallas Mavericks owner Mark Cuban with insider trading for allegedly using confidential information on a stock sale to avoid more than $750,000 in losses.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Yao, Artest lead Rockets past Mavericks 112-102';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Houston_Rockets_79/Yao_Artest_lead_Rockets_past_Mavericks_112-102.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 31, 2008 - 11:26:22 AM';
  syndicate.article_summary[ syndicate.index ] = 'Yao Ming and Ron Artest powered a 16-2 run late in the fourth quarter, carrying the Houston Rockets to a 112-102 victory over the Dallas Mavericks on Thursday night in the debut of new Mavs coach Rick Carlisle.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Mavericks fire Avery Johnson after another playoff flop';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Mavericks_fire_Avery_Johnson_after_another_playoff_flop.htm';
  syndicate.article_date[ syndicate.index ] = 'Apr 30, 2008 - 3:24:17 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Dallas Mavericks fired coach Avery Johnson on Wednesday, the first of what\'s likely to be many offseason moves after the team with the league\'s highest payroll again flopped in the first round of the playoffs.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Kidd returns to Mavs in 8-player trade';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Kidd_returns_to_Mavs_in_8-player_trade.htm';
  syndicate.article_date[ syndicate.index ] = 'Feb 19, 2008 - 6:06:26 PM';
  syndicate.article_summary[ syndicate.index ] = 'Jason Kidd is a member of the Dallas Mavericks. Again. Finally. The long-discussed, once-scuttled and ultimately reconfigured deal to bring Kidd from New Jersey back to the team that drafted him was finalized Tuesday. He was reintroduced in Dallas 14 years after the Mavericks made him the No. 2 pick.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Rockets lose to Mavericks 107-98';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Houston_Rockets_79/Rockets_lose_to_Mavericks_107-98.htm';
  syndicate.article_date[ syndicate.index ] = 'Nov 6, 2007 - 5:31:02 AM';
  syndicate.article_summary[ syndicate.index ] = 'New Houston Rockets coach Rick Adelman is about to find out how his club handles defeat.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Mavs owner Mark Cuban wants to buy Cubs';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Chicago_Cubs_49/Mavs_owner_Mark_Cuban_wants_to_buy_Cubs.htm';
  syndicate.article_date[ syndicate.index ] = 'Oct 8, 2007 - 5:07:03 PM';
  syndicate.article_summary[ syndicate.index ] = 'Mark Cuban wants to become a billionaire bleacher bum if he buys the Chicago Cubs. The Dallas Mavericks owner, known for noisily cheering his NBA team and berating officials from courtside, reiterated strong interest Monday in owning the Cubs.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Dallas Mavericks extend speedy point guard Devin Harris\' contract through 2012-13';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Dallas_Mavericks_extend_speedy_point_guard_Devin_Harris_contract_through_2012-13.htm';
  syndicate.article_date[ syndicate.index ] = 'Sep 13, 2007 - 12:21:13 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Dallas Mavericks and Devin Harris have agreed on a five-year contract extension worth roughly $42 million, locking up the speedy point guard through the 2012-13 season.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Warriors stun Mavs, make NBA history';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Golden_State_Warriors_84/Warriors_stun_Mavs_make_NBA_history.htm';
  syndicate.article_date[ syndicate.index ] = 'May 4, 2007 - 6:20:34 AM';
  syndicate.article_summary[ syndicate.index ] = 'Baron Davis knew his tender hamstring would limit him, so Stephen Jackson took a huge load off Golden State\'s do-everything star. Davis and Jackson shot the ragtag Warriors right into the second round, capping perhaps the NBA\'s biggest playoff upset with yet one more memorable performance on their home floor.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Mavs\' late run staves off elimination';
  syndicate.article_url[ syndicate.index ] = 'http://www.mopsquad.com/artman2/publish/Dallas_Mavericks_77/Mavs_late_run_staves_off_elimination.htm';
  syndicate.article_date[ syndicate.index ] = 'May 2, 2007 - 7:41:11 AM';
  syndicate.article_summary[ syndicate.index ] = 'Dirk Nowitzki scored 12 points during a 15-0 run over the final 3:07, turning a nine-point deficit into a 118-112 victory for the Dallas Mavericks over the Golden State Warriors on Tuesday night, guaranteeing the NBA\'s best regular-season team at least one more playoff game.';
  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');

