

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('03/02/2012','9:54','ARU','Tech Metals Summit Presentation','6576921','','','');
headlines[1] = new headline('01/02/2012','15:18','ARU','Business Update','6576668','','','');
headlines[2] = new headline('01/02/2012','14:44','ARU','Appointment of New Chairman','6576660','','','');
headlines[3] = new headline('31/01/2012','15:29','ARU','Quarterly Activities and Cash flow Report','6576176','','','');
headlines[4] = new headline('20/01/2012','16:02','ARU','Competent Persons Report - Nolans Bore Resource Update','6574682','','','');
headlines[5] = new headline('20/01/2012','15:13','ARU','Resource Statement Progress Report','6574673','','','');
headlines[6] = new headline('20/01/2012','11:15','ARU','Response to ASX query','6574642','','','');
headlines[7] = new headline('17/01/2012','17:24','ARU','Response to ASX query','6574282','','','');
headlines[8] = new headline('17/01/2012','14:30','ARU','Target customers - First Rare Earth Oxide samples produced','6574259','','','');
headlines[9] = new headline('13/01/2012','14:10','ARU','Clarification Regarding Funding for 2012','6574020','','','');
headlines[10] = new headline('05/01/2012','20:17','ARU','Change of Director`s Interest Notice','6573393','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/Arafura/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 align=left>");
	document.write("			<th>Date</th>");
	document.write("			<th>Time</th>");
	document.write("			<th>ASX 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 = 'ARU';
		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/Arafura/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}

