
function makeNews(c,l,f,i){
	this.copy = c;
	this.link = l;
	this.follow = f;
	//this.img = i;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += '<a href="' + this.link + '">';
	//str += '<img border="0" src="' + '' + '"></a><br>';
	str += this.copy + '<br>';
        str +=  '<a href="' + this.link + '">' + this.follow + '</a>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews("<table width=100% border=0 cellspacing=0 cellpadding=2><tr><td class=style5 align=left valign=top>Daibochi helps the Orangutans</td></tr></table><table width=100% border=0 cellspacing=0 cellpadding=8><tr><td class=style6><div align=justify>In our efforts to help the plight of the Malaysian orangutan, a truely wonderful animal, Daibochi has assisted in the development the restoration of their habit by particpating in the New Hope for Orangutan program.  <br><br><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td align=center><a href=downloads/tree_872x616.JPG target=_blank><img src=downloads/tree_inset.jpg /></a></td></tr></table></td></tr></table>", '', '', '').write();
newsArray[1] = new makeNews("<table width=100% border=0 cellspacing=0 cellpadding=2><tr><td class=style5 align=left valign=top>Investor Relations Portal</td></tr></table><table width=100% border=0 cellspacing=0 cellpadding=8><tr><td class=style6><div align=justify>To better serve our shareholders we have implemented an Investor Relations portal to provide you with all the latest and comprehensive information about Daibochi and its financial performance.  <br><br><a href=http://daibochi.investor.net.my/ target=_self>Please click here to view</a></td></tr></table>", '', '', '').write();
newsArray[2] = new makeNews("<table width=100% border=0 cellspacing=0 cellpadding=2><tr><td class=style5 align=left valign=top>Daibochi wins Gold at 2007<br />Australian Packaging Awards</td></tr></table><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=38%><img src=images/home/news_pic01.gif width=83 height=83 /></td><td width=33%><img src=images/home/news_pic02.gif width=57 height=57 /></td><td width=29%><img src=images/home/news_pic03.gif width=57 height=57 /></td></tr></table><table width=100% border=0 cellspacing=0 cellpadding=8><tr><td class=style6><div align=justify>At the 2007 Australian Packaging Awards, Daibochi won gold for the Colorpak Packaging Export Award, with the Lemnos Organic Cheese product. This award recognizes the use of Australian packaging specifically designed and developed for the export market. Comments from the judging panel on this Australian cheese product included &#8220;... By reflecting a cleanliness of production, a purity and unadulterated simplicity, the pack designs transmit all the right aesthetic and quality messages to help these products succeed&#8221;.</div></td></tr></table>",'','','').write();
newsArray[3] = new makeNews("<table width=100% border=0 cellspacing=0 cellpadding=2><tr><td class=style5 align=left valign=top>No Melamine in Daibochi Films</td></tr></table><table width=100% border=0 cellspacing=0 cellpadding=8><tr><td class=style6><div align=justify>As a response to the current news about Melamine being contained in food products, particularly from China, Daibochi has tested its food contact layer of our films by submission to a certified independent laboratory for verification.  The results state, that Daibochi in compliance with respect to Melamine levels. Please view the attached reports for further details.  <br><a href=http://www.daibochiplastic.com/download/CN-MSC0014-1008.pdf target=_blank>CPP Sealant</a> and <a href=http://www.daibochiplastic.com/download/CN-MSC0015-1008.pdf target=_blank>LLDPE Sealant</a></td></tr></table>", '', '', '').write();


//newsArray[0] = new makeNews("Move Items Between Lists With JavaScript",'http://www.devx.com/GetHelpOn/10MinuteSolution/16372','Read More','').write();
//newsArray[1] = new makeNews("Build an XML-Based Tree Control With JavaScript",'http://www.devx.com/getHelpOn/Article/11874','More Info','').write();

var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',2000);
}

function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 1000);
	}
}

