

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('03/07/2009','14:50','RIO','Result of Rio Tinto Limited Rights Issue Shortfall Placement','3320152','4','','');
headlines[1] = new headline('03/07/2009','9:05','RIO','Trading Halt','3320123','2','','');
headlines[2] = new headline('03/07/2009','8:10','RIO','Result of Rio Tinto Limited Rights Issue','3320117','4','','');
headlines[3] = new headline('03/07/2009','8:10','RIO','Sale of Rio Tinto plc Rights Issue Rump Placement','3320115','4','','');
headlines[4] = new headline('02/07/2009','7:58','RIO','Result of Rio Tinto plc Rights Issue','3320056','4','','');
headlines[5] = new headline('30/06/2009','8:31','RIO','Rio Tinto Rights Issues Aust Offer Document - second mailing','3319861','1','','');
headlines[6] = new headline('24/06/2009','9:03','RIO','IOH:  IOH Signs Native Title Agreement','3319595','2','','');
headlines[7] = new headline('23/06/2009','17:51','RIO','Rio Tinto Rights Issue - Tax File Number Letter','3319586','3','','');
headlines[8] = new headline('18/06/2009','18:58','RIO','EXT: Additional Board Positions and Management Changes','3319417','2','','');
headlines[9] = new headline('16/06/2009','17:58','RIO','RTL Rights Issue - notification of ineligible shareholders','3319305','2','','');


///// 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>")
}
