

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('05/03/2010','10:44','WDC','Change in substantial holding from CBA','2585543','','','');
headlines[1] = new headline('25/02/2010','11:10','WDC','Westfield Group Fund Payment Notices','2584254','','','');
headlines[2] = new headline('17/02/2010','10:31','WDC','WDC 2009 Shopping Centre Operational Performance Report','2582892','','','');
headlines[3] = new headline('17/02/2010','8:36','WDC','Westfield Group Preliminary Final Report','2582834','','','');
headlines[4] = new headline('08/02/2010','16:44','WDC','Westfield Group  Welcomes JP Morgan To Sydney City Project','2581881','','','');
headlines[5] = new headline('02/02/2010','9:01','WDC','WDC Announcement of Estimated Distribution','2581211','','','');
headlines[6] = new headline('17/12/2009','16:25','WDC','Changes to DRP and WAT Constitution','2577300','','','');
headlines[7] = new headline('16/12/2009','17:28','WDC','Change in substantial holding','2577126','','','');
headlines[8] = new headline('16/12/2009','11:23','WDC','Westfield Group Appendix 3B','2577054','','','');
headlines[9] = new headline('07/12/2009','8:25','WDC','Ceasing to be a substantial holder','2575902','','','');


///// 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>")
}
