

function headline(date, time, symbol, headline, id)
{
	// Represents a headline object
	this.date = date;
	this.time = time;
	this.symbol = symbol;
	this.headline = headline;
	this.id = id;
}

///// Data values /////
var headlines = new Array();

headlines[0] = new headline('09/02/2010','20:30','ZOR','End of Day','2582043','','','');
headlines[1] = new headline('09/02/2010','20:23','ETW','$3m Capital Raising - Dispatch of Holding Statements','6480007','','','');
headlines[2] = new headline('09/02/2010','20:21','SGZ','AIM Admission - Marketing Presentation','6480006','','','');
headlines[3] = new headline('09/02/2010','19:58','EXE','Appendix 3B','6480005','','','');
headlines[4] = new headline('09/02/2010','19:52','WHE','Updated Timeline and Appendix 3B for Peak Coal Acquisition','6480004','','','');
headlines[5] = new headline('09/02/2010','19:47','NUF','Becoming a substantial holder (Part 3 of 3)','3332006','','','');
headlines[6] = new headline('09/02/2010','19:45','SRE','Appendix 3B','6480003','','','');
headlines[7] = new headline('09/02/2010','19:44','BRM','Progress Report - Resources Classification Upgrade','6480002','','','');
headlines[8] = new headline('09/02/2010','19:43','NUF','Becoming a substantial holder (Part 2 of 3)','3332005','','','');
headlines[9] = new headline('09/02/2010','19:35','NUF','Becoming a substantial holder (Part 1 of 3)','3332004','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/futurewealthplanners/article.asp?view=' + articleID;
	var PopupWin = window.open(urlStr,"viewNews","scrollbars=yes,toolbar=no,directories=no,status=yes,menubar=no,resizable=yes,width=630,height=450")
	PopupWin.focus();
}

function renderHeadlinesList()
{
	document.write("<table class='wlNewsTable'>");
	document.write("	<thead>");
	document.write("		<tr>");
	document.write("			<th>Date</th>");
	document.write("			<th>Time</th>");
	document.write("			<th>Symbol</th>");
	document.write("			<th>Document</th>");
	document.write("		</tr>");
	document.write("	</thead>")
	document.write("	<tbody>")

	for (var i=0; i<headlines.length; i++) {
		var h = headlines[i];
		var cls = (i%2 == 0) ? "even" : "odd";
        var asxcode = 1;
		if (h.symbol == '') continue;

		document.write("	<tr class='" + cls + "'>");
		document.write("		<td>" + h.date+ "</td>");
		document.write("		<td>" + h.time + "</td>");
		document.write("		<td>" + h.symbol + "</td>");
		document.write("		<td>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
