



// 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 ] = '2010 Vancouver Open Registration';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/2010_Vancouver_Open_Registration.cfm';
  syndicate.article_date[ syndicate.index ] = 'Aug 29, 2010 - 10:15:44 AM';
  syndicate.article_summary[ syndicate.index ] = 'With the 2010 VANCOUVER OPEN (www.vancouveropen.ca) event only 10 days away, we want to pass along a few important event reminders to all current players registered and to those who still want to play in this year\'s event.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Svensson, YOUNGEST PLAYER EVER TO WIN Amateur Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Svensson_YOUNGEST_PLAYER_EVER_TO_WIN_Amateur_Championship.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 23, 2010 - 8:07:59 PM';
  syndicate.article_summary[ syndicate.index ] = 'Adam Svensson of Surrey, B.C. put together four solid rounds of 67-71-68-70 and claimed the 2010 BC Amateur title at the Castlegar Golf Club in Castlegar, B.C.<br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'BRENT DELAHOUSSAYE CHARGES TO OPENING-ROUND LEAD AT 2010 RBC CANADIAN OPEN';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/BRENT_DELAHOUSSAYE_CHARGES_TO_OPENING-ROUND_LEAD_AT_2010_RBC_CANADIAN_OPEN.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 22, 2010 - 7:06:29 PM';
  syndicate.article_summary[ syndicate.index ] = 'Brent Delahoussaye easily surpassed his career-low PGA TOUR round with his 8-under 62 Thursday to take the first-round lead at the 2010 RBC Canadian Open being held at St. George’s Golf and Country Club in Toronto. <br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Marketplace IGA VANCOUVER GOLF TOUR announces MAJOR SPONSORS for the 2010 Vancouver Open';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Marketplace_IGA_VANCOUVER_GOLF_TOUR_announces_MAJOR_SPONSORS_for_the_2010_Vancouver_Open.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 20, 2010 - 3:13:33 PM';
  syndicate.article_summary[ syndicate.index ] = 'The Marketplace IGA Vancouver Golf Tour is excited to announce CALLINAN MINES and PAINE EDMONDS LAWYERS as TITLE and PRESENTING SPONSORS of the 2010 Vancouver Open and SAPUTO as a MAJOR SPONSOR.  With this new-found sponsorship, the 2010 VANCOUVER OPEN will offer a total of $65,000 in CASH and PRIZES for its expected 300 Pro-am and Championship Golfers, up $20,000 from 2009.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'MARKETPLACE IGA VANCOUVER GOLF TOUR 2010 CHILLIWACK OPEN';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/MARKETPLACE_IGA_VANCOUVER_GOLF_TOUR_2010_CHILLIWACK_OPEN.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 19, 2010 - 8:03:24 PM';
  syndicate.article_summary[ syndicate.index ] = 'For the second consecutive year, past Nationwide Tour Professional Bryn Parry was crowned CHILLIWACK OPEN CHAMPION, edging Professionals Phil Jonas and James Harper on the first playoff hole with a clutch 4-foot putt for birdie.  <br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = '28th Annual Hadassah WIZO Charity Pro-am';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/28th_Annual_Hadassah_WIZO_Charity_Pro-am.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 10, 2010 - 7:02:07 PM';
  syndicate.article_summary[ syndicate.index ] = 'Firing an impressive round of 66 in blustery British Open-like conditions, Hazelmere Professional Phil Jonas wiped out the field of 27 VGT Professionals by en route to his 2nd Hadassah Pro-am in as many years and his 2nd win of the 2010 VGT season.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Jennifer Yang takes over lead at 2010 B.C. Junior Girls’ Championship';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Jennifer_Yang_takes_over_lead_at_2010_B_C_Junior_Girls_Championship.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 7, 2010 - 4:14:31 PM';
  syndicate.article_summary[ syndicate.index ] = 'Jennifer Yang of Coquitlam, B.C., took over top spot after shooting an even-par 72 to sit as the only player under par at 1-under 143. Yang played a consistent round, carding three birdies on the back nine.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = '2010 BC Junior Boys’ Championship - Round One';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/2010_BC_Junior_Boys_Championship_-_Round_One.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 7, 2010 - 7:31:56 AM';
  syndicate.article_summary[ syndicate.index ] = 'A foursome of players, including Adam Svensson of Surrey, B.C., Connor Kozak of Vernon, B.C., Mason Pimental of Richmond, B.C. and Yohann Vora of Delta, B.C., fired matching 2-under par 70\'s to take the opening-round lead at the 2010 B.C. Junior Boys\' Championship contested at Crown Isle Golf Club in Courtenay, B.C.<br/>\n';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'VGT TOURNAMENT REVIEW 2010 LEDGEVIEW OPEN';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/VGT_TOURNAMENT_REVIEW_2010_LEDGEVIEW_OPEN.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 5, 2010 - 3:40:43 PM';
  syndicate.article_summary[ syndicate.index ] = 'Adding to his long list of achievements, former #1 ranked Amateur in the world and local sensation Nick Taylor finished the LEDGEVIEW OPEN in style, birdying 3 of his last 6 holes en route to a 65 and a two shot victory over VGT Professionals Matt Makinson and John Shin in VGT\'s 17th event of the season.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Christine Wong goes wire to wire at B.C. Women’s Amateur';
  syndicate.article_url[ syndicate.index ] = 'http://www.canadagolfguide.com/artman/publish/Christine_Wong_goes_wire_to_wire_at_BC_Womens_Amateur.cfm';
  syndicate.article_date[ syndicate.index ] = 'Jul 3, 2010 - 9:51:52 AM';
  syndicate.article_summary[ syndicate.index ] = 'Richmond, B.C. resident, Christine Wong is the wire to wire winner at the 2010 B.C. Women\'s Amateur Championship hosted by Arbutus Ridge Golf Club in Cobble Hill, 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');
