

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('03/07/2009','19:10','APK','Change of Registered Office and Principal Place of Business','2556189','','','');
headlines[1] = new headline('26/06/2009','14:20','APK','Change of Director`s Interest Notice','2555236','','','');
headlines[2] = new headline('17/06/2009','17:55','APK','Chairman Option Proposal','2554075','','','');
headlines[3] = new headline('10/06/2009','13:28','APK','Change of Director`s Interest Notice','2553267','','','');
headlines[4] = new headline('01/06/2009','18:01','APK','Revised Change in substantial holding','2552477','','','');
headlines[5] = new headline('30/04/2009','16:47','APK','Appendix 4C - quarterly','2549098','','','');
headlines[6] = new headline('30/04/2009','16:45','APK','Change of Director`s Interest Notice','2549095','','','');
headlines[7] = new headline('30/04/2009','16:44','APK','Change in substantial holding','2549094','','','');
headlines[8] = new headline('27/03/2009','11:44','APK','Appendix 3B','2545534','','','');
headlines[9] = new headline('27/03/2009','11:43','APK','Section 708A Certificate','2545533','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/mvl/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 = 'APK';
		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/mvl/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
