

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('10/09/2008','15:50','CDP','Carindale Property Trust 2008 Annual Report','4203065','','','');
headlines[1] = new headline('28/08/2008','17:22','CDP','Initial Director`s Interest Notice','4202631','','','');
headlines[2] = new headline('28/08/2008','17:11','CDP','Appointment of The Right Honourable Lord Goldsmith QC PC','4202629','','','');
headlines[3] = new headline('27/08/2008','12:11','CDP','CDP Fund Payment Notice','4202504','','','');
headlines[4] = new headline('27/08/2008','10:29','CDP','CDP Preliminary Final Report for Period Ended 30 June 2008','4202491','','','');
headlines[5] = new headline('19/06/2008','9:01','CDP','Announcement of Record Date and Estimated Distribution','4200406','','','');
headlines[6] = new headline('23/05/2008','13:55','CDP','Final Director`s Interest Notice','4199737','','','');
headlines[7] = new headline('09/05/2008','16:10','CDP','CDP Half-Year Review','4199394','','','');
headlines[8] = new headline('27/02/2008','12:16','CDP','Initial Director`s Interest Notice','4197167','','','');
headlines[9] = new headline('27/02/2008','11:50','CDP','CDP Fund Payment Notice','4197162','','','');


///// 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>")
}
