

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('30 May 2011','11:26','STU','Removal from Official List','5183239','','','');
headlines[1] = new headline('19 May 2011','18:56','STU','SXY: Senex completes compulsory acquisition of Stuart shares','5183152','','','');
headlines[2] = new headline('09 May 2011','8:27','STU','Final Director`s Interest Notice','5183035','','','');
headlines[3] = new headline('09 May 2011','8:26','STU','Director Retirement','5183034','','','');
headlines[4] = new headline('29 Apr 2011','14:35','STU','March 2011 Quarterly Report','5182920','','','');
headlines[5] = new headline('19 Apr 2011','13:42','STU','Suspension from Official Quotation at close on 20 April 2011','5182766','','','');
headlines[6] = new headline('13 Apr 2011','17:09','STU','SXY: Senex lodges compulsory acquisition notice','5182683','','','');
headlines[7] = new headline('12 Apr 2011','9:07','STU','Change in substantial holding from SXY','5182655','','','');
headlines[8] = new headline('11 Apr 2011','15:11','STU','SXY:Corporate and Operational update','5182649','','','');
headlines[9] = new headline('11 Apr 2011','9:48','STU','Change in substantial holding from SXY','5182644','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/stuartpetroleum/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("		<a target='_blank' href='http://clients.weblink.com.au/clients/stuartpetroleum/article.asp?view=" + h.id + "'>" + h.headline );
			document.write("		</a><br>");
			document.write(h.date);
			document.write("		</td>");
			document.write("	</tr>");

		}
		document.write("	</tbody>")
	document.write("</table>")
}

