 var newslist=new Array();
var cnt=0;			// current news item
var curr = "";
var i=-1;			// current letter being typed
var inc = 0;

newslist[inc]=new Array("Don't let counterfeits distract from substandard drugs, says think tank","http://www.securingpharma.com/40/articles/402.php");
inc ++;

newslist[inc]=new Array("Rx-360 warns of contamination in pharma chemical","http://www.securingpharma.com/40/articles/401.php");
inc ++;

newslist[inc]=new Array("UK pilot shows serialisation and authentication in harmony","http://www.securingpharma.com/40/articles/400.php");
inc ++;

newslist[inc]=new Array("FDA promises a revamp of its criminal investigations unit","http://www.securingpharma.com/40/articles/399.php");
inc ++;


function newsticker() {
	var tickertxt = document.getElementById( 'tickertxt' );
	// next character of current item
	if (i < newslist[cnt][0].length - 1) {
		i++;
		temp1 = newslist[cnt][0];	
		temp1 = temp1.split('');	
  		curr = curr+temp1[i];
		temp2 = newslist[cnt][1];	
  		tickertxt.innerHTML = "<a href='"+temp2+"'>"+curr+"_</a>";
  		setTimeout('newsticker()',10);
		return;
	}

	// new item
	i = -1; curr = "";
	if (cnt<newslist.length-1)
		cnt++;
	else
		cnt=0;
	setTimeout('newsticker()',3000);
}