



// 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 ] = 'VGT WELCOMES M T & C LAWYERS AS NEWEST SPONSOR FOR 2010';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/VGT_WELCOMES_M_T_C_LAWYERS_AS_NEWEST_SPONSOR_FOR_2010.cfm';
  syndicate.article_date[ syndicate.index ] = 'Nov 16, 2009 - 9:28:27 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Vancouver Golf Tour (VGT) is excited to announce Murchison Thomson & Clarke Law Firm (MTC) as the newest addition to the team of sponsors for 2010.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = '2009 VGT TOUR CHAMPIONSHIP';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/2009_VGT_TOUR_CHAMPIONSHIP.cfm';
  syndicate.article_date[ syndicate.index ] = 'Oct 4, 2009 - 7:28:46 PM';
  syndicate.article_summary[ syndicate.index ] = 'On a crisp, Scottish-like day to finish the 2009 VGT season, 25 year old Nanaimo Professional Mark Kitts proved to his peers he can play, shooting 2-under par 70 to take the Augusta VGT Tour Championship title.  Kitts\' steady round of golf earned him $1,300 and moved him into the top 20 of the CLEVELAND GOLF/SRIXON CANADA Order of Merit.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Matt Palsenbarg Captures Titleist & FootJoy Canadian PGA Assistants’ Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Matt_Palsenbarg_Captures_Titleist_FootJoy_Canadian_PGA_Assistants_Championship.cfm';
  syndicate.article_date[ syndicate.index ] = 'Sep 23, 2009 - 4:47:27 PM';
  syndicate.article_summary[ syndicate.index ] = 'After torrential rain, wind and foggy conditions, the sun broke through on the 18th green to shine for just one moment on 28-year-old Matt Palsenbarg of Northview Golf and Country Club, BC as he made par on the final hole to win the 2009 Titleist & FootJoy Canadian PGA Assistants\' Championship presented by Simmlands Insurance.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'VANCOUVER PARKS GOLF wrap-up of the Vancouver City Open Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/VANCOUVER_PARKS_GOLF_wrap-up_of_the_Vancouver_City_Open_Championship.cfm';
  syndicate.article_date[ syndicate.index ] = 'Sep 16, 2009 - 1:41:55 PM';
  syndicate.article_summary[ syndicate.index ] = 'The 2009 Vancouver Open wrapped up in style on this Tuesday at McCleery Golf Course with Seymour Creek Professional Bryn Parry taking the 54-hole Championship Title after rounds of 66, 65 and 71 for a 12-under total and two shot victory over McCleery Teaching Professional Phil Jonas. ';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Cracking news from the BC Golf Association';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Cracking_news_from_the_BC_Golf_Association.cfm';
  syndicate.article_date[ syndicate.index ] = 'Aug 28, 2009 - 10:59:12 AM';
  syndicate.article_summary[ syndicate.index ] = 'The British Columbia Golf Association will launch its first championship for the average golfer when the inaugural BC Fresh Egg Scramble becomes the 13th event in the BCGA Championship Series this Sunday at the beautiful University Golf Club in Vancouver.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Kwon takes Juvenile Boys’ Crown Kim goes wire-to-wire for Juvenile Girls’ title';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Kwon_takes_Juvenile_Boys_Crown_Kim_goes_wire-to-wire_for_Juvenile_Girls_title.cfm';
  syndicate.article_date[ syndicate.index ] = 'Aug 28, 2009 - 7:58:11 AM';
  syndicate.article_summary[ syndicate.index ] = 'It was a battle to the finish, but when all was said and done, Kevin Kwon of Pitt Meadows, B.C. emerged as the champion at the 2009 BC Juvenile Boys\' Championship at Fort Langley Golf Course in Fort Langley, B.C.<br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'TOURNAMENT REVIEW 2009 GOLDEN EAR’S INVITATIONAL';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/TOURNAMENT_REVIEW_2009_GOLDEN_EARS_INVITATIONAL.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 27, 2009 - 6:46:49 PM';
  syndicate.article_summary[ syndicate.index ] = 'On a scorching weekend in Pitt Meadows, it was 21 year old rookie VGT Professional ADAM HADWIN who blazed his way to his second victory in three VGT events, posting back-to-back rounds of 66 for a two-day total of 12 under par and a four shot victory over last week’s Chilliwack Open winner BRYN PARRY.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'PARRY PACKS A PUNCH AT CHILLIWACK OPEN';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/PARRY_PACKS_A_PUNCH_AT_CHILLIWACK_OPEN.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 21, 2009 - 1:08:14 AM';
  syndicate.article_summary[ syndicate.index ] = 'On a blistering hot and windy weekend, Seymour Creek Professional Bryn Parry showed all 208 participants of the 2009 CHILLIWACK OPEN that he is a force to be reckoned with.  Despite starting Sunday’s final round 2 shots back of 21-year old rookie sensation Adam Hadwin, by the 4th hole Parry had taken command of this 51st Annual event starting on fire, birdie, birdie, birdie, eagle.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = '27th Annual Hadassah Wizo Pro-am';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/27th_Annual_Hadassah_Wizo_Pro-am.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 16, 2009 - 7:29:57 AM';
  syndicate.article_summary[ syndicate.index ] = 'Boasting the largest field of golf Professionals in its tournament history, the 27th Annual Hadassah-Wizo Pro-am Tournament hosted at the meticulously groomed Richmond Golf and Country Club by a first class organization and emceed by CTV\'s own Jason Pires, proved to be a huge success once again. ';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Wheeldon holds top spot at the 2009 BC Junior Boys Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Wheeldon_holds_top_spot_at_the_2009_BC_Junior_Boys_Championship.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 8, 2009 - 8:42:17 PM';
  syndicate.article_summary[ syndicate.index ] = 'After two days of play, Riley Wheeldon of Comox, B.C. held fast to the top of the leaderboard at the 2009 B.C. Junior Boys\' Championship being played at Pitt Meadows Golf Club in Pitt Meadows, B.C.';
  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');
