

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/06/2009','8:24','RHT','Change of Director`s Interest Notice','6451043','','','');
headlines[1] = new headline('29/06/2009','8:24','RHT','Change of Director`s Interest Notice','6451042','','','');
headlines[2] = new headline('29/04/2009','18:35','RHT','Appendix 4C - quarterly','6444908','','','');
headlines[3] = new headline('27/02/2009','14:17','RHT','Half Yearly Report and Accounts','6439360','','','');
headlines[4] = new headline('27/02/2009','14:17','RHT','RHT announces 5th consecutive profitable quarter','6439361','','','');
headlines[5] = new headline('16/02/2009','12:14','RHT','Initial Director`s Interest Notice','6438078','','','');
headlines[6] = new headline('16/02/2009','12:04','RHT','Appointment of Director','6438075','','','');
headlines[7] = new headline('28/01/2009','17:14','RHT','Appendix 4C - quarterly','6435963','','','');
headlines[8] = new headline('17/12/2008','13:24','RHT','Change of Director`s Interest Notice','6433334','','','');
headlines[9] = new headline('17/12/2008','13:21','RHT','Appendix 3B','6433332','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/resonancehealth/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/resonancehealth/article.asp?view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
