

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('26/11/2008','18:06','RHT','Final Director`s Interest Notice','6431028','','','');
headlines[1] = new headline('26/11/2008','18:06','RHT','Final Director`s Interest Notice','6431029','','','');
headlines[2] = new headline('26/11/2008','18:05','RHT','Results of AGM','6431026','','','');
headlines[3] = new headline('26/11/2008','10:33','RHT','AGM Presentation to Shareholders','6430833','','','');
headlines[4] = new headline('26/11/2008','10:29','RHT','Director not to stand for Re-Election','6430832','','','');
headlines[5] = new headline('11/11/2008','17:07','RHT','Response to ASX Query - Annual Financial Report','6429081','','','');
headlines[6] = new headline('31/10/2008','15:12','RHT','Change of Director`s Interest Notice','6427943','','','');
headlines[7] = new headline('27/10/2008','13:45','RHT','Annual Report','6426511','','','');
headlines[8] = new headline('27/10/2008','13:43','RHT','Notice of Meeting','6426510','','','');
headlines[9] = new headline('24/10/2008','13:33','RHT','Initial Director`s Interest Notice','6426169','','','');


///// 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>")
}
