

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/01/2010','17:39','ENL','Quarterly Cashflow Report','6478744','','','');
headlines[1] = new headline('29/01/2010','12:44','ENL','Quarterly Activities Report','6478410','','','');
headlines[2] = new headline('18/12/2009','12:03','ENL','IRM: Eagle Nickel loan to Aluminex Res Ltd repaid by IRM','6474665','','','');
headlines[3] = new headline('18/12/2009','12:02','ENL','ENL Loan to Aluminex Res Ltd repaid in full','6474661','','','');
headlines[4] = new headline('18/11/2009','19:32','ENL','Results of Annual General Meeting','6469787','','','');
headlines[5] = new headline('13/11/2009','19:28','ENL','IRM: Repayment of Aluminex Res Ltd loan to Eagle Nickel','6469170','','','');
headlines[6] = new headline('13/11/2009','19:27','ENL','Repayment of Aluminex loan by Iron Mountain Mining','6469167','','','');
headlines[7] = new headline('09/11/2009','20:04','ENL','ASX Query','6468498','','','');
headlines[8] = new headline('30/10/2009','19:19','ENL','Quarterly Activities and Cashflow Report','6467489','','','');
headlines[9] = new headline('22/10/2009','19:49','ENL','2009 Annual Report to shareholders','6465278','','','');


///// 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>")
}
