

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('05/06/2009','16:59','WWM','Change in substantial holding','3318972','','','');
headlines[1] = new headline('02/06/2009','10:23','WWM','Appendix 3B','3318769','','','');
headlines[2] = new headline('02/06/2009','10:21','WWM','Change in Directors Interest','3318768','','','');
headlines[3] = new headline('06/05/2009','10:00','WWM','Response to an ASX Query - Appendix 4C','3317608','','','');
headlines[4] = new headline('30/04/2009','14:09','WWM','Appendix 4C and Business Update','3317327','','','');
headlines[5] = new headline('27/02/2009','16:20','WWM','Dec 08 Half Year Accounts','3314562','','','');
headlines[6] = new headline('27/02/2009','16:17','WWM','Appendix 4D','3314561','','','');
headlines[7] = new headline('09/02/2009','12:59','WWM','Change in Directors Interest','3313409','','','');
headlines[8] = new headline('09/02/2009','12:59','WWM','Appendix 3B','3313410','','','');
headlines[9] = new headline('02/02/2009','8:21','WWM','Appendix 4C December 2008 Quarter','3313085','','','');
headlines[10] = new headline('19/12/2008','14:20','WWM','Results of AGM','3311667','','','');
headlines[11] = new headline('20/11/2008','14:20','WWM','Initial Directors Interest','3309831','','','');
headlines[12] = new headline('19/11/2008','14:35','WWM','Wentworth and Century 21 Australia update','3309739','','','');
headlines[13] = new headline('19/11/2008','14:28','WWM','Notice of Meeting','3309738','','','');
headlines[14] = new headline('31/10/2008','15:19','WWM','Appendix 4C and Asset Divestment Update','3308686','','','');
headlines[15] = new headline('30/09/2008','18:30','WWM','Annual Report June 2008','3306511','','','');
headlines[16] = new headline('19/09/2008','10:26','WWM','Change in Directors Interest','3305710','','','');
headlines[17] = new headline('11/09/2008','12:27','WWM','Wentworth and Century 21 Australia to Merge','3305191','','','');
headlines[18] = new headline('11/09/2008','10:10','WWM','Request for Trading Halt','3305173','','','');
headlines[19] = new headline('11/09/2008','10:09','WWM','Trading Halt','3305177','','','');


///// Render functions /////
// (you can use your own if you like)

function viewArticle(articleID) {
	var urlStr = 'http://clients.weblink.com.au/clients/wentworth/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' width=230 >");
	document.write("	<thead>");
	document.write("		<tr>");
	document.write("			<th>Date</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" : "even";
        var asxcode = 'WWM';
       var buffer;
       buffer=" " 
		if (h.symbol == '') continue;

		document.write("	<tr class='" + cls + "'>");
		document.write("		<td>" + h.date + "</td>");
		document.write("		<td><a target='_blank' href='http://clients.weblink.com.au/clients/wentworth/article.asp?asx="+ asxcode +"&view=" + h.id + "'>" + h.headline + "</td>");
		document.write("	</tr>");
		if (cls="even")
		{
		    cls="odd"
		}
		else
		{
		    cls="even"
		}
		document.write("	<tr class='" + cls + "'>");
		document.write("		<td><div style='color:white'>test</div></td>");
		document.write("		<td></td>");
		document.write("	</tr>");
		
	}
	document.write("	</tbody>")
	document.write("</table>")
}
