// Create arrays of articles
syndicate.article_title = new Array;
syndicate.article_summary = new Array;
syndicate.article_date = new Array;
syndicate.article_url = new Array;

// This section of the script is published by Article Manager
syndicate.index = 0;
  syndicate.article_title[ syndicate.index ] = 'World’s largest cruise ship ordered from Aker Yards';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4575.stm';
  syndicate.article_date[ syndicate.index ] = 'Sep  8, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Royal Caribbean International and Aker Yards, have today confirmed the order of a second Ultra Voyager - the world’s largest cruise ship. The contract is valued at some €570-580 million, making it the world’s largest cruise ship order in year 2004.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'U.S. Transportation Secretary Mineta Surveys Future Plans for Honolulu Harbor';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4453.stm';
  syndicate.article_date[ syndicate.index ] = 'Aug 12, 2004';
  syndicate.article_summary[ syndicate.index ] = 'U.S. Transportation Secretary Norman Y. Mineta today got a first-hand look at Honolulu Harbor’s infrastructure needs during a tour with Gov. Linda Lingle and Hawaii Department of Transportation Director Rodney Haraga.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'IOWA-BASED SHIP OPERATOR SENTENCED FOR ILLEGAL OCEAN DUMPING';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4452.stm';
  syndicate.article_date[ syndicate.index ] = 'Aug 10, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Thomas L. Sansonetti, Assistant Attorney General for the Justice Department’s Environment and Natural Resources Division, and Charles W. Larson, Sr., U.S. Attorney for the Northern District of Iowa, announced today that an Iowa-based shipping company that transported grain cargoes and petroleum products in the United States and abroad was sentenced to pay $2 million for illegally dumping thousands of gallons of waste oil, hundreds of tons of diesel-contaminated grain, and plastic wastes at sea.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'BRP reacts to U.S. Department of Commerce ruling on Japanese outboard engine dumping';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4462.stm';
  syndicate.article_date[ syndicate.index ] = 'Aug  6, 2004';
  syndicate.article_summary[ syndicate.index ] = 'BRP US Inc. welcomes today\'s ruling by the United States Department of Commerce (DOC), which found significant dumping of outboard engines on the part of Yamaha Motor Corporation.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Cruise Passenger Travel Grows 13.6 Percent';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4372.stm';
  syndicate.article_date[ syndicate.index ] = 'Jul 12, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Reflecting a rise in the popularity of passengers departing from ports closer to their homes, cruise lines carried 2.3 million passengers on North American cruises in the first quarter of 2004, the Maritime Administration (MARAD) reported today.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Cruise Ship Pride of Aloha Christened ';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4338.stm';
  syndicate.article_date[ syndicate.index ] = 'Jul  4, 2004';
  syndicate.article_summary[ syndicate.index ] = 'U.S. Maritime Administrator Captain William G. Schubert joined local official today as the cruise ship Pride of Aloha was christened in Honolulu. The ceremony signals the expected revival of the Hawaii cruise trade and the creation of new American jobs, said Capt. Schubert.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Maritime Administration Announces Three Contracts to Remove Ships from the James River Reserve Fleet';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4323.stm';
  syndicate.article_date[ syndicate.index ] = 'Jun 24, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Three ships will leave the James River Reserve Fleet this summer thanks to domestic ship dismantling contracts announced today by U.S. Maritime Administrator Captain William G. Schubert. Marine Metals of Brownsville, TX, has been awarded three contracts valued at $3.1 million to dismantle the American Banker, the Mormacmoon and the Santa Cruz.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'NEW RULES BRING CHALLENGES AND OPPORTUNITIES TO UK BOAT BUILDERS';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4300.stm';
  syndicate.article_date[ syndicate.index ] = 'Jun 22, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Environmentally friendly changes to rules governing the design and manufacture of a wide variety of new recreational craft, including sail cruisers, motor cruisers, motor boats and narrow boats come into force on 30 June.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Kvaerner Masa-Yards Inc. signs conditional contract for residence ship';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4407.stm';
  syndicate.article_date[ syndicate.index ] = 'Jun 15, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Kvaerner Masa-Yards Inc. (KMY), has signed a conditional contract with FS Ocean Club Ltd., managed by Ocean Development Group, to design, construct and deliver an approximately 42,500 Gross Ton luxury residential ship to be branded, managed and operated by Four Seasons Hotels and Resorts.';
  syndicate.index++;
  syndicate.article_title[ syndicate.index ] = 'Northrop Grumman Upgrades Navigation Systems for Coast Guard Icebreaker';
  syndicate.article_url[ syndicate.index ] = 'http://www.industrypages.com/artman/publish/Industry_News_4236.stm';
  syndicate.article_date[ syndicate.index ] = 'Jun  4, 2004';
  syndicate.article_summary[ syndicate.index ] = 'Northrop Grumman Corporation\'s (NYSE:NOC) Sperry Marine business unit has just completed a major upgrade of the Integrated Bridge System (IBS) aboard the U.S. Coast Guard\'s icebreaker USCGC Healy (WAGB 20).';
  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="http://www.industrypages.com/IPC/newsman.htm" target="_blank">');
//document.write('<font color="' + syndicate.date_fontcolor + '" face="Verdana, Arial, Helvetica, sans-serif" size="1">');
//document.write('get NEWSman for your website</font></a>');
//document.write('<br><br></font></td></tr>\n');
