

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('25/02/2010','11:18','CDP','Carindale Property Trust Fund Payment Notice','4218508','','','');
headlines[1] = new headline('17/02/2010','10:48','CDP','CDP Half Yearly Report and Accounts','4218220','','','');
headlines[2] = new headline('22/12/2009','11:04','CDP','Change in substantial holding','4217192','','','');
headlines[3] = new headline('22/12/2009','9:47','CDP','Becoming a substantial holder from CBA','4217189','','','');
headlines[4] = new headline('18/12/2009','14:56','CDP','Becoming a substantial holder from CGF','4217088','','','');
headlines[5] = new headline('18/12/2009','9:24','CDP','CDP Record Date and Estimated Distribution','4217062','','','');
headlines[6] = new headline('17/12/2009','8:29','CDP','Change in substantial holding','4217016','','','');
headlines[7] = new headline('01/09/2009','15:26','CDP','CDP 2009 Annual Report','4213389','','','');
headlines[8] = new headline('26/08/2009','14:32','CDP','CDP Fund Payment Notice','4213108','','','');
headlines[9] = new headline('26/08/2009','9:28','CDP','Preliminary Final Report','4213081','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/westfield/cdp/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>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";

		if (h.symbol == '') continue;

		document.write("	<tr class='" + cls + "'>");
		document.write("		<td>" + h.date + "</td>");
		document.write("		<td>" + h.time + "</td>");
		document.write("		<td><a target='_blank' href='http://clients.weblink.com.au/clients/westfield/cdp/article.asp?view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");

	}
	document.write("	</tbody>")
	document.write("</table>")
}
