function writeNavItem(myclass,width,fontweight,url,linktext) {
	document.write('<div class="navitem" style="width:'+width+'px; font-weight:'+fontweight+'">'+
				   '<a href="'+url+'" class="'+myclass+'">'+linktext+'</a>'+
				   '</div>');
}

var newslist=[ //month, day, headline, link, fulldate, category, target
			  
			["OCT","21","Corporate Modelling's Windows 7 compatible solutions to be released by the end of 2009","/news/Corporate-Modellings-solutions-compatible-with-Windows-7/","October 21st 2009","general","_self"],
			["MAY","11","New Sales Director appointed at Corporate Modelling","/news/New-Sales-Director-for-Corporate-Modelling/","May 11th 2009","general","_self"],
			["MAR","16","Corporate Modelling Press Release: Tools for the Trade","/news/Corporate-Modelling-Press-Release-Tools-for-the-Trade/","March 16th 2009","improvement","_self"],
			["MAR","05","Corporate Modelling becomes a member of ScotlandIS","/news/Corporate-Modelling-becomes-member-of-ScotlandIS/","March 5th 2009","general","_self"],
			["JAN","06","Cloud Computing Begins to Gain Traction on Wall Street","http://www.wallstreetandtech.com/it-infrastructure/showArticle.jhtml?articleID=212700913","January 6th 2009","improvement","_blank"],
			["DEC","02","Corporate Modelling partners start selling &quot;BPM in Cloud&quot; Service","/news/Corporate-Modelling-partners-start-selling-BPM-in-Cloud-Service/","December 2nd 2008","health","_self"],
			["DEC","01","Corporate Modelling attending third annual Six Sigma conference on Dec 15th and 16th","/news/Corporate-Modelling-attending-third-annual-Six-Sigma-conference/","December 1st 2008","improvement","_self"],
			["NOV","28","Grid Webcast - Transforming HPC Server 2008 into a Utility Computing Platform","/news/Corporate-Modelling-Grid-Webcast-Transforming-HPC-Server-2008-into-a-Utility-Computing-Platform/","November 28th 2008","grid","_self"],
			["NOV","05","Corporate Modelling appoint David McConachie as new director of sales","/news/Corporate-Modelling-appoint-David-McConachie-as-new-director-of-sales/","November 5th 2008","general","_self"],
			["JUL","18","Corporate Modelling Appoints New Strategy Advisor","/news/Corporate-Modelling-Appoints-New-Strategy-Advisor/","July 18th 2008","general","_self"],
			["APR","16","Corporate Modelling at the ACORD LOMA Exhibition, Las Vegas, May 13-15 2008","/news/Corporate-Modelling-at-the-ACORD-LOMA-Exhibition-2008/","April 16th 2008","improvement","_self"],
			["APR","11","Corporate Modelling joins Object Management Group","/news/Corporate-Modelling-joins-Object-Management-Group/","April 11th 2008","improvement","_self"],
			["JAN","11","Corporate Modelling joins Mainframe Migration Alliance","/news/Corporate-Modelling-joins-Mainframe-Migration-Alliance/","January 11th 2008","grid","_self"],
			["DEC","04","No1 FX Gets New Grid Solution","/news/No1-FX-Gets-New-Grid-Solution/","December 4th 2007","grid","_self"],
			["Jul","13","Corporate Modelling Opts Against Open Source, Doubles Revenue with Office Business Application","/news/Corporate-Modelling-Opts-Against-Open-Source-Doubles-Revenue-with-Office-Business-Application/","July 13th 2007","improvement","_self"],
			["MAY","11","The Financial Services Grid Initiative - Launched","/news/The-Financial-Services-Grid-Initiative-Launched/","May 11th 2007","grid","_self"]
			];

function writeLatestNews() {
	document.write('<ul>');
	for (var i=0; i<=4; i++) {
		document.write('<li>'+
					   '<div class="calendar">'+
					   		'<div class="month">'+newslist[i][0]+'</div>'+
					   		'<div class="day">'+newslist[i][1]+'</div>'+
					   '</div>'+
					   '<div class="newsitem"><a href="'+newslist[i][3]+'" class="newslink" target="'+newslist[i][6]+'">'+newslist[i][2]+'</a></div>'+
					   '</li>');
	}
	document.write('</ul>');
}

function writeAllNews() {
	document.write('<ul>');
	for (var i=0; i<=newslist.length-1; i++) {
			if (i%2 == 0) {
				document.write(	'<li>'+
					   			'<p class="fullnewsitem"><a href="'+newslist[i][3]+'" class="newslink" target="'+newslist[i][6]+'">'+newslist[i][2]+'</a>'+
								'<br><span class="newsdate">Added '+newslist[i][4]+'</span></p>'+
					   			'</li>');
			}
			else {
				document.write(	'<li class="alt">'+
					   			'<p class="fullnewsitem"><a href="'+newslist[i][3]+'" class="newslink" target="'+newslist[i][6]+'">'+newslist[i][2]+'</a>'+
								'<br>'+
								'<span class="newsdate">Added '+newslist[i][4]+'</span></p>'+
					   			'</li>');
			}
	}
	document.write('</ul>');
}
function writeRightNews() {
	document.write('<ul>');
	for (var i=0; i<=newslist.length-1; i++) {
				document.write(	'<li>'+
					   			'<span class="rightnewsitem"><a href="'+newslist[i][3]+'" class="newslink" target="'+newslist[i][6]+'">'+newslist[i][2]+'</a>'+
								'<br><span class="newsdate">Added '+newslist[i][4]+'</span></span><div class="rightline"></div>'+
					   			'</li>');
	}
	document.write('</ul>');
}
function writeSpecificNews(category) {
	document.write('<ul>');
	for (var i=0; i<=newslist.length-1; i++) {
			if (newslist[i][5]==category) {
				document.write(	'<li>'+
					   			'<span class="rightnewsitem"><a href="'+newslist[i][3]+'" class="newslink" target="'+newslist[i][6]+'">'+newslist[i][2]+'</a>'+
								'<br><span class="newsdate">Added '+newslist[i][4]+'</span></span><div class="rightline"></div>'+
					   			'</li>');
			}
	}
	document.write('</ul>');
}