//News JavaScript
//Andrew "DaBooda" Stickney 2007
//This javascript writes the whole news page for me, very handy and efficient
//uses routines found in main.js

//News items
var newsCount = 0;	//reset news count
var newsItem = new Array();	//Array to hold in news items
//newsItem[newsCount++] = new Array('00/00/0000', 'News Item 1');
newsItem[newsCount++] = new Array('December 6, 2009', 'After a two month hiatus, Dabooda.org is up again. We were down, but never out ;) Special Thanx 2 our very own Hetha, Thank You Pocky Goddess!!');
newsItem[newsCount++] = new Array('April 25, 2009', 'I have updated some project dates and developer information. Nothing really much on this end...');
newsItem[newsCount++] = new Array('April 23, 2009', 'Been awhile and I have some major updates and news to report. First the <a class="form_link" href="developer.html">HGE Wrapper for FreeBasic</a> is done. Second I have halted work on DBOS for now in exchange for work on the new DaBooda Library built upon HGE. This Library will make HGE easier to deal with(as if it is not easy enough) and then some. It is going to rock...stay tuned.');
newsItem[newsCount++] = new Array('August 31, 2008', 'I have been working on the new DBOS v2.0 Library and it will be ready for release shortly. Just need to develop the reference for it and some more classes for support.');
newsItem[newsCount++] = new Array('January 11, 2008', 'Sokoban is now Installer package, and DBOS config is included with it.');
newsItem[newsCount++] = new Array('January 10, 2008', 'DBOS is ready along with Sokoban game. And so begins a new era in Old School.');
newsItem[newsCount++] = new Array('January 08, 2008', 'The site is back online, running at 100%. We are on a paid server now, so it should remain online. (*crosses fingers*)');

//WebMaster Items
var noteCount = 0;		//Reset Notes count
var noteItem = new Array();	//Array for note items
//noteItem[noteCount++] = new Array('00/00/0000', 'Update Item 1');
noteItem[noteCount++] = new Array('December 6, 2009', 'Site is backed up and re-upped to our now working server, we will rejoin you with our currently scheduled programming already in progress lol');
noteItem[noteCount++] = new Array('April 25, 2009', 'Yet again revamped the page somewhat, added a criteria page and lined out the display windows to be more readable. Also added a horizontal rule to separate things a bit better, I do hope this is now more readable. One thing I noted was when opening this site in Internet Explorer, it is totally trashed. I know newer versions of IE(greater than 6.0) handle this like it is supposed to, so I am not going to pull my hair trying to figure out how to make this complient in IE. If you are a css wizard and wish to do so for me, please contact me.');
noteItem[noteCount++] = new Array('April 23, 2009', 'Updated everything from the side menu, to nearly every page. This was a massive update and is what I get for negleting my webmaster duties.(Smacks Self). Please ignore the numerous typos throughout the site, for I did this in quite a rush and will proofread next update. Any problems you can contact us.');
noteItem[noteCount++] = new Array('August 31, 2008', 'Added status box to main page to let people know the status of DBOS v2.0.');
noteItem[noteCount++] = new Array('January 11, 2008', 'Removed old dbos files and replaced with Sokoban Setup.exe. This is the format I will continue to use.');
noteItem[noteCount++] = new Array('January 10, 2008', 'Uploaded DBOS and Sokoban, removing them from in work to completion status');
noteItem[noteCount++] = new Array('January 08, 2008', 'Finally finished new site, and it is ready to be viewed.');

//This function writes all to page
function writeNews() {
	var index = 0;	//index to be used to write
	//check news and write
	if(newsCount>0)	{	//only update news if count is greater than 0
		//First write the window, using dynamic javascript in main.js
		winAdd(1, 'news_id', 'Site News');
		//now loop through and write all the items
		for(index=0; index<newsCount; index++) {
			//open window Divider
			document.write('<div class="sub_divBox">');
			//insert caption(date)
			document.write('<div class="sub_caption">' + newsItem[index][0] + '</div>');
			//insert news item
			document.write('<div class="sub_p">' + newsItem[index][1] + '</div>');
			//Close Divider
			document.write('</div>');
			//Note I could have done all that in one write statment, but chose not to for readability
		}
		//Write a sub footer with a back to top link in it
		document.write('<div class="sub_footer"><a class="to_top" href="#page_top"></a></div>');
		//Close window
		document.write('</div>');
	}
	document.write('<hr />');
	//note updates is the same as news
	if(noteCount>0)	{
		winAdd(1, 'notes_id', 'WebMaster Notes');
		for(index=0; index<noteCount; index++) {
			document.write('<div class="sub_divBox">');
			document.write('<div class="sub_caption">' + noteItem[index][0] + '</div>');
			document.write('<div class="sub_p">' + noteItem[index][1] + '</div>');
			document.write('</div>');
		}
		document.write('<div class="sub_footer"><a class="to_top" href="#page_top"></a></div>');
		document.write('</div>');
	}
}
