

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('30/01/2012','13:43','JAT','App 4C Qtr Ended 31 Dec 2011 and Coal Activity Report','2664998','7','','');
headlines[1] = new headline('22/12/2011','12:17','JAT','App 3B - Loyalty Option Issue Shortfall','2662181','7','','');
headlines[2] = new headline('21/12/2011','8:25','JAT','Jatenergy Jongkang coal mining preparation commences','2661856','3','','');
headlines[3] = new headline('05/12/2011','9:47','JAT','App 3Y - Change in Director Interest','2659715','3','','');
headlines[4] = new headline('02/12/2011','9:08','JAT','App 3B - Incentive Option Expiry','2659479','7','','');
headlines[5] = new headline('28/11/2011','16:35','JAT','Appendix 3Y Change in Director Interest','2658718','3','','');
headlines[6] = new headline('28/11/2011','16:34','JAT','Appendix 3B','2658717','9','','');
headlines[7] = new headline('25/11/2011','10:45','JAT','2011 AGM Results','2658389','1','','');
headlines[8] = new headline('25/11/2011','10:06','JAT','AGM Presentation 2011','2658374','19','','');
headlines[9] = new headline('25/11/2011','8:30','JAT','Appendix 3Z','2658315','2','','');
headlines[10] = new headline('25/11/2011','8:30','JAT','Director Retirement','2658312','1','','');
headlines[11] = new headline('21/11/2011','12:09','JAT','Jongkang Production License Granted','2657543','3','','');
headlines[12] = new headline('16/11/2011','10:48','JAT','JAT Company Research Report Released','2657020','2','','');
headlines[13] = new headline('15/11/2011','11:40','JAT','JAT to Commence Coal Mining Operations','2656867','4','','');
headlines[14] = new headline('31/10/2011','9:11','JAT','App 4C Qtr Ended 30 Sept 2011','2654882','7','','');
headlines[15] = new headline('27/10/2011','17:36','JAT','Amended 2011 AGM Proxy Form','2654565','5','','');
headlines[16] = new headline('27/10/2011','17:34','JAT','Correction to 2011 Annual General Meeting Proxy Form','2654563','1','','');
headlines[17] = new headline('25/10/2011','9:17','JAT','2011 Notice of Annual General Meeting','2653983','28','','');
headlines[18] = new headline('12/10/2011','9:01','JAT','JAT Biofuel Presentation - 2011 All Energy Conference','2652341','15','','');
headlines[19] = new headline('05/10/2011','14:53','JAT','App 3Y - Change in Director Interest','2651595','3','','');
headlines[20] = new headline('05/10/2011','10:47','JAT','App 3Y - Change in Director Interest','2651534','3','','');
headlines[21] = new headline('05/10/2011','10:45','JAT','Appendix 3Y - Change in Director Interest','2651533','3','','');
headlines[22] = new headline('04/10/2011','11:34','JAT','Listed Option Top 20 and Spread Analysis','2651355','2','','');
headlines[23] = new headline('04/10/2011','8:41','JAT','Appendix 3B - Loyalty Option Issue','2651291','7','','');
headlines[24] = new headline('27/09/2011','18:47','JAT','Notice of Under-Subscription JAT Loyalty Option Issue','2650438','1','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/jatoil/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 = 'JAT';
		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/jatoil/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</a> ("+h.pages+ " pages)"+"</td>");
		document.write("	</tr>");

	}
	document.write("	</tbody>")
	document.write("</table>")
}

