

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('02/02/2012','8:30','BHP','Initial work for Outer Harbour Development','3368688','2','','');
headlines[1] = new headline('01/02/2012','17:55','BHP','RIO: Rio Tinto doubles stake in Richards Bay Minerals','3368672','2','','');
headlines[2] = new headline('01/02/2012','17:32','BHP','Divestment of interest in Richards Bay Minerals','3368669','2','','');
headlines[3] = new headline('18/01/2012','14:15','BHP','OEL: Update on Service Contract 55 Drilling Preparations','3368096','1','','');
headlines[4] = new headline('18/01/2012','8:25','BHP','BHP Billiton Quarterly Exploration and Development Report','3368073','6','','');
headlines[5] = new headline('18/01/2012','8:25','BHP','BHP Billiton Quarterly Production Report','3368072','20','','');
headlines[6] = new headline('17/01/2012','9:21','BHP','BOL: Nomination as Successful Bidder','3368038','1','','');
headlines[7] = new headline('10/01/2012','12:06','BHP','VDM awarded a $25.2 million contract','3367841','1','','');
headlines[8] = new headline('03/01/2012','11:01','BHP','Change of Director`s Interest Notice','3367660','4','','');
headlines[9] = new headline('28/12/2011','16:01','BHP','OEL: Execution of Final Farm-in Documents for SC55','3367573','1','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/WebLinkInvestorRelations/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<font color=red>Sample</font></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 = 'BHP';
		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/WebLinkInvestorRelations/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</a> ("+h.pages+ " pages)"+"</td>");
		document.write("	</tr>");

	}
	document.write("	</tbody>")
	document.write("</table>")
}

