

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('29/11/2011','9:01','STS','Appendix 3C - Announcement of buy-back','3365843','','','');
headlines[1] = new headline('25/11/2011','8:29','STS','Results of Meeting','3365610','','','');
headlines[2] = new headline('25/11/2011','8:29','STS','Chairman`s Address to Shareholders','3365603','','','');
headlines[3] = new headline('25/11/2011','8:28','STS','AGM Presentation','3365605','','','');
headlines[4] = new headline('25/11/2011','8:25','STS','Managing Director`s Address to Shareholders','3365604','','','');
headlines[5] = new headline('21/10/2011','16:46','STS','2011 AGM Proxy Form','3363238','','','');
headlines[6] = new headline('21/10/2011','16:43','STS','Notice of 2011 Annual General Meeting','3363236','','','');
headlines[7] = new headline('21/10/2011','16:41','STS','Concise Accounts - Financial Year 2011','3363234','','','');
headlines[8] = new headline('17/10/2011','9:57','STS','Change of Director`s Interest Notice - Perry','3362789','','','');
headlines[9] = new headline('29/09/2011','14:58','STS','Annual Report to shareholders','3361867','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/structural/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/structural/article.asp?view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}

