// 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 ] = 'Troops Could \'Control Guns With Their Minds\' One Day, Say Scientists';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212399112.shtml';
  syndicate.article_date[ syndicate.index ] = 'Feb  8, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Soldiers could one day soon be able to control robotic weapons with their minds. Scientists suggest that they could be on the verge of creating...';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = '\'Chronicle\' Viral (VIDEO) Fake Flying People Over New York Stuns Citizens';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212398464.shtml';
  syndicate.article_date[ syndicate.index ] = 'Feb  5, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Fake flying people over New York City Video - If you thought you saw some flying humans in the sky over parts of New York City and New Jersey recently you are, in fact, not seeing things. Well, you are, but not what you think.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Soon-Yi Previn 40, Woody Allen 75, scandal 1992: Adopted Daughter Of Mia Farrow';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212398893.shtml';
  syndicate.article_date[ syndicate.index ] = 'Feb  4, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Soon-Yi Previn, 40, Woody Allen, 75 scandal 1992: Adopted Daughter Of Mia Farrow - February has always been the perfect month to talk romance. In keeping with the season, we take a look at some May-December unions of famous couples.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Bose Bluetooth Speaker - Sounds Good to Me!';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212398502.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 31, 2012';
  syndicate.article_summary[ syndicate.index ] = 'I first got a look at this little speaker system at a media event last September in New York and was very impressed by what I saw - and heard.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Bombardier Model T engine + a wooden airplane propeller + set of sleigh runners used for bombardier';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397620.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 24, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Joseph Armand Bombardier Age 15: Model T engine, a wooden airplane propeller and set of sleigh runners used for Bombardier - In 1922 Quebec, a 15-year-old farm boy named Joseph-Armand Bombardier began tinkering with a Model T engine, a wooden airplane propeller and a beat-up set of sleigh runners.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Louis Braille blinded after being struck by an awl; night writing revision at 15 years old ';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397628.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 24, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Louis Braille blinded after being struck by an awl; night writing revision at 15 years old - Louis Braille was accidentally blinded in one eye at the age of three after being struck by an awl. Within two years, a disease in his other eye left him completely blind.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Elizabeth Nathan &amp; Gabriella Pollack win 1995 Nynex Science and Technology Awards for non reusable syringe inspired by a cocktail umbrella';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397626.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 24, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Elizabeth Nathan & Gabriella Pollack win 1995 Nynex Science and Technology Awards for non reusable syringe inspired by a cocktail umbrella - Elizabeth Nathan and Gabriella Pollack, both 17-year-olds, came up with the idea of inventing a nonreusable syringe to "help stop the spread of AIDS."';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Frank Epperson: 11 years old, patent in 1923';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397621.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 24, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Frank Epperson, 11 years old, creates Epsicle ice pop by stirring stick in soda- water powder and water on his porch overnight; applied for patent in 1923.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Trio of Contenders Help Heat up Tablet Market ';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397382.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 20, 2012';
  syndicate.article_summary[ syndicate.index ] = 'I\'ve reviewed a couple of competing tablets so far, of both the Windows and Android persuasion, but I have yet to find one that gives me the urge to skip my iPad across a pond.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = '"High Voltage" Scion Adds a bit of Sportiness to Package';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397119.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 18, 2012';
  syndicate.article_summary[ syndicate.index ] = 'It isn\'t the kind of upgrade that\'s going to turn this unassuming little two door into a little screamer, but it certainly does make it stand out from the garden variety tC.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Mini Clubman Adds Room, Doesn\'t Subtract Fun';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212397118.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 18, 2012';
  syndicate.article_summary[ syndicate.index ] = 'The Mini Clubman is a little longer than the garden variety Mini Cooper, with a clamshell-type rear door that opens to both sides, rather than the conventional upward-opening panel you see more often on hatchbacks and wagons.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Infiniti Makes a Powerful Statement with its Hybrid M';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212396941.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 17, 2012';
  syndicate.article_summary[ syndicate.index ] = 'The M hybrid goes head to head against Lexus\' GS 450h, another electrically-enhanced luxury sedan from Japan that\'s a very compelling drive in its own right.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Heather Mills Cancer Scare: Amputated Leg Forms Tumor';
  syndicate.article_url[ syndicate.index ] = 'http://www.postchronicle.com/news/technology/article_212396766.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 17, 2012';
  syndicate.article_summary[ syndicate.index ] = 'Heather Mills, Sir Paul McCartney\'s ex-wife, has had a cancer scare. Mills allegedly discovered what appeared to be a tumor on her leg after a skiing ';
  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('');
  document.write('<a href="' + syndicate.article_url[syndicate.index] + '" target="_top">');
  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('<p></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>\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="http://www.postchronicle.com" target="_blank">');
//document.write('<font color="' + syndicate.title_fontcolor + '" //face="Verdana, Arial, sans-serif" size="1">');
//document.write('<b>Powered by The Post Chronicle&#153;</b></font></a>');
document.write('</b></font>\n');

