

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('01 September 2010:','16:34','RVE','Appendix 3B','6503805','','','');
headlines[1] = new headline('01 September 2010:','12:46','RVE','Full Year Statutory Accounts','6503760','','','');
headlines[2] = new headline('27 August 2010:','12:41','RVE','Appendix 3B','6503065','','','');
headlines[3] = new headline('11 August 2010:','9:53','RVE','Notice of General Meeting/Proxy Form','6501199','','','');
headlines[4] = new headline('30 July 2010:','10:39','RVE','Quarterly Activities and Cash Flow Report','6499615','','','');
headlines[5] = new headline('09 July 2010:','10:18','RVE','RIVIERA SIGNS SHARE SALE AGREEMENT','6497060','','','');
headlines[6] = new headline('04 June 2010:','12:55','RVE','RIVIERA SIGNS OFF ON DUE DILIGENCE FOR IRON ORE PROJECT','6493446','','','');
headlines[7] = new headline('03 June 2010:','10:31','RVE','RIVIERA SIGNS OFF ON DUE DILIGENCE FOR IRON ORE PROJECT','6493261','','','');
headlines[8] = new headline('18 May 2010:','14:45','RVE','Ceasing to be a substantial holder','6491566','','','');
headlines[9] = new headline('29 April 2010:','10:21','RVE','Quarterly Activities and Cash Flow Report','6488991','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/rivieraresources/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("	</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><br>");
			document.write(h.date);
			document.write("		<br>");
			document.write("		<a target='_blank' href='http://clients.weblink.com.au/clients/rivieraresources/article.asp?view=" + h.id + "'>" + h.headline );
			document.write("		</td>");
			document.write("	</tr>");

		}
		document.write("	</tbody>")
	document.write("</table>")
}
