

function headline(date, time, symbol, headline, id,pages)
{
	// Represents a headline object
	this.date = date;
	this.time = time;
	this.symbol = symbol;
	this.headline = headline;
	this.id = id;
	this.pages = pages;
}

///// Data values /////
var headlines = new Array();

headlines[0] = new headline('03 January 2012','8:25','ERH','Socrates 1H Update 2','6573066','1','','');
headlines[1] = new headline('21 December 2011','11:55','ERH','Socrates 1H Drilling Update - No 1','6572229','1','','');
headlines[2] = new headline('07 December 2011','12:15','ERH','Becoming a substantial holder','6570560','3','','');
headlines[3] = new headline('25 November 2011','12:10','ERH','Results of Meeting','6568483','2','','');
headlines[4] = new headline('25 November 2011','11:00','ERH','AGM Presentation','6568464','10','','');
headlines[5] = new headline('07 November 2011','12:43','ERH','Clarification and Update','6565638','1','','');
headlines[6] = new headline('03 November 2011','12:23','ERH','Assignment of Interest','6565281','1','','');
headlines[7] = new headline('31 October 2011','13:34','ERH','Mining Notice and Quarterly Report','6564278','7','','');
headlines[8] = new headline('25 October 2011','14:55','ERH','Notice of Annual General Meeting/Proxy Form','6562961','7','','');
headlines[9] = new headline('25 October 2011','13:30','ERH','Annual Report to shareholders','6562938','50','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/erohydro/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 colspan =2>Announcements</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";
		        var asxcode = 'ERH';
				if (h.symbol == '') continue;

				document.write("	<tr class='" + cls + "'>");
				document.write("		<td><img src='http://clients.weblink.com.au/clients/erohydro/iconpdf.gif'  alt='View PDF' border='0' /></a></td>");
				document.write("		<td><a target='_blank' href='http://clients.weblink.com.au/clients/erohydro/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + " - " + h.date + "</a>  ("+h.pages+ " pages)"+"</td>");
				document.write("	</tr>");


			}
			document.write("	</tbody>")
	document.write("</table>")
}

