/// <summary>Writes out links to news articles.</summary>
/// <param name="articleCount">The number of articles to be displayed, or -1 if all should be displayed.</param>
/// <param name="forAllPage">(Optional) True if displaying article headers on the "View all" page.</param>
/// <remarks>The first article should be the article that is displayed on the news landing page.</remarks>
function writeNews(articleCount, forAllPage)
{
    // items should be in reverse chronological order (that is, newest first)
    var arrArticles = new Array(
        '<a href="falcon-50-stc.html">Rockwell Collins Pro Line 21 IDS STC for Falcon 50 available to dealers</a>',
        '<a href="piaggio-certified.html">Rockwell Collins Pro Line 21 IDS certified for Piaggio 180</a>',
        '<a href="king-air.html">Rockwell Collins offers Pro Line 21 IDS retrofit for King Air aircraft</a>',
        '<a href="piaggio.html">Rockwell Collins LCD display, AHRS upgrade available for Piaggio 180\'s</a>',
        '<a href="pro-line-21-tso.html">Rockwell Collins Pro Line 21 IDS expands offerings with latest TSO</a>'
        );
    
    var blnForAll = (arguments.length > 1 && forAllPage);
    
    if ( articleCount == -1 || articleCount > arrArticles.length )
        articleCount = arrArticles.length;
    
    if ( blnForAll )
    {
        document.write('<table width="100%" border="0" class="cssIDSNews">');
    }
    for ( i = 0; i < articleCount; i++ )
    {
        if ( blnForAll )
        {
            document.write('<tr><td');
            if ( i % 2 != 0 )
                document.write(' style="background-color:#edebea;"');
            document.write('>');
        }
        
        document.write(arrArticles[i]);
        
        if ( blnForAll )
        {
            document.write('</td></tr>');
        }
        else
        {
            document.write('<br /><br />');
        }
    }
    
    if ( blnForAll )
    {
        document.write('</table>');
    }
}
