

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/12/2008','9:44','RIO','MSL: Termination of Agreement','3310727','1','','');
headlines[1] = new headline('01/12/2008','13:15','RIO','FWD: Termination of Contract - Rio Tinto','3310673','1','','');
headlines[2] = new headline('28/11/2008','11:53','RIO','Rating Agency Release - Fitch Ratings','3310533','3','','');
headlines[3] = new headline('27/11/2008','9:20','RIO','BHP: BHP Billiton Offer for Rio Tinto Lapses','3310352','2','','');
headlines[4] = new headline('26/11/2008','16:36','RIO','Ceasing to be a substantial holder for AQD','3310314','4','','');
headlines[5] = new headline('26/11/2008','8:50','RIO','Rio Tinto notes announcement by BHP Billiton','3310196','3','','');
headlines[6] = new headline('25/11/2008','18:02','RIO','BHP: Announcement Regarding Rio Tinto Offers','3310183','4','','');
headlines[7] = new headline('24/11/2008','15:56','RIO','NUP: Acquisition of Eva and Cobar II Mineral Leases (NT)','3310055','2','','');
headlines[8] = new headline('24/11/2008','11:15','RIO','MEP: News Release - Minotaur and Rio Tinto Joint Venture','3310017','2','','');
headlines[9] = new headline('24/11/2008','11:13','RIO','MEP: Minotaur and Rio Tinto Joint  Venture','3310016','2','','');


///// 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 = 'RIO';
		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>")
}
