

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('19/06/2009','15:02','CDP','Record Date and Estimated Distribution','4211329','','','');
headlines[1] = new headline('06/05/2009','17:30','CDP','Initial Director`s Interest Notice','4210152','','','');
headlines[2] = new headline('05/05/2009','18:52','CDP','Final Director`s Interest Notice','4210119','','','');
headlines[3] = new headline('17/04/2009','16:49','CDP','CDP Retirement of Director','4209558','','','');
headlines[4] = new headline('08/04/2009','17:44','CDP','Carindale Property Trust Half-Year Review','4209324','','','');
headlines[5] = new headline('04/03/2009','10:49','CDP','Ceasing to be a substantial holder from CGF','4208387','','','');
headlines[6] = new headline('26/02/2009','11:18','CDP','CDP Fund Payment Notice','4208154','','','');
headlines[7] = new headline('26/02/2009','8:52','CDP','ear Result for 6 Month Period Ended 31 December 2008','4208132','','','');
headlines[8] = new headline('18/12/2008','10:45','CDP','Record Date and Estimated Distribution','4206681','','','');
headlines[9] = new headline('10/09/2008','15:50','CDP','Carindale Property Trust 2008 Annual Report','4203065','','','');


///// 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>")
}
