

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('31/01/2012','15:17','ENL','Quarterly Activities and Cashflow Report','6576153','','','');
headlines[1] = new headline('11/01/2012','20:26','ENL','Change in substantial holding','6573862','','','');
headlines[2] = new headline('18/11/2011','14:04','ENL','Results of Meeting','6567329','','','');
headlines[3] = new headline('18/11/2011','11:19','ENL','AGM Presentation 2011','6567282','','','');
headlines[4] = new headline('08/11/2011','9:53','ENL','Share Placement to Shanghai Sky','6565764','','','');
headlines[5] = new headline('04/11/2011','15:25','ENL','Trading Halt','6565479','','','');
headlines[6] = new headline('31/10/2011','14:59','ENL','Quarterly Activities and Cashflow Report','6564340','','','');
headlines[7] = new headline('06/10/2011','13:51','ENL','Notice of Annual General Meeting/Proxy Form','6560272','','','');
headlines[8] = new headline('06/10/2011','13:50','ENL','Annual Report to shareholders','6560271','','','');
headlines[9] = new headline('02/09/2011','16:27','ENL','Full Year Statutory Accounts','6555771','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/eaglenickel/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";
        var asxcode = 'ENL';
		if (h.symbol == '') continue;

		document.write("	<tr class='" + cls + "'>");
		document.write("		<td>" + h.date + "</td>");
		document.write("		<td>" + h.time + "</td>");
		document.write("		<td align=left><a target='_blank' href='http://clients.weblink.com.au/clients/eaglenickel/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");

	}
	document.write("	</tbody>")
	document.write("</table>")
}

