function TNewsItem() {}

var news = new Array()

news[0] = new TNewsItem();
news[0].date='23 Aug 2007'
news[0].title='Version 0.1 released'
news[0].text='This is the first release of Fresh Memory. All basic features are already implemented: \
<ul> \
<li> Creating, loading, editing, saving dictionaries</li> \
<li> Flash card test</li> \
</ul> \
<p><a href="changelog.html#fm-0.1">Changelog</a> :: <a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=534264">Download</a></p>'

news[1] = new TNewsItem();
news[1].date='09 Sep 2007'
news[1].title='Version 0.2 released'
news[1].text='<p>This is a major release.</p> \
<p>Added many features relating to dictionary editing, implemented the Find dialog. A lot of bugs were fixed.</p> \
<p><a href="changelog.html#fm-0.2">Changelog</a> :: <a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=538167">Download</a></p>'

news[2] = new TNewsItem();
news[2].date='09 Sep 2007'
news[2].title='Version 0.2: Windows binary'
news[2].text='<p id="older"></p>Fresh Memory binary for 32-bit Windows is available. \
The package contains all necessary dll\'s for running the application. \
Three archive types are available:  \
    <ul> \
    <li> zip </li> \
    <li> 7zip </li> \
    <li> exe (self-extracting archive)</li> \
    </ul> \
<p>Alternative archives without QT libraries are also available.</p> \
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=538167">Download</a></p>'

news[3] = new TNewsItem();
news[3].date='09 Sep 2007'
news[3].title='Version 0.2: Linux binary'
news[3].text='<p>Fresh Memory 0.2 binaries for Linux are available. Both i386 and AMD64 platforms are supported, choose appropriate package.</p> \
<p>Requirements:</p> \
    <ul> \
    <li>QT \>= 4.2 </li> \
    <li>Standard C++ libraries</li> \
    </ul> \
<p><a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=538167">Download</a></p>'

news[4] = new TNewsItem();
news[4].date='16 Sep 2007'
news[4].title='The web-site is ready'
news[4].text='<p>At last the minimalist web-page was changed to a real web-site. It contains a lot of useful information about installation and usage of Fresh Memory. Check it once in a while for future updates.</p>'

news[5] = new TNewsItem();
news[5].date='05 Dec 2007'
news[5].title='Version 0.3 released'
news[5].text='<p>This is the next major release.\
Many features related to GUI were added. The dictionary file format was changed to an XML-based one. Now CSV-files can be imported or exported using the convenient and feature-rich interface. \
The flashcards got the third field: "Example".</p> \
<p><a href="changelog.html#fm-0.3">Changelog</a> :: <a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=557004">Download</a></p>'

news[6] = new TNewsItem();
news[6].date='05 Nov 2008'
news[6].title='Subversion repository is working'
news[6].text='<p>The subversion repository was finally ported to SourceForge.net. \
It is now possible to checkout the fresh sources:</p> \
<pre>svn co https:\/\/freshmemory.svn.sourceforge.net/svnroot/freshmemory/trunk freshmemory</pre> \
<p>Compile and play around with new features:</p> \
<pre>qmake \n\
make release\n\
./freshmemory</pre> '

news[7] = new TNewsItem();
news[7].date='19 Nov 2008'
news[7].title='Version 0.4-alpha released'
news[7].text='<p>Alpha release of 0.4 Fresh Memory is out! The new features are the spaced repetition (based on SM2 algorithm) and support of multifield cards. </p> \
<p>Alpha release means the functionality is totally implemented, but it can still include major bugs or GUI inconsistencies. Version 0.4-beta will be released around 1 Dec 2008.</p> \
<p><a href="changelog.html#fm-0.4-alpha">Changelog</a> :: \
<a href="http://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=641410">Download</a></p>'

news[8] = new TNewsItem();
news[8].date='02 Dec 2008'
news[8].title='Version 0.4-beta released'
news[8].text='<p>Fresh Memory 0.4-beta arrived. A really big amount of bugs were fixed. The main goal of this release is to stabilize and improve the usability. </p> \
<p>The final 0.4 release is expected around 15 Dec. It will not have major changes anymore. That version will include only critical bug fixes if they are found.</p> \
<p><a href="changelog.html#fm-0.4-beta">Changelog</a> :: \
<a href="https://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=644241">Download</a></p>'

news[9] = new TNewsItem();
news[9].date='15 Dec 2008'
news[9].title='Version 0.4 (final) released'
news[9].text='<p>The final 0.4 version is ready. In comparison with the beta, the final version contains fixes to a couple \
of minor bugs. It doesn\'t add any new features or concepts. All core functionality was introduced in 0.4-alpha. Enjoy! </p> \
<p><a href="changelog.html#fm-0.4">Changelog</a> :: \
<a href="https://sourceforge.net/project/showfiles.php?group_id=203660&package_id=242870&release_id=647416">Download</a></p>'

/*news[#] = new TNewsItem();
news[#].date=' 2007'
news[#].title=''
news[#].text=''*/

var itemBegin = '<div class="newsItem"'
var headerBegin= '> \
    <div class="newsHeader"> \
    <p class="newsTitle">'
var dateBegin = '</p><p class="newsDate">Date: '
var contentBegin = '</p></div><div class="newsContent">'
var itemEnd = '</div></div>'

function PrintNews( aLimit, aMarkerPosition, aMarkerLabel )
{
var size = news.length;
var marker;

if(aLimit <= 0)
    {
    aLimit  = size
    }
for( i = size-1; i >= size-aLimit; i-- )
    {
    if( i == size-aMarkerPosition-1 )
        {
        marker = ' id="' + aMarkerLabel + '"';
        }
    else
        {
        marker = '';
        }
    document.write( itemBegin + marker + headerBegin + news[i].title + dateBegin +
        news[i].date + contentBegin + news[i].text + itemEnd)
    }
}