

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('25/02/2010','10:00','GJT','ear Results Presentation','2584203','','','');
headlines[1] = new headline('25/02/2010','10:00','GJT','ear Results Announcement','2584201','','','');
headlines[2] = new headline('25/02/2010','9:59','GJT','Appendix 4D and Accounts - 31 Dec 2009','2584202','','','');
headlines[3] = new headline('17/12/2009','10:54','GJT','December 2009 Distribution','2577229','','','');
headlines[4] = new headline('16/10/2009','16:31','GJT','Change in substantial holding','2569029','','','');
headlines[5] = new headline('16/10/2009','16:14','GJT','Change in substantial holding','2569018','','','');
headlines[6] = new headline('01/10/2009','16:20','GJT','Change in substantial holding','2567209','','','');
headlines[7] = new headline('30/09/2009','17:20','GJT','Annual Report to shareholders','2566894','','','');
headlines[8] = new headline('25/09/2009','16:39','GJT','Change in substantial holding','2566242','','','');
headlines[9] = new headline('22/09/2009','16:28','GJT','Reinstatement to Official Quotation','2565692','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/GJT/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 = 'GJT';
		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/GJT/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
