

function headline(date, time, symbol, headline, id,pages)
{
	// Represents a headline object
	this.date = date;
	this.time = time;
	this.symbol = symbol;
	this.headline = headline;
	this.id = id;
	this.pages = pages;
}

///// Data values /////
var headlines = new Array();

headlines[0] = new headline('16/03/2010','9:24','RIO','Rio Tinto Limited 2009 Notice of Annual general meetings','3333845','16','','');
headlines[1] = new headline('16/03/2010','9:24','RIO','Rio Tinto Limited 2009 Proxy Form','3333846','2','','');
headlines[2] = new headline('16/03/2010','9:23','RIO','Rio Tinto 2009 Annual review','3333843','36','','');
headlines[3] = new headline('16/03/2010','9:22','RIO','Rio Tinto 2009 Annual report','3333842','240','','');
headlines[4] = new headline('16/03/2010','9:20','RIO','Notice to ASX - 2009 Annual report and 2010 AGMs','3333841','2','','');
headlines[5] = new headline('02/03/2010','8:37','RIO','Completion of Alcan Packaging Food Americas sale','3333219','2','','');
headlines[6] = new headline('01/03/2010','10:06','RIO','Rio Tinto to acquire 15 million shares in Ivanhoe Mines','3333148','2','','');
headlines[7] = new headline('25/02/2010','11:44','RIO','App 3Y - Change of Director`s Interest Notice','3332872','3','','');
headlines[8] = new headline('23/02/2010','10:12','RIO','Rio Tinto expands Mine of the Future programme','3332651','3','','');
headlines[9] = new headline('22/02/2010','10:25','RIO','Fitch upgrades Rio Tinto to `A-`','3332561','3','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/WebLinkInvestorRelations/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<font color=red>Sample</font></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";
        var asxcode = 'RIO';
		if (h.symbol == '') continue;

		document.write("	<tr class='" + cls + "'>");
		document.write("		<td>" + h.date + "</td>");
		document.write("		<td>" + h.time + "</td>");
		document.write("		<td align=left><a target='_blank' href='http://clients.weblink.com.au/clients/WebLinkInvestorRelations/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</a> ("+h.pages+ " pages)"+"</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
