



// 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 ] = 'Improve standard auto coverage with optional benefits';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_insurance/improve_standard_auto_coverage_with_optional_benefits_gas318.shtml';
  syndicate.article_date[ syndicate.index ] = 'Feb 2, 2012 - 4:54:55 PM';
  syndicate.article_summary[ syndicate.index ] = 'Improve standard auto coverage with optional benefits on your auto insurance policy by talking with your insurance agent.  Car insurance is complex and he\'s the person who can help you figure out what coverage you need.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Bridging Infrastructure Needs And Funds';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/automotive/bridging-infrastructure-needs-and-funds-gas316.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 29, 2012 - 11:56:33 PM';
  syndicate.article_summary[ syndicate.index ] = 'Our Bridging infrastructure needs and funds.  Our bridges allow us to travel where ever we want and they are vital to our economy. It is important to keep our bridges in good repair, read on to find out more from HNTB corporation.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Potholes Pose Plenty Of Problems';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/automotive/potholes-pose-plenty-of-problems-gas315.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 29, 2012 - 9:45:51 PM';
  syndicate.article_summary[ syndicate.index ] = 'Potholes pose plenty of problems for drivers everyday.  I hit a pothole and didn\'t realize how much damage was done to my car.  This article will help you know if you need some car repair work done after you hit a pothole.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Tips To Prepare Your Auto For Winter Travel';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_maintenance/Tips_To_Prepare_Your_Auto_For_Winter_Travel_gas308.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 22, 2012 - 11:59:48 PM';
  syndicate.article_summary[ syndicate.index ] = 'Tips to prepare your auto for winter travel can help keep your vehicle in optimum condition during the cold winter months ahead.  Winter is tough on your vehicle, so give it a little bit of TLC with these common sense maintenance tips from Fireman\'s Fund Insurance.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Price Versus Value: When Is It Worth The Upgrade?';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/buying_tips/Price_versus_value_When_is_it_worth_the_upgrade_gas313.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 22, 2012 - 11:38:14 PM';
  syndicate.article_summary[ syndicate.index ] = 'Price versus value: When is it worth the upgrade.  Find out when it\'s worth it to get the higher octane gas or use regular.  Find out about motor oil, oil filters, wiper blades.  How to make the best choices for your vehicle.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Winter Driving Safety: What You Need To Know';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_maintenance/winter_driving_safety_what_you_need_to_know-gas312.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 22, 2012 - 11:28:54 PM';
  syndicate.article_summary[ syndicate.index ] = 'Winter driving safety...find out what you need to know from the Michelin Man.  Winter driving techniques, a vehicle safety check and safe tires made for winter driving are all covered in this interesting article.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'How To Keep Your Car Running For Years Longer Than Most';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_maintenance/How_to_keep_your_car_running_for_years_longer_than_most_gas309.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 10, 2012 - 1:00:28 AM';
  syndicate.article_summary[ syndicate.index ] = 'Find out how to keep your car running for years longer than most vehicles on the road with these helpful car care tips.  Drive smart, drive less, keep your vehicle in a garage and always keep your car in tip top shape with scheduled maintenance!';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'What To Do In The Event Of An Accident';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_safety/What_To_Do_In_The_Event_Of_An_Accident_gas306.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 9, 2012 - 10:33:43 PM';
  syndicate.article_summary[ syndicate.index ] = 'Find out what to do in the event of an accident.  Car accidents happen and here\'s some helpful advice about what to do if you do have a collision while driving your car.  It\'s better to know this information before hand so you can be prepared, just in case of a fender bender.';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Who Is Behind The Wheel-You Or Your Cell Phone?';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/car_safety/Who_Is_Behind_The_Wheel-You_Or_Your_Cell_Phone_gas305.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 9, 2012 - 10:29:00 PM';
  syndicate.article_summary[ syndicate.index ] = 'Here\'s an important article titled, \"Who is behind the wheel-you or your cell phone?\" and it\'s important for everyone to read this piece of car safety info.  Your chance of a car accident increases by 4 times if you use a cell phone when you are driving.  Don\'t use a cell phone when you are driving a car!';
  syndicate.index++;  syndicate.article_title[ syndicate.index ] = 'Worried About An Older Relative\'s Driving?';
  syndicate.article_url[ syndicate.index ] = 'http://news.carjunky.com/worried_about_an_older_relative_s_driving_gas285.shtml';
  syndicate.article_date[ syndicate.index ] = 'Jan 7, 2012 - 1:01:00 AM';
  syndicate.article_summary[ syndicate.index ] = 'Are you worried about an older relative\'s driving?  Get a Free Guide Book to help you bring up the very sensitive subject of an older driver and their ability to drive a car.';
  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('<p><b>Powered by Car Junky Automotive News Articles</b></font></a>');
document.write('<br><br></b></font></td></tr>\n');

