



// 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 ] = 'M-ROCK MSI Mortarless.Stone.Innovations';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/M-ROCK_MSI_Mortarless_Stone_Innovations.shtml';
  syndicate.article_date[ syndicate.index ] = 'Oct 23, 2011 - 9:28:01 AM';
  syndicate.article_summary[ syndicate.index ] = 'The Elegance of Stone Without the Hassle!  Stack and Fasten Tecnology  No Mortar*No Mess*No Mason  The natural beauty and elegance of stone is undeniable. ';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Masonite(R) the beautiful door(TM)';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/Masonite_R_the_beautiful_door_TM.shtml';
  syndicate.article_date[ syndicate.index ] = 'Sep 27, 2011 - 9:19:14 PM';
  syndicate.article_summary[ syndicate.index ] = 'Steel & Fiberglass exterior doors - create - explore - design  get more.  Masonite(R) Steel & Fiberglass Entry Systems Give You More.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'CertainTeed Traditional Shingles';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/CertainTeed_Traditional_Shingles.shtml';
  syndicate.article_date[ syndicate.index ] = 'Sep 22, 2011 - 9:46:44 PM';
  syndicate.article_summary[ syndicate.index ] = 'Three Levels of Protection.  If you\'re looking for shingles with staying power, your search stops here.  Rated #1 by Building & Remodeling Professionals';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'rdi For Home, for Life.  Endurance Original Rail-Titan Pro Rail';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/rdi_For_Home_for_Life_Endurance_Original_Rail-Titan_Pro_Rail.shtml';
  syndicate.article_date[ syndicate.index ] = 'Sep 11, 2011 - 10:36:57 AM';
  syndicate.article_summary[ syndicate.index ] = 'Since 1989 Railing Dynamics, Inc. has been a proud leader in the manufacture of quality, dependable railing, deck, and porch products to enhance any outdoor living space.  With our vision of what we believe a product manufacturer should be, we are proud to have this opportunity to show you our Endurance and titan Pro railing lines.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'ELLISON COLLECTION SERIES 1300 VINYL REPLACEMENT WINDOWS';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/ELLISON_COLLECTION_SERIES_1300_VINYL_REPLACEMENT_WINDOWS.shtml';
  syndicate.article_date[ syndicate.index ] = 'Aug 28, 2011 - 2:24:54 PM';
  syndicate.article_summary[ syndicate.index ] = 'Every Ellison 1300 window comes with a transferable, limited lifetime warranty covering vinyl, glass, and all working parts.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Masonite Molded Panel Series Interior Doors';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/Masonite_Molded_Panel_Series_Interior_Doors.shtml';
  syndicate.article_date[ syndicate.index ] = 'Aug 25, 2011 - 2:51:04 PM';
  syndicate.article_summary[ syndicate.index ] = 'Molded Panel Doors from masonite are more durable and resit warping, shrinking and cracking better than solid wood doors.  ';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'I MUST GARDEN - PREMIUM NATURAL REPELLENTS';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/I_MUST_GARDEN_-_PREMIUM_NATURAL_REPELLENTS.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jul 17, 2011 - 2:43:46 PM';
  syndicate.article_summary[ syndicate.index ] = 'I Must Garden - Our passion for gardening is more than a love of flowers and plants alone, it also embraces a respect for the environment and its inhabitants.  <br/>\nI Must Garden addresses pest problems with approaches that are safer and without negative environmental impact. ';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'The Power of Soy';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/The_Power_of_Soy.shtml';
  syndicate.article_date[ syndicate.index ] = 'May 14, 2011 - 1:10:51 PM';
  syndicate.article_summary[ syndicate.index ] = 'Enjoy Your Beanpod Candle - The Power of Soy.  Enriched with vibrant colors and distinct Fragrances, committed to renewable soy, infused with essential oil blends, enhanced with our patented tempacure process and poured in the U.S.A.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Save Your Energy (and your money)';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/Save_Your_Energy_and_your_money.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jun 23, 2010 - 9:47:10 PM';
  syndicate.article_summary[ syndicate.index ] = 'Saving energy isn\'t just good for the planet; it\'s good for your wallet.  By making simple changes, you can put more \"green\" in your wallet that you canuse to splurge on your family or yourself.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'ACE® HARDWARE ANNOUNCES PLAN TO SELL CRAFTSMAN® TOOLS';
  syndicate.article_url[ syndicate.index ] = 'http://www.sneades.com/articles/publish/news/ACE_HARDWARE_ANNOUNCES_PLAN_TO_SELL_CRAFTSMAN_TOOLS.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jun 9, 2010 - 1:51:27 PM';
  syndicate.article_summary[ syndicate.index ] = 'For the first time Craftsman will sell directly to new retail channel to improve customer accessibility and convenience<br/>\n<br/>\nCraftsman, America’s most trusted tool brand,<br/>\nwill now be sold at Sneade\'s Ace Home Center, Inc.';
  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="_self">');
  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="_self">');
document.write('<font color="' + syndicate.title_fontcolor + '" face="Verdana, Arial, Helvetica, sans-serif" size="1">');
// document.write('<p><b>Powered by Sneade's Ace Home Center</b></font></a>');
document.write('<br><br></b></font></td></tr>\n');

