

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('08/02/2012','19:29','BRM','FIRB Approves Wah Nam Australia Takeover','6577480','','','');
headlines[1] = new headline('08/02/2012','19:11','BRM','WNI: Fulfilment of Foreign investment approval Condition','6577472','','','');
headlines[2] = new headline('07/02/2012','12:28','BRM','Change in substantial holding from WNI','6577255','','','');
headlines[3] = new headline('31/01/2012','19:38','BRM','Quarterly Activities Report','6576448','','','');
headlines[4] = new headline('31/01/2012','18:19','BRM','Quarterly Cashflow Report','6576338','','','');
headlines[5] = new headline('31/01/2012','17:44','BRM','WNI: Supplemental Agreement to the Underwriting Agreement','6576308','','','');
headlines[6] = new headline('31/01/2012','16:48','BRM','WNI:Waiver of Placement condition of takeover for BRM','6576251','','','');
headlines[7] = new headline('27/01/2012','9:36','BRM','Appointment of CEO','6575285','','','');
headlines[8] = new headline('25/01/2012','13:45','BRM','Progress Report - Positive Exploration Drilling Results','6575154','','','');
headlines[9] = new headline('24/01/2012','12:16','BRM','Change in substantial holding from WNI','6574960','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/brockman/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 align=left><a target='_blank' href='http://clients.weblink.com.au/clients/brockman/article.asp?view=" +  h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");

	}
	document.write("	</tbody>")
	document.write("</table>")
}

