

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('16/10/2008','11:33','WDC','Media Release Westfield Doncaster','2525119','','','');
headlines[1] = new headline('10/10/2008','16:51','WDC','WDC Half Year Review 30 June 2008','2524456','','','');
headlines[2] = new headline('16/09/2008','10:49','WDC','Becoming a substantial holder','2520900','','','');
headlines[3] = new headline('11/09/2008','12:01','WDC','Becoming a substantial holder','2520365','','','');
headlines[4] = new headline('08/09/2008','12:14','WDC','Appendix 3B','2519853','','','');
headlines[5] = new headline('01/09/2008','16:43','WDC','Change of Director`s Interest Notice','2519033','','','');
headlines[6] = new headline('28/08/2008','17:18','WDC','Initial Director`s Interest Notice','2518398','','','');
headlines[7] = new headline('28/08/2008','17:06','WDC','Appointment of The Right Honourable Lord Goldsmith QC PC','2518385','','','');
headlines[8] = new headline('27/08/2008','12:06','WDC','WDC Fund Payment Notices for WT and WAT','2517918','','','');
headlines[9] = new headline('27/08/2008','10:15','WDC','WT and WAT Half-Year Financial Reports','2517886','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/westfield/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/article.asp?view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
