

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/12/2011','15:51','CDP','Announcement of estimated distribution and record date','4238493','','','');
headlines[1] = new headline('09/12/2011','9:54','CDP','Change of Registered Address','4238257','','','');
headlines[2] = new headline('22/11/2011','14:35','CDP','Updated Security Trading Policy','4237544','','','');
headlines[3] = new headline('28/09/2011','15:13','CDP','Carindale Property Trust 2011 Annual Report','4235563','','','');
headlines[4] = new headline('24/08/2011','15:06','CDP','Carindale Property Trust - Fund Payment Notice','4234477','','','');
headlines[5] = new headline('17/08/2011','9:13','CDP','Preliminary Final Report','4234212','','','');
headlines[6] = new headline('16/08/2011','15:51','CDP','Updated Security Trading Policy','4234193','','','');
headlines[7] = new headline('21/06/2011','11:57','CDP','Record Date and Estimated Distribution','4232790','','','');
headlines[8] = new headline('25/05/2011','17:13','CDP','Final Director`s Interest Notice','4232196','','','');
headlines[9] = new headline('25/05/2011','17:12','CDP','Initial Director`s Interest Notice','4232195','','','');


///// 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>")
}

