/* $Id: news.js,v 1.22.2.1 2010/07/08 14:50:33 evan Exp $ */
/**
 * Atlas Ergonomics Web Application
 * Copyright 2006 - 2010 Atlas Ergonomics. All Rights Reserved.
 */

function displayNewsArticles(maxArticles,pageSection,displayStyle,trunc){
  var newsArticles = new Array(
    Array('Jul. 28, 2010',  'pressrelease20100728.htm',  'Atlas Announces Expansion of Ergonomic Service Provider Network and Training Options'),
    Array('Jun.  4, 2010',  'pressrelease20100604.htm',  'Atlas to Share Latest Strategies to Reduce Driver Injuries, Costs'),
    Array('Mar. 15, 2010',  'pressrelease20100315.htm',  'Atlas to Share Findings on Split Keyboards, Safe Patient Handling at Applied Ergonomics Conference'),
    Array('Mar.  3, 2010',  'pressrelease20100303.htm',  'Atlas Ergonomics Study: Workers Strongly Prefer Split Keyboards'),
    Array('Dec. 18, 2009',  'pressrelease20091218.htm',  'Study Shows Driver Pre-Work Screens Can Yield 25-to-1 ROI'),
    Array('Jun. 15, 2009',  'pressrelease20090615.htm',  'In Safe Patient Handling, Culture May Matter As Much As Equipment'),
    Array('Apr. 20, 2009',  'pressrelease20090420.htm',  'Certain Truck Drivers at High Risk of Non-Accident-Related Injury'),
    Array('Mar. 16, 2009',  'pressrelease20090316.htm',  'Measurement Vital for Safe Patient Handling Program Success'),
    Array('Feb. 13, 2009',  'pressrelease20090213.htm',  'Atlas Announces Further Expansion of Ergonomic Service Provider Network'),
    Array('Jan. 26, 2009',  'pressrelease20090126.htm',  'Employees Must Understand Furniture to Protect Themselves'),
    Array('Dec. 22, 2008',  'pressrelease20081222.htm',  'Workplace Study Reveals Which Furniture Affects Employee Health'),
    Array('Nov. 25, 2008',  'pressrelease20081125.htm',  'Atlas To Share Assessment, Optimization Methods At National Ergonomics Conference'),
    Array('Nov.  3, 2008',  'pressrelease20081103.htm',  'Ergonomic Misconceptions Widespread, Even Among Professionals'),
    Array('Oct.  3, 2008',  'pressrelease20081003.htm',  'Bus Drivers Report 50% Drop in Pain, Discomfort This Year'),
    Array('Sep. 15, 2008',  'pressrelease20080915.htm',  'Atlas Expert to Update American Trucking Association on Ergonomics'),
    Array('Sep.  3, 2008',  'pressrelease20080903.htm',  'Atlas Announces Further Expansion of Ergonomic Service Provider Network'),
    Array('Aug. 22, 2008',  'pressrelease20080822.htm',  'Open Letter to Safety and Human Resource Leaders in Commercial Transportation'),
    Array('Jun.  2, 2008',  'pressrelease20080602.htm',  'Atlas Experts to share Key Strategies to Reduce Workplace Injury Risk'),
    Array('May  12, 2008',  'pressrelease20080512.htm',  'Another Expansion for Nation\'s Largest Network of Ergonomic Service Providers'),
    Array('Mar. 31, 2008',  'pressrelease20080331.htm',  'Atlas Ergonomics to Provide Free Office Ergonomics Software with Nationwide Support'),
    Array('Nov. 21, 2007',  'pressrelease20071121.htm',  'Atlas Experts to Share Key Strategies at National Ergonomics Conference'),
    Array('Nov.  6, 2007',  'pressrelease20071106.htm',  'Atlas Ergonomics Announces New Regional Service Providers'),
    Array('Oct. 18, 2007',  'pressrelease20071018.htm',  'Atlas Ergonomics Brings Interstate Distributors Fast, Significant Decrease in Driver Claims, Discomfort'),
    Array('Aug. 06, 2007',  'pressrelease20070806.htm',  'Another Expansion for Nation\'s Largest Network of Ergonomic Service Providers'),
    Array('Jun. 04, 2007',  'pressrelease20070604.htm',  'Atlas Ergonomics to Present at NeoCon on "Missing Link" in Furniture Investments'),
    Array('May  21, 2007',  'pressrelease20070521.htm',  'Atlas Ergonomics to Present at Two National Conferences on Physical Demands Analysis'),
    Array('Apr. 20, 2007',  'pressrelease20070420.htm',  'The Rapid Transit System Improves Ergonomics for Drivers'),
    Array('Mar. 06, 2007',  'pressrelease20070306.htm',  'Atlas Ergonomist to Speak on More Training and Less Pain'),
    Array('Nov. 22, 2006',  'pressrelease20061122.htm',  'Atlas Speakers Back By Popular Demand at National Ergonomics Conference'),
    Array('Nov. 11, 2006',  'pressrelease20061120.htm',  'Atlas Ergonomics Announces Con-way Truckload to Adopt its Ergonomic Program'),
    Array('Oct. 26, 2006',  'pressrelease20061026.htm',  'Health   Services with the Driver in Mind: Unprecedented program helps improve truck drivers\' health.'),
    Array('Sep. 22, 2006',  'pressrelease20060922.htm',  'Research Shows Impact of Employee Knowledge on Office Discomfort'),
    Array('Jul. 26, 2006',  'pressrelease20060726.htm',  'Atlas Expands   Efforts to Address Worker Health and Wellness '),
    Array('Jul. 10, 2006',  'pressrelease20060710.htm',  'Interstate Distributor Co. and Atlas work to reduce driver  discomfort and injuries '),
    Array('Jun. 19, 2006',  'pressrelease20060619.htm',  'Atlas Ergonomics Announces New Regional Service Providers'),
    Array('Mar. 22, 2006',  'pressrelease20060422.htm',  'Atlas Ergonomics to present on hot topics at three National Conferences '),
    Array('Mar. 20, 2006',  'pressrelease20060320.htm',  'Truck Ergonomics Provides Bottom Line Results'),
    Array('Mar.  3, 2006',  'pressrelease20060303.htm',  'Atlas to Present at Two National Conferences on the Value of Ergonomics'),
    Array('Feb. 24, 2006',  'pressrelease20060224.htm',  'Atlas Ergonomics Announces a Record Number of New Regional Providers')
  );

  if(!maxArticles){
    maxArticles = newsArticles.length;
  }

  if(pageSection == 'sidebar'){
    for(i=0;i<maxArticles;i++){
      document.write('<div class="articleList">');
      switch(displayStyle){
        case "wordLink":
            document.write('  <div class="articleDate">'+newsArticles[i][0]+'</div>');
            document.write('  <div class="articleTitle">'+newsArticles[i][2]+' <span class="wordLink"><a href="'+newsArticles[i][1]+'">full article</a></span></div>');
            break;
        case "truncate":
            if(!trunc){
              trunc = 50;
            }
            document.write('  <div class="articleDate">'+newsArticles[i][0]+'</div>');
            document.write('  <div class="articleTitle">'+newsArticles[i][2].substring(0, trunc)+'... <span class="wordLink"><a href="'+newsArticles[i][1]+'">full article</a></span></div>');
            break;
        default: /* link full text of title */
            document.write('  <div class="articleDate">'+newsArticles[i][0]+'</div>');
            document.write('  <div class="articleTitle"><a href="'+newsArticles[i][1]+'">'+newsArticles[i][2]+'</a></div>');
            break;
      }
      document.write('</div>');
    }
  }
  else{
    document.write('<table cellpadding="0" cellspacing="0" class="articleList">');
    for(i=0;i<maxArticles;i++){
      document.write('  <tr>');
      document.write('    <td class="articleDate">'+newsArticles[i][0]+'</td>');
      document.write('    <td class="articleTitle"><a href="'+newsArticles[i][1]+'">'+newsArticles[i][2]+'</a></td>');
      document.write('  </tr>');
    }
    document.write('</table>');
  }

}
