



// 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 ] = 'NATIONWIDE TOUR STORYLINES – Week of March 8th 2010';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_STORYLINES_Week_of_March_8th_2010.cfm';
  syndicate.article_date[ syndicate.index ] = 'Mar 9, 2010 - 11:15:43 AM';
  syndicate.article_summary[ syndicate.index ] = '2010 Pro Football Hall of Fame electee Jerry Rice trades the gridiron for the golf course next month in a very serious setting.  The former San Francisco 49er has accepted a sponsor exemption to play in the Nationwide Tour\'s Fresh Express Classic at TPC Stonebrae.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'NATIONWIDE TOUR STORYLINES – Week of March 1st 2010';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_STORYLINES_Week_of_March_1st_2010.cfm';
  syndicate.article_date[ syndicate.index ] = 'Mar 3, 2010 - 9:01:20 AM';
  syndicate.article_summary[ syndicate.index ] = 'This week\'s tournament in South America is a first for the Nationwide Tour.  It is also the first time a PGA TOUR-sanctioned event has been played for official money on the continent.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'NATIONWIDE TOUR STORYLINES – Week of February 22 2010';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_STORYLINES_Week_of_February_22_2010.cfm';
  syndicate.article_date[ syndicate.index ] = 'Feb 23, 2010 - 12:09:22 PM';
  syndicate.article_summary[ syndicate.index ] = 'After a two-week break following season-opening visits to New Zealand and Australia, the Nationwide Tour will be in Central America and the Panama Golf Club this week for the seventh year in a row.  This is the first time Panama will not be the Tour\'s opening stop. CLARO Panama is the tournament’s new title sponsor.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'PGA TOUR Announces New 2010 Nationwide Tour Event in Cincinnati with Chiquita as Title Sponsor';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/PGA_TOUR_Announces_New_2010_Nationwide_Tour_Event_in_Cincinnati_with_Chiquita_as_Title_Sponsor.cfm';
  syndicate.article_date[ syndicate.index ] = 'Feb 19, 2010 - 8:41:05 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Nationwide Tour added a new tournament to its 2010 schedule today with the announcement of the Chiquita Classic, to be played July 12-18 at the TPC River\'s Bend in the Cincinnati suburb of Maineville, Ohio.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'NATIONWIDE TOUR STORYLINES – Week of February 1st 2010';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_STORYLINES_Week_of_February_1st_2010.cfm';
  syndicate.article_date[ syndicate.index ] = 'Feb 2, 2010 - 2:43:52 PM';
  syndicate.article_summary[ syndicate.index ] = 'Robert Gates would not have been on anyone\'s pre-tournament pick list but come Sunday evening, he had a legion of golf fans in New Zealand. His unassuming, likeable demeanor and the appeal of having his girlfriend Lauren Johnson \"on the bag\" were capped by a well-delivered victory speech.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'RBC JOINS THE PGA OF AMERICA AS OFFICIAL PATRON';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/RBC_JOINS_THE_PGA_OF_AMERICA_AS_OFFICIAL_PATRON.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jan 29, 2010 - 12:07:53 PM';
  syndicate.article_summary[ syndicate.index ] = 'The PGA of America today announced that RBC has become a PGA of America Official Patron, the highest level of partnership and designation granted by the world’s largest working sports organization.<br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'NATIONWIDE TOUR STORYLINES – Week of January 25th ';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_STORYLINES_Week_of_January_25th.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jan 26, 2010 - 12:31:47 PM';
  syndicate.article_summary[ syndicate.index ] = 'The 2010 Nationwide Tour season gets underway this Thursday on New Zealand\'s South Island with the Michael Hill New Zealand Open.  The field is comprised of 156 players, with 78, respectively, from the PGA Tour of Australasia and the Nationwide Tour competing under a unique co-sanctioning agreement which is also in effect for next week\'s Moonah Classic in Australia.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'NATIONWIDE TOUR ANNOUNCES 2010 TOURNAMENT SCHEDULE';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/NATIONWIDE_TOUR_ANNOUNCES_2010_TOURNAMENT_SCHEDULE.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jan 12, 2010 - 8:12:36 AM';
  syndicate.article_summary[ syndicate.index ] = 'The 2010 Nationwide Tour schedule was released today and features 28 events in 17 states and six countries outside the United States.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Tiger Woods and future with Electronic Arts';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Tiger_Woods_and_future_with_Electronic_Arts.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jan 4, 2010 - 9:38:18 PM';
  syndicate.article_summary[ syndicate.index ] = 'Electronic Arts will on disclose on January 5th the future of their sponsorship agreement with golf superstar Tiger Woods';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'MICHAEL SIM VOTED 2009 NATIONWIDE TOUR PLAYER OF THE YEAR ';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/MICHAEL_SIM_VOTED_2009_NATIONWIDE_TOUR_PLAYER_OF_THE_YEAR.cfm';
  syndicate.article_date[ syndicate.index ] = 'Dec 3, 2009 - 12:36:32 PM';
  syndicate.article_summary[ syndicate.index ] = 'Michael Sim of Perth, Australia has been voted 2009 Player of the Year on the Nationwide Tour by his fellow competitors. The 25-year-old will receive the Jack Nicklaus Trophy, symbolic of his selection as Nationwide Tour Player of the Year. <br/>\n';
  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 = '#003399'; }
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] + '" target="_blank">');
  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('<br><br></b></font></td></tr>\n');
